Get Depth

Fetch market depth details for the specified markets. Orders with the same price will be aggregated.

Request

Method:

GET ./api/v2/openbook/depth/{market}

Parameters:

ParameterTypeDescription

market

array

A list of Solana program addresses or market symbols.

limit

number

OPTIONAL. The maximum number of orders to fetch on both sides. If not specified, gets the whole orderbook.

Request example:

curl --header "Authorization: $AUTH_HEADER" \
'https://ny.solana.dex.blxrbdn.com/api/v2/openbook/depth/SOLUSDC?limit=10' 

Response:

Fields:

ParameterTypeDescription

market

string

Symbol of the market. Supported multiple markets. Use "," to separate markets.

marketAddress

string

Smart contract address for the market.

bids

number

See bids & asks below for details. Sorted by price in descending order.

asks

number

See bids & asksr below for details. Sorted by price in ascending order.

bids & asks:

FieldTypeDescription

price

number

The price of the order (in quote/base currency).

size

number

The size of the order (in base currency).

Example:

{
  "market": "SOL/USDC",
  "marketAddress": "8BnEgHoWFysVcuFFX7QztDmzuH8r5ZFvyP3sYwn1XTh6",
  "bids": [
    {
      "price": 26.351,
      "size": 155.233
    },
    {
      "price": 26.372,
      "size": 38.808
    }
  ],
  "asks": [
    {
      "price": 26.378,
      "size": 37.039
    },
    {
      "price": 26.4,
      "size": 148.155
    }
  ]
}

Last updated