Skip to main content
GET
/
orderbook
/
{marketId}
/
route
Compute optimal order route
curl --request GET \
  --url https://api.agg.market/orderbook/{marketId}/route \
  --header 'x-app-id: <api-key>'
{
  "marketId": "<string>",
  "status": "ok",
  "fills": [
    {
      "venue": "<string>",
      "venueMarketId": "<string>",
      "chain": "<string>",
      "fills": [
        {
          "price": 123,
          "size": 123,
          "fill": 123
        }
      ],
      "venueQty": 123
    }
  ],
  "totalFilled": 123,
  "rawExecCost": 123,
  "steps": [
    {
      "type": "check-balance",
      "description": "<string>",
      "estimatedDurationMs": 123,
      "venue": "<string>",
      "chain": "<string>",
      "fromChain": "<string>",
      "toChain": "<string>",
      "amount": 123
    }
  ],
  "solveTimeMs": 123,
  "verifyTimeMs": 123,
  "matchedMarkets": [
    {
      "venue": "<string>",
      "marketId": "<string>"
    }
  ],
  "error": "<string>"
}

Authorizations

x-app-id
string
header
required

Your application ID. Required for all app-tier and user-tier routes.

Path Parameters

marketId
string
required

Query Parameters

qty
number
required
Required range: x > 0
slipCapBps
number
Required range: x > 0

Response

200

marketId
string
required
status
enum<string>
required
Available options:
ok,
infeasible,
checker_rejected,
solver_error,
invalid_input,
no_orderbooks
fills
object[]
required
totalFilled
number
required
rawExecCost
number
required
steps
object[]
required
solveTimeMs
number
required
verifyTimeMs
number
required
matchedMarkets
object[]
required
error
string