Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Post Requests (Queries)

Query orders by price range without subscribing to full book.

Request Format

{
  "method": "post",
  "id": 123,
  "request": {
    "type": "info",
    "payload": {
      "type": "l4Orders",
      "coin": "BTC",
      "pxMin": "35000",
      "pxMax": "37000"
    }
  }
}

Payload Types

TypeDescription
l4OrdersQuery L4 orders in price range
l3OrdersQuery L3 orders in price range

Payload Fields

FieldTypeDescription
type"l4Orders" | "l3Orders"Query type
coinstringTrading pair
pxMinstringMinimum price (inclusive)
pxMaxstringMaximum price (inclusive)

Response

{
  "channel": "post",
  "data": {
    "id": 123,
    "response": {
      "type": "info",
      "payload": {
        "type": "l4Orders",
        "data": {
          "coin": "BTC",
          "time": 1699900000000,
          "orders": [
            [/* bids */],
            [/* asks */]
          ]
        }
      }
    }
  }
}

Response Fields

FieldTypeDescription
idnumberRequest ID (echoed from request)
response.typestringResponse type ("info")
response.payload.typestringQuery type
response.payload.data.coinstringTrading pair
response.payload.data.timenumberTimestamp
response.payload.data.ordersarray[bids, asks] arrays

Example: Query L3 Orders

Request:
{
  "method": "post",
  "id": 1,
  "request": {
    "type": "info",
    "payload": {
      "type": "l3Orders",
      "coin": "ETH",
      "pxMin": "3400",
      "pxMax": "3600"
    }
  }
}
Response:
{
  "channel": "post",
  "data": {
    "id": 1,
    "response": {
      "type": "info",
      "payload": {
        "type": "l3Orders",
        "data": {
          "coin": "ETH",
          "time": 1699900000000,
          "orders": [
            [
              {"user": "0x...", "coin": "ETH", "side": "B", "limitPx": "3500.0", "sz": "1.0", "oid": 123, "timestamp": 1699899000000}
            ],
            [
              {"user": "0x...", "coin": "ETH", "side": "A", "limitPx": "3550.0", "sz": "2.0", "oid": 456, "timestamp": 1699899500000}
            ]
          ]
        }
      }
    }
  }
}