Orders

The orders API contains a private endpoint for querying order state. Requires a base64-encoded SHA256 HMAC signature as defined in Authentication.

Querying Order State

HTTP MethodEndpoint
GET/orders

The endpoint supports the following query parameters:

ParameterOptionalityNotes
symboloptionalFilter orders by product symbol, only works in production
product_idoptionalFilter orders by product ID, only works in production
product_typeoptionalFilter orders by product type, only works in production
clearing_firm_codeoptionalFilter orders by clearing firm code, only works in production
account_idoptionalFilter orders by account code, only works in production
connection_idoptionalFilter orders by connection ID, only works in production
dayoptionalGet range for day, overrides begin_time and end_time
limitoptionalLimit number of orders per page
begin_timeoptionalBegin time for order time range, see Time for more details
end_timeoptionalEnd time for order time range, see Time for more details
orderoptionalPage order, either asc or desc
cursoroptionalCursor string for paginated query

The endpoint returns a pagination response of the type Pagination<Order, CursorInfo>. More details on paginated APIs can be found in Pagination. Order is defined as follows:

export interface Order {
  symbol: string;
  product_id: number;
  product_type: ProductType;
  id: string;
  connection_id: string;
  clearing_firm_code: string;
  account_id: string;
  open_ack_id: string;
  side: Side;
  price: number;
  quantity_requested: number;
  quantity_filled: number;
  status: OrderStatus;
  time_in_force: TimeInForce;
}

export type ProductType = "Future" | "Spread" | "Option";

export type Side = 'Bid' | 'Ask';

export type OrderStatus = 'Working' | 'Closed';

export type TimeInForce = 'IOC' | 'Day' | 'GTC';

Start Trading

Leveraged spot, perpetuals, futures, options, and prediction markets, all on one CFTC-regulated exchange with crypto margin and settlement.