Skip to main content
GET
/
orderbooks
/
stocks
/
api
/
offchain
/
order-books
/
{orderBookId}
/
snapshot
curl -X GET "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/ob_offchain_001/snapshot?levels=10" \
  -H "x-api-key: trusset_{instanceRef}_{secret}"
{
  "success": true,
  "data": {
    "orderBookId": "ob_offchain_001",
    "bids": [
      { "price": "99500000000000000000", "quantity": "5000000000000000000" }
    ],
    "asks": [
      { "price": "100500000000000000000", "quantity": "3000000000000000000" }
    ]
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-01-15T10:30:00.000Z",
    "instanceId": "inst_abc"
  }
}
Returns a snapshot of the current order book depth for an off-chain book.

Authentication

Requires an instance API key with the trading service enabled.

Path Parameters

orderBookId
string
required
The order book identifier.

Query Parameters

levels
integer
Number of price levels to return per side. Default 20, maximum 100.
curl -X GET "https://api.trusset.org/orderbooks/stocks/api/offchain/order-books/ob_offchain_001/snapshot?levels=10" \
  -H "x-api-key: trusset_{instanceRef}_{secret}"
{
  "success": true,
  "data": {
    "orderBookId": "ob_offchain_001",
    "bids": [
      { "price": "99500000000000000000", "quantity": "5000000000000000000" }
    ],
    "asks": [
      { "price": "100500000000000000000", "quantity": "3000000000000000000" }
    ]
  },
  "metadata": {
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-01-15T10:30:00.000Z",
    "instanceId": "inst_abc"
  }
}