Skip to main content

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

NameTypeMandatoryDescription
walletAddressSTRINGYESUser's prediction wallet address
tokenIdSTRINGYESPrediction outcome token ID
sideSTRINGYESTrade direction. Enum: BUY, SELL
amountInSTRINGYESInput amount in wei (18 decimals). Must be > 0. Example: 1000000000000000000 = 1 USDT
orderTypeSTRINGYESOrder type. Enum: MARKET, LIMIT
slippageBpsINTYESSlippage tolerance in basis points. Range: 1–10000
priceLimitSTRINGCONDLimit price. Required when orderType=LIMIT. Must be > 0
chainIdSTRINGNOChain ID. Default: 56 (BSC)
feeRateBpsINTNOFee rate in basis points. Default: 200, range: 1–10000
fundingSourceSTRINGNOFunding source. Enum: MPC, CEX. Default: MPC
fundTransferAmountSTRINGNOAuto-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: feeAmount is a string because it is denominated in wei (18 decimals) and may exceed JavaScript's safe integer range. feeDiscountBps is also a string to allow fractional basis-point values in the future. feeRateBps and slippageBps are integers and will never exceed safe integer bounds.