cURL
curl --request POST \ --url https://api-testnet.context.markets/v2/orders/simulate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "marketId": "<string>", "trader": "<string>", "maxSize": "<string>", "maxPrice": "<string>", "outcomeIndex": 4503599627370495, "side": "bid" } '
{ "levels": [ { "price": "<string>", "sizeAvailable": "<string>", "cumulativeSize": "<string>", "takerFee": "<string>", "cumulativeTakerFee": "<string>", "collateralRequired": "<string>", "cumulativeCollateral": "<string>", "makerCount": 123 } ], "summary": { "fillSize": "<string>", "fillCost": "<string>", "takerFee": "<string>", "weightedAvgPrice": "<string>", "totalLiquidityAvailable": "<string>", "percentFillable": 123, "slippageBps": 123 }, "collateral": { "balance": "<string>", "outcomeTokenBalance": "<string>", "requiredForFill": "<string>", "isSufficient": true }, "warnings": [ "LOW_LIQUIDITY" ] }
Simulates how an order would execute against the current orderbook. Returns fill levels, fees, and collateral requirements.
API key passed as Bearer token
Simulation parameters
0 <= x <= 9007199254740991
bid
ask
Simulation results
Show child attributes
LOW_LIQUIDITY
HIGH_SLIPPAGE
INSUFFICIENT_LIQUIDITY
INSUFFICIENT_COLLATERAL