Get Orderbooks

Fetch orderbooks details for the specified markets. Orders with the same price will NOT be aggregated.

Request

Method:

GET./api/v2/openbook/orderbooks/{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/orderbooks/SOLUSDC?limit=5' 

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

array

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

asks

array

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).

orderID

string

Unique order ID assgined by openbook.

clientOrderID

string

Client order ID assgined by the order owner.

ownerAddress

string

Owner address for this order.

Example:

{
  "market": "SOL/USDC",
  "marketAddress": "8BnEgHoWFysVcuFFX7QztDmzuH8r5ZFvyP3sYwn1XTh6",
  "bids": [
    {
      "price": 26.418,
      "size": 38.347,
      "orderID": "487344531683332573044094",
      "clientOrderID": "1",
      "ownerAddress": "5Di65JsuLU7n8RLZBPhWwHyxVTHM1feLXZnX6VjGpG7S"
    }
  ],
  "asks": [
    {
      "price": 26.427,
      "size": 37.356,
      "orderID": "487492105635922391655042",
      "clientOrderID": "2",
      "ownerAddress": "5Di65JsuLU7n8RLZBPhWwHyxVTHM1feLXZnX6VjGpG7S"
    }
  ]
}

Last updated