Get Open Orders

Get all open (not filled or canceled) orders for a user by specified parameters.

Request

Method:

GET ./api/v2/openbook/open-orders/{market}

Parameters:

ParameterTypeDescription

market

string

Smart contract address/symbol of the market.

address

string

OPTIONAL. Trading account address to be fetched. Leave blank for all accounts.

openOrdersAddress

string

OPTIONAL. Open orders address to be fetched.

contracts

string

OPTIONAL. Specify which future contract to fetch position details. Ex. "SOL_PERP". Default "ALL"

limit

number

OPTIONAL. The maximum number of orders to fetch. Use "0" for no limits. Default "0".

Note that only one of address or openOrdersAddress should be specified. If you specify an address, all open orders addresses associated with your address and the specified market will be fetched, which can be a time-consuming lookup.

Request example:

curl --header "Authorization: $AUTH_HEADER" \
'https://ny.solana.dex.blxrbdn.com/api/v2/openbook/open-orders/SOLUSDC?address=AFT8VayE7qr8MoQsW3wHsDS83HhEvhGWdbNSHRKeUDfQ'

Response:

Fields:

ParameterDescription

orders

See Orders below.

project

Name of the DEX project.

Orders:

FieldDescription

orderID

Unique order ID

market

Market of the order.

side

Side of order: β€œBID” or β€œASK”

types

Types of order, β€œLIMIT”, "IOC", "POSTONLY"

price

The price of the order.

size

Original size of the order.

remainingSize

Size of order not yet filled.

createdAt

Timestamp when the fill was created.

status

Order status

Example:

{
  "project": "P_SERUM",
  "orders": [
    {
      "orderID": "3121926967034604515578797042",
      "market": "SOL/USDC",
      "side": "S_ASK",
      "types": [
        "OT_LIMIT"
      ],
      "price": 169240,
      "size": 0.1,
      "remainingSize": 0.1,
      "createdAt": null,
      "status": "OS_PARTIAL_FILL"
    },
    {
      "orderID": "3121926967034604515580964513",
      "market": "SOL/USDC",
      "side": "S_ASK",
      "types": [
        "OT_LIMIT"
      ],
      "price": 169240,
      "size": 0.1,
      "remainingSize": 0.1,
      "createdAt": null,
      "status": "OS_PARTIAL_FILL"
    },
    ...
  ]
}

Last updated