trades
Get aggregated orderbook depth for a pair
post
/liquidity/orderbook-depth
operationId: liquidity-orderbookDepth

Returns the top-N bid/ask ladder for a trade pair, plus best_bid / best_ask / spread / mid and cumulative quote-asset depth inside ±1% / ±2% / ±5% price windows. Body: { "base": {"currency": "USD", "issuer": "r…"}, "quote": {"currency": "XRP"}, "levels": 20 }. Use this alongside the AMM /amm/{ammId} endpoint to see both venues' liquidity for the same pair.

Unlock protected endpoints

Enter your Bearer token once to enable every protected route in this API reference.

HTTP bearer

Saved for this browser tab only. The credential is never sent until you test an endpoint.

Authorizations
NameLocationDetails
BearerAuthAuthorization header · bearerJWT issued by the Honeycluster auth service for the `indexer` audience. Present as `Authorization: Bearer <token>`.
Request Body
application/json
required
FieldTypeDefaultDescription
base
required
object
Base asset of the pair.
base.currency
required
string
Currency code (3-char ISO or 40-char hex).
base.issuer
object
Issuer XRPL address. Omit / null for native XRP.
quote
required
object
Quote asset of the pair.
quote.currency
required
string
Currency code (3-char ISO or 40-char hex).
quote.issuer
object
Issuer XRPL address. Omit / null for native XRP.
levels
integer20
Number of price levels to return per side (1–100). Defaults to 20.
Example
Json
{
  "base": {
    "currency": "USD",
    "issuer": "string"
  },
  "quote": {
    "currency": "USD",
    "issuer": "string"
  },
  "levels": 20
}
Responses
200
application/json
Successful response
FieldTypeDescription
base
object
base.currency
string
Currency code (3-char ISO or 40-char hex).
base.issuer
object
Issuer XRPL address. Omit / null for native XRP.
quote
object
quote.currency
string
Currency code (3-char ISO or 40-char hex).
quote.issuer
object
Issuer XRPL address. Omit / null for native XRP.
best_bid
object
Highest outstanding bid price, or null if no bids.
best_ask
object
Lowest outstanding ask price, or null if no asks.
mid
object
(best_bid + best_ask) / 2, null when either side is empty.
spread_bps
object
(best_ask − best_bid) / mid × 10000, in basis points.
bids_count
integer
Total outstanding bid offers.
asks_count
integer
Total outstanding ask offers.
depth
object
Cumulative quote-asset depth inside ±1% / ±2% / ±5% price windows.
depth.bid_1pct
object
Cumulative quote value of bids within 1% below best_bid.
depth.ask_1pct
object
Cumulative quote value of asks within 1% above best_ask.
depth.bid_2pct
object
depth.ask_2pct
object
depth.bid_5pct
object
depth.ask_5pct
object
bids
object[]
Top-N bid levels, ordered by price DESC.
bids[].price
string
Limit price in quote per base.
bids[].amount
string
Order size, in base asset.
bids[].quote_total
string
price × amount — quote-asset value of this level.
asks
object[]
Top-N ask levels, ordered by price ASC.
asks[].price
string
Limit price in quote per base.
asks[].amount
string
Order size, in base asset.
asks[].quote_total
string
price × amount — quote-asset value of this level.
Example
Json
{
  "base": {
    "currency": "XRP",
    "issuer": null
  },
  "quote": {
    "currency": "USD",
    "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
  },
  "best_bid": "0.512",
  "best_ask": "0.515",
  "mid": "0.5135",
  "spread_bps": "58.4",
  "bids_count": 142,
  "asks_count": 158,
  "depth": {
    "bid_1pct": "12500.30",
    "ask_1pct": "14200.18",
    "bid_2pct": "38400.55",
    "ask_2pct": "41800.20",
    "bid_5pct": "128000.00",
    "ask_5pct": "142000.00"
  },
  "bids": [
    {
      "price": "0.512",
      "amount": "1000",
      "quote_total": "512"
    }
  ],
  "asks": [
    {
      "price": "0.515",
      "amount": "500",
      "quote_total": "257.5"
    }
  ]
}
400
application/json
Invalid input data
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
401
application/json
Authorization not provided
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
403
application/json
Insufficient access
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
500
application/json
Internal server error
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}