Skip to main content
GET
/
api
/
v2
/
order-book?market=ETH-USD
Retrieve timestamped (ts) order book snapshot for the given market
curl --request GET \
  --url 'https://market-data.trade.rails.xyz/api/v2/order-book?market=ETH-USD'
{
  "orders": [
    {
      "quantity": "0.1",
      "price": "4355.1",
      "orderType": "buy"
    },
    {
      "quantity": "0.2",
      "price": "4355.2",
      "orderType": "sell"
    }
  ],
  "ts": 1772576154169
}

Query Parameters

market
string
required

Market name. Example value: ETH-USD. To get all supported markets, call /api/v1/markets endpoint.

Response

200 - application/json
orders
object[]
required
ts
number
required

Timestamp (milliseconds since epoch) when this snapshot was generated.