Intent Solver quote#
POST /quote#
Get a price estimate (Quote).
POST /quote
Content-Type: application/jsonRequest parameters.
Request parameters#
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| chainIndex | String | YES | Chain ID | 1 |
| fromTokenAddress | String | YES | Sell token address | 0xA0b8... |
| fromTokenTags | Array | No | Sell Token Tag List | ["RWA_ONDO","RWA"] |
| toTokenAddress | String | YES | Buy token address | 0xdAC1... |
| toTokenTags | Array | No | buy Token Tag List | ["RWA_ONDO","RWA"] |
| swapMode | String | YES | Order type:exactIn / exactOut | exactIn |
| amount | String | YES | Amount to buy or sell (in the smallest units), before fees are deducted. | 1000000000000000000 |
| deadline | String | YES | Deadline timestamp by which a response is expected | 172120120102 |
| userWalletAddress | String | YES | uesr wallet address | 0x29e2... |
| commissionInfos | Array | No | Commission info list | — |
| ┗ feePercent | String | YES | Up to 9 decimal places are allowed. If more decimals are provided, the system will round up automatically. | 20000000 |
| ┗ referrerWalletAddress | String | YES | Commission recipient address. | 0x1234... |
| ┗ feeDirection | Boolean | YES | Fee side::true = charge fromToken,false = charge toToken | true |
| ┗ commissionType | String | YES | Commission type:okx = OKX platform fee、parent = parent node share、child = child node share | okx |
| ┗ toB | Boolean | YES | Order type:true = ToB、false = ToC | false |
POST /quote Request Example:
json
{
"amount": "5000000",
"chainIndex": "1",
"commissionInfos": [
{
"commissionType": "okx",
"feeDirection": true,
"feePercent": "3000000",
"referrerWalletAddress": "0x29e27c8e9979b9879de65955f172f36236446925",
"toB": false
},
{
"commissionType": "child",
"feeDirection": true,
"feePercent": "1000000",
"referrerWalletAddress": "0x29e27c8e9979b9879de65955f172f36236446925",
"toB": false
},
{
"commissionType": "parent",
"feeDirection": true,
"feePercent": "500000",
"referrerWalletAddress": "0x29e27c8e9979b9879de65955f172f36236446925",
"toB": false
}
],
"deadline": "1772781826964",
"fromTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"fromTokenTags": ["RWA_ONDO","RWA"],
"swapMode": "exactIn",
"toTokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"toTokenTags": ["RWA_ONDO","RWA"],
"userWalletAddress": "0x29e27c8e9979b9879de65955f172f36236446925",
"tokens": [
{
"address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"decimals": "18",
"price": "2284.7"
}
]
}
POST /quote Response Example:
json
{
"code": 0,
"msg": "success",
"error_code": "0",
"error_message": "",
"detailMsg": ""
}