GET
/
api
/
v1
/
order-book?market=ETH-USD
Retrieve order book snapshot for the given market
curl --request GET \
  --url 'https://market-data.trade.rails.xyz/api/v1/order-book?market=ETH-USD'
[
  {
    "quantity": "0.1",
    "price": "4355.1",
    "orderType": "buy"
  },
  {
    "quantity": "0.2",
    "price": "4355.2",
    "orderType": "sell"
  }
]

Sync Your Local Order Book

After retrieving the latest order book snapshot with this endpoint, you can subscribe to the Order Book WebSocket for real-time updates. This allows you to keep your local order book in sync with our platform.

Query Parameters

market
string
required

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

Response

200 - application/json

The response is of type object[].