Skip to main content

ListOpenOrders

ListOpenOrders · read key · Body: { "accountId": "…", "symbol": "BTC" }, with symbol optional The account’s open orders, newest first.
  • The list holds at most the account’s 1,000 newest open orders, with no paging signal.
  • It leaves out the legs of a pair trade and the slices of a TWAP order still scheduled for a later release, so an empty list means no open order the API can show, not no outstanding order.
  • Every price on an order carries at most 8 decimal places.

ListOrderHistory

ListOrderHistory · read key The account’s finished orders, newest first: filled, cancelled and rejected.
  • Only accountId is required. window applies to createdAt, and window, limit and offset work as in Paging.
  • status is FILLED, CANCELLED or REJECTED; leave it out for all three. OPEN is refused.
Each order has the fields above, plus averageFillPrice and filledAt once it has filled, and the response has hasMore.
An order can be listed as FILLED while its fill is still being booked, and that row can still turn REJECTED or CANCELLED. Treat an execution as final only once ListTrades has a trade with the same orderId.
  • The list holds every finished order however it was placed, so every orderId on a trade is found here, including orders placed in the app, pair legs and scale or TWAP slices.
  • A TWAP slice’s createdAt is its scheduled time, or the time it was cancelled if that came first; one cancelled before its time is listed as cancelled. A scale slice is an ordinary limit order.
An order joins this list when it finishes but sorts by createdAt, so one finishing while you page shifts every later offset by one: a row repeats, and the order itself is missed if it sorts above your offset. Pinning window.to cannot prevent this. De-duplicate on orderId, and read the window again to pick up orders that finished while you paged.

Quantity and partial fills

An order never rests partly filled: it fills once, though a fill that reverses a position is booked as two trades. Read executed quantities from ListTrades. quantity is the order’s current size, so it can differ from what was placed:
  • refitting a position’s reduce-only ladder can shrink an order;
  • a reduce-only order is trimmed to the position when it fills;
  • an exit that meets less depth is cut to what filled;
  • an order listed with closePosition closes the position’s size at the fill, whatever quantity it listed.
When depth cuts a take-profit, stop-loss or stop-market exit short, we try to re-arm the rest, up to the remaining position size, as a new order with its own orderId. The fill stands even if that fails, and the remainder is then left without that exit. After an exit fills for less than the position, confirm the replacement in ListOpenOrders before you treat the remainder as protected.