Get Quote (PREDICTION_TRADE)
API Description
Get a price quote for a prediction order. The returned quoteId must be used in the subsequent Place Order request.
HTTP Request
POST /sapi/v1/w3w/wallet/prediction/trade/get-quote
Request Weight(IP)
200
Request Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| walletAddress | STRING | YES | User's prediction wallet address |
| tokenId | STRING | YES | Prediction outcome token ID |
| side | STRING | YES | Trade direction. Enum: BUY, SELL |
| amountIn | STRING | YES | Input amount in wei (18 decimals). Must be > 0. Example: 1000000000000000000 = 1 USDT |
| orderType | STRING | YES | Order type. Enum: MARKET, LIMIT |
| slippageBps | INT | YES | Slippage tolerance in basis points. Range: 1–10000 |
| priceLimit | STRING | COND | Limit price. Required when orderType=LIMIT. Must be > 0 |
| chainId | STRING | NO | Chain ID. Default: 56 (BSC) |
| feeRateBps | INT | NO | Fee rate in basis points. Default: 200, range: 1–10000 |
| fundingSource | STRING | NO | Funding source. Enum: MPC, CEX. Default: MPC |
| fundTransferAmount | STRING | NO | Auto-transfer amount before order (wei). Must be > 0 if provided |
Response Example
{
"quoteId": "q_20260525_abc123xyz",
"tokenId": "112233",
"chance": "0.52",
"vendor": "PREDICT_FUN",
"marketTitle": "UP",
"marketExtId": "ext_001",
"side": "BUY",
"amountIn": "1000000000000000000",
"amountOut": "1923070000000000000",
"isMinAmountOut": false,
"feeAmount": "20000000000000000",
"feeDiscountBps": "0",
"averagePrice": 0.52,
"lastPrice": 0.52,
"priceImpact": 0.001,
"timestamp": 1748131500000,
"chainId": "56",
"userId": 100103755893,
"walletAddress": "0x12e32db8817e292508c34111cbc4b23340df542c",
"orderType": "MARKET",
"slippageBps": 1200,
"feeRateBps": 200,
"minReceive": "1900000000000000000",
"expireAt": 1748131800000,
"priceLimit": null
}
Note:
feeAmountis a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range.feeDiscountBpsis also a string to allow fractional basis-point values in the future.feeRateBpsandslippageBpsare integers and will never exceed safe integer bounds.