trades
Get combined AMM + orderbook liquidity for a pair
post
/liquidity/pair-liquidity
operationId: liquidity-pairLiquidity

Side-by-side AMM + orderbook view for a single trade pair. Returns AMM pool metrics (TVL, reserves, 24h swap count) when an AMM pool exists for the pair, alongside orderbook aggregate metrics (best_bid, best_ask, spread_bps, depth at ±1% / ±5%). Use this for dashboards that surface both liquidity sources together.

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
FieldTypeDescription
base
required
object
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.currency
required
string
Currency code (3-char ISO or 40-char hex).
quote.issuer
object
Issuer XRPL address. Omit / null for native XRP.
Example
Json
{
  "base": {
    "currency": "USD",
    "issuer": "string"
  },
  "quote": {
    "currency": "USD",
    "issuer": "string"
  }
}
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.
amm
object
AMM pool metrics for the pair; null when no AMM pool exists.
orderbook
object
Aggregate orderbook depth for the pair.
orderbook.best_bid
object
orderbook.best_ask
object
orderbook.spread_bps
object
orderbook.bids_count
integer
orderbook.asks_count
integer
orderbook.depth_bid_1pct
object
orderbook.depth_ask_1pct
object
orderbook.depth_bid_5pct
object
orderbook.depth_ask_5pct
object
Example
Json
{
  "base": {
    "currency": "XRP",
    "issuer": null
  },
  "quote": {
    "currency": "USD",
    "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
  },
  "amm": {
    "pool_id": "3c4a3de8-4218-400c-8c55-87dc27206753",
    "asset1_reserve": "128450.32",
    "asset2_reserve": "65812.18",
    "lp_token_supply": "91500.55",
    "tvl_xrp": "256900.64",
    "swaps_24h": 388,
    "events_24h": 412
  },
  "orderbook": {
    "best_bid": "0.512",
    "best_ask": "0.515",
    "spread_bps": "58.4",
    "bids_count": 142,
    "asks_count": 158,
    "depth_bid_1pct": "12500.30",
    "depth_ask_1pct": "14200.18",
    "depth_bid_5pct": "128000.00",
    "depth_ask_5pct": "142000.00"
  }
}
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": []
}