POST
/
dex
/
v1
/
{chain}
/
route
DEX - 路由
curl --request POST \
  --url https://api-dex.chainstream.io/dex/v1/{chain}/route \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "dex": "jupiter",
  "userAddress": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH",
  "priorityFee": "1000",
  "tipFee": "1000",
  "isAntiMev": true,
  "amount": "1000000000",
  "swapMode": "ExactIn",
  "slippage": 5,
  "inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "recipientAddress": "0x0000000000000000000000000000000000000001",
  "permit": "66c85d1637257e890e581f724f69f4d4fc17eee156c0619c4719ed0c66eed0e9",
  "deadline": 1716806400
}'
{
  "args": {
    "dex": "jupiter",
    "userAddress": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH",
    "priorityFee": "1000",
    "tipFee": "1000",
    "isAntiMev": true,
    "amount": "1000000000",
    "swapMode": "ExactIn",
    "slippage": 5,
    "inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
    "recipientAddress": "0x0000000000000000000000000000000000000001",
    "permit": "66c85d1637257e890e581f724f69f4d4fc17eee156c0619c4719ed0c66eed0e9",
    "deadline": 1716806400
  },
  "serializedTx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
  "routeInfo": {
    "inAmount": "1000000000",
    "outAmount": "985000000",
    "priceImpact": "0.15",
    "route": [
      "USDC",
      "SOL"
    ]
  },
  "elapsedTime": 245
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chain
enum<string>
required

支持网络中列出的区块链名称

Available options:
sol,
base,
bsc,
polygon,
arbitrum,
optimism,
avalanche,
ethereum,
zksync,
sui

Body

application/json

Response

200 - application/json

The response is of type object.