Forecast Slippage

Forecast Slippage

forecast-slippage Forecast Slippage

URL#

https://api.dodoex.io/forecast_slippage?apikey=${apikey}

curl -i -X POST \
   -H "Content-Type:application/json" \
   -H "User-Agent:DODO-dododocstest" \
   -d \
'{
  "where": {
    "aToken": {
      "address": "0x55d398326f99059ff775485246999027b3197955",
      "chainId": 56
    },
    "bToken": {
      "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
      "chainId": 56
    }
  }
}' \
 'https://api.dodoex.io/forecast_slippage?apikey=dododocstestapikey'

Request Parameters#

Use HTTP POST for data querying.

where

Parameter nameType of parameterDescription
aToken.addressStringFrom token address
aToken.chainIdintFrom token Chain Id
bToken.addressStringTo token address
bToken.chainIdintTo token Chain Id

Return Values#

  • Code=0 returns correctly, 1 returns error
  • data
Field NameTypeField Description
aToken.addressStringFrom token address
aToken.chainIdintFrom token Chain Id
aToken.buyTaxString

The tax and fee paid by this token (the data has not been implemented yet)

aToken.sellTaxString

The tax and fee at the time of selling this token (the data has not been implemented yet)

aToken.kindString

The classification of this token includes stableใ€mainstreamใ€long-tail (this data is currently maintained manually)

aToken.symbolStringFrom token symbol
aToken.defaultSlippageFloat

The manually set default Slippage can be used as a backup when automatic Forecast Slippage prediction fails

bToken.addressStringFrom token address
bToken.chainIdintFrom token Chain Id
bToken.buyTaxString

The tax and fee paid by this token (the data has not been implemented yet)

bToken.sellTaxString

The tax and fee at the time of selling this token (the data has not been implemented yet)

bToken.kindString

The classification of this token includes stableใ€mainstreamใ€long-tail (this data is currently maintained manually)

bToken.symbolStringFrom token symbol
bToken.defaultSlippageFloat

The manually set default Slippage can be used as a backup when automatic Forecast Slippage prediction fails

forecastSlippageListArrayData on multiple Forecast Slippage prediction confidence rates
forecastSlippageList.forecastSlippageStringAutomatic Forecast Slippage
forecastSlippageList.forecastValueStringAutomatically predicted prices
forecastSlippageList.confidenceRatioStringConfidence rate
forecastSlippageList.confidenceIntervalUpperStringConfidence Interval Upper
forecastSlippageList.confidenceIntervalLowerStringConfidence Interval Lower
{
  "code": 0,
  "message": "",
  "data": {
    "aToken": {
      "chainId": 56,
      "address": "0x55d398326f99059ff775485246999027b3197955",
      "buyTax": "0",
      "sellTax": "0",
      "kind": "stable",
      "symbol": "USDT",
      "defaultSlippage": 0.005
    },
    "bToken": {
      "chainId": 56,
      "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",
      "buyTax": "0",
      "sellTax": "0",
      "kind": "stable",
      "symbol": "USDC",
      "defaultSlippage": 0.005
    },
    "forecastSlippageList": [
      {
        "forecastSlippage": 0.000317,
        "forecastValue": 0.9983733875688725,
        "confidenceRatio": "0.78",
        "confidenceIntervalUpper": 0.9973520437618795,
        "confidenceIntervalLower": 0.9993947313758655
      },
      {
        "forecastSlippage": 0.00032300000000000004,
        "forecastValue": 0.9983733875688725,
        "confidenceRatio": "0.88",
        "confidenceIntervalUpper": 0.9970787100509446,
        "confidenceIntervalLower": 0.9996680650868004
      },
      {
        "forecastSlippage": 0.00032900000000000003,
        "forecastValue": 0.9983733875688725,
        "confidenceRatio": "0.98",
        "confidenceIntervalUpper": 0.9964362114411927,
        "confidenceIntervalLower": 1.0003105636965524
      }
    ]
  }
}