Compute order route
curl --request GET \
--url https://api.agg.market/orderbook/{venueMarketOutcomeId}/route \
--header 'x-app-id: <api-key>'{
"quoteId": "<string>",
"venueMarketOutcomeId": "<string>",
"venueMarketId": "<string>",
"estimatedCostRaw": "<string>",
"expiresAt": "<string>",
"refreshAt": "<string>",
"fills": [
{
"venue": "<string>",
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>",
"chain": "<string>",
"avgPrice": 123,
"yesPrice": 123,
"noPrice": 123,
"fills": [
{
"price": 123,
"size": 123,
"fill": 123
}
],
"venueQty": 123,
"venueFee": 123
}
],
"totalFilled": 123,
"rawExecCost": 123,
"solveTimeMs": 123,
"verifyTimeMs": 123,
"matchedMarkets": [
{
"venue": "<string>",
"venueMarketId": "<string>"
}
],
"error": "<string>",
"venueSoloQuotes": [
{
"quoteId": "<string>",
"venue": "<string>",
"avgPrice": 123,
"filledQty": 123,
"rawExecCost": 123,
"estimatedPayout": 123,
"estimatedProfit": 123,
"returnPct": 123,
"status": "<string>",
"fills": [
{
"venue": "<string>",
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>",
"chain": "<string>",
"avgPrice": 123,
"yesPrice": 123,
"noPrice": 123,
"fills": [
{
"price": 123,
"size": 123,
"fill": 123
}
],
"venueQty": 123,
"venueFee": 123
}
],
"allocations": [
{
"sourceChainId": "<string>",
"venue": "<string>",
"amount": 123,
"sourceTokenAddress": "<string>",
"custodyAddress": "<string>",
"exactToken": true
}
],
"bridgeSteps": [
{
"sourceChainId": "<string>",
"destChainId": "<string>",
"amount": 123,
"cost": 123,
"sourceTokenAddress": "<string>",
"destTokenAddress": "<string>"
}
],
"setupCosts": [
{
"venue": "<string>",
"costUsd": 123,
"alreadyPaid": true,
"chainId": 123,
"venueMarketId": "<string>"
}
],
"setupCostsTotal": 123
}
],
"allocations": [
{
"sourceChainId": "<string>",
"venue": "<string>",
"amount": 123,
"sourceTokenAddress": "<string>",
"custodyAddress": "<string>",
"exactToken": true
}
],
"bridgeSteps": [
{
"sourceChainId": "<string>",
"destChainId": "<string>",
"amount": 123,
"cost": 123,
"sourceTokenAddress": "<string>",
"destTokenAddress": "<string>"
}
],
"feeBreakdown": {
"rawExecCost": 123,
"venueFees": 123,
"bridgeFees": 123,
"executionGas": 123,
"totalCost": 123,
"setupCosts": [
{
"venue": "<string>",
"costUsd": 123,
"alreadyPaid": true,
"chainId": 123,
"venueMarketId": "<string>"
}
],
"setupCostsTotal": 123,
"appFee": 123,
"appFeeBips": 123,
"appFeeCategory": "<string>"
},
"slippage": {
"vwap": 123,
"refMidpoint": 123,
"slippage": 123,
"slippageBps": 123
},
"optima": {
"maxFilledQty": 123,
"minSlippage": 123,
"minCost": 123,
"minRisk": 123,
"minBridges": 123,
"minVenues": 123
},
"warnings": [
{
"venue": "<string>",
"venueMarketOutcomeId": "<string>",
"reason": "<string>"
}
],
"message": "<string>",
"estimatedPayout": 123,
"totalCostIncFees": 123,
"estimatedProfit": 123,
"returnPct": 123,
"positionAvailability": {
"totalSellableShares": 123,
"venueMarketOutcomes": [
{
"id": "<string>",
"venue": "<string>",
"venueMarketId": "<string>",
"availableShares": 123
}
]
}
}Orderbook
Compute order route
Computes a fill quote across available venues for a specific venue market outcome and returns the suggested fills. When a user JWT is supplied the quote is scoped to the user’s wallet balances and may be executed; without a JWT the response is a preview-only quote.
GET
/
orderbook
/
{venueMarketOutcomeId}
/
route
Compute order route
curl --request GET \
--url https://api.agg.market/orderbook/{venueMarketOutcomeId}/route \
--header 'x-app-id: <api-key>'{
"quoteId": "<string>",
"venueMarketOutcomeId": "<string>",
"venueMarketId": "<string>",
"estimatedCostRaw": "<string>",
"expiresAt": "<string>",
"refreshAt": "<string>",
"fills": [
{
"venue": "<string>",
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>",
"chain": "<string>",
"avgPrice": 123,
"yesPrice": 123,
"noPrice": 123,
"fills": [
{
"price": 123,
"size": 123,
"fill": 123
}
],
"venueQty": 123,
"venueFee": 123
}
],
"totalFilled": 123,
"rawExecCost": 123,
"solveTimeMs": 123,
"verifyTimeMs": 123,
"matchedMarkets": [
{
"venue": "<string>",
"venueMarketId": "<string>"
}
],
"error": "<string>",
"venueSoloQuotes": [
{
"quoteId": "<string>",
"venue": "<string>",
"avgPrice": 123,
"filledQty": 123,
"rawExecCost": 123,
"estimatedPayout": 123,
"estimatedProfit": 123,
"returnPct": 123,
"status": "<string>",
"fills": [
{
"venue": "<string>",
"venueMarketId": "<string>",
"venueMarketOutcomeId": "<string>",
"chain": "<string>",
"avgPrice": 123,
"yesPrice": 123,
"noPrice": 123,
"fills": [
{
"price": 123,
"size": 123,
"fill": 123
}
],
"venueQty": 123,
"venueFee": 123
}
],
"allocations": [
{
"sourceChainId": "<string>",
"venue": "<string>",
"amount": 123,
"sourceTokenAddress": "<string>",
"custodyAddress": "<string>",
"exactToken": true
}
],
"bridgeSteps": [
{
"sourceChainId": "<string>",
"destChainId": "<string>",
"amount": 123,
"cost": 123,
"sourceTokenAddress": "<string>",
"destTokenAddress": "<string>"
}
],
"setupCosts": [
{
"venue": "<string>",
"costUsd": 123,
"alreadyPaid": true,
"chainId": 123,
"venueMarketId": "<string>"
}
],
"setupCostsTotal": 123
}
],
"allocations": [
{
"sourceChainId": "<string>",
"venue": "<string>",
"amount": 123,
"sourceTokenAddress": "<string>",
"custodyAddress": "<string>",
"exactToken": true
}
],
"bridgeSteps": [
{
"sourceChainId": "<string>",
"destChainId": "<string>",
"amount": 123,
"cost": 123,
"sourceTokenAddress": "<string>",
"destTokenAddress": "<string>"
}
],
"feeBreakdown": {
"rawExecCost": 123,
"venueFees": 123,
"bridgeFees": 123,
"executionGas": 123,
"totalCost": 123,
"setupCosts": [
{
"venue": "<string>",
"costUsd": 123,
"alreadyPaid": true,
"chainId": 123,
"venueMarketId": "<string>"
}
],
"setupCostsTotal": 123,
"appFee": 123,
"appFeeBips": 123,
"appFeeCategory": "<string>"
},
"slippage": {
"vwap": 123,
"refMidpoint": 123,
"slippage": 123,
"slippageBps": 123
},
"optima": {
"maxFilledQty": 123,
"minSlippage": 123,
"minCost": 123,
"minRisk": 123,
"minBridges": 123,
"minVenues": 123
},
"warnings": [
{
"venue": "<string>",
"venueMarketOutcomeId": "<string>",
"reason": "<string>"
}
],
"message": "<string>",
"estimatedPayout": 123,
"totalCostIncFees": 123,
"estimatedProfit": 123,
"returnPct": 123,
"positionAvailability": {
"totalSellableShares": 123,
"venueMarketOutcomes": [
{
"id": "<string>",
"venue": "<string>",
"venueMarketId": "<string>",
"availableShares": 123
}
]
}
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
Path Parameters
Query Parameters
Available options:
live, paper Required range:
x >= 0Required range:
x > 0Required range:
x > 0Available options:
true, false Available options:
kalshi, polymarket, limitless, opinion, predict, probable, myriad, hyperliquid Available options:
buy, sell Available options:
true, false Response
200
Available options:
ok, infeasible, checker_rejected, solver_error, invalid_input, no_orderbooks, insufficient_input_amount, engine_unavailable, min_order_size_violated, insufficient_balance, insufficient_position, insufficient_depth, no_bids_above_min_price Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I