Skip to content

List open orders

GET https://rest.haasapi.com/v1/accounts/{account_id}/orders

Returns the account’s open orders - manually placed and bot-placed alike - newest first. Returned whole, no pagination. The order_id is what DELETE /v1/orders/{order_id} takes.

Requires the read scope.

Terminal window
curl "https://rest.haasapi.com/v1/accounts/{account_id}/orders" \
-H "Authorization: Bearer hk_live_YOUR_KEY"

200 OK. Returns a OrdersPage.

{
"data": [
{
"order_id": "456271ab-772b-450d-b76f-1d059271e3fa",
"account_id": "af85799d-a214-4fd2-92ea-443c5eed18ad",
"market_tag": "GEMINI_BTC_USD",
"side": "sell",
"type": "limit",
"price": "156000",
"amount": "0.001",
"filled_amount": "0",
"status": "open",
"bot_id": null,
"placed_at": "2026-08-29T21:09:39Z"
},
{
"order_id": "0f193c73-d5c2-4d13-8166-4e13c239a17b",
"account_id": "af85799d-a214-4fd2-92ea-443c5eed18ad",
"market_tag": "GEMINI_BTC_USD",
"side": "buy",
"type": "limit",
"price": "39000",
"amount": "0.001",
"filled_amount": "0",
"status": "open",
"bot_id": null,
"placed_at": "2026-08-29T21:08:39Z"
}
]
}

The public contract for the manual trading surface - the account order/position reads and POST /v1/orders / DELETE /v1/orders/{order_id}. Same single-source-of-truth pattern as the other V1 DTOs: [JsonProperty] is the wire format, [Description] is the docs, and V1OpenApi reflects both into the published schema.

This is the REAL-MONEY surface: POST /v1/orders places an order on the account’s exchange. The shapes here are deliberately minimal - order types beyond limit/market, time-in-force, post-only/reduce-only and leverage adjustment are all deferred, each to its own design pass, so nothing ships as accidental contract.

Field Type Description
data array of Order The account’s open orders, newest first. Returned whole - no cursor (an account holds at most a few hundred open orders).

One open order, curated from the internal UserOrder row.

Field Type Description
order_id string Order identifier - what DELETE /v1/orders/{order_id} takes. Copy it; never construct one.
account_id string The account holding the order - joins against account_id on /v1/accounts.
market_tag string, nullable The market the order is on - joins against market_tag on /v1/markets.
side OrderSide Which way the order trades. Orders a bot placed with a position intent (enter/exit long/short) are folded onto the buy/sell they execute as.
type OrderType
price string (decimal) Limit price. 0 on market orders.
amount string (decimal) Ordered amount, in the market’s base currency.
filled_amount string (decimal) Amount already filled, in the market’s base currency.
status OrderStatus
bot_id string, nullable The bot that placed the order - joins against bot_id on /v1/bots. null on manually placed orders.
placed_at string, nullable When the order was placed, RFC 3339 UTC.

Which way an order trades.

Value Description
buy A buy (bid) order.
sell A sell (ask) order.

POST /v1/orders accepts limit and market only. The remaining values are report-only: GET /v1/accounts/{account_id}/orders reports orders however they were placed - the app can place stop, take-profit and trailing orders, and hiding their type would misreport the account’s live risk.

Value Description
limit Rests at price until filled or cancelled. Accepted by POST /orders.
market Fills immediately at the best available price. Accepted by POST /orders.
stop_limit A stop trigger that submits a limit order. Reported only - not accepted by POST /orders.
stop_market A stop trigger that submits a market order. Reported only - not accepted by POST /orders.
take_profit_limit A take-profit trigger that submits a limit order. Reported only - not accepted by POST /orders.
take_profit_market A take-profit trigger that submits a market order. Reported only - not accepted by POST /orders.
trailing_stop_limit A stop that trails the market and submits a limit order. Reported only - not accepted by POST /orders.
trailing_stop_market A stop that trails the market and submits a market order. Reported only - not accepted by POST /orders.

Where a working order stands. There is deliberately no terminal status here: this enum only ever describes orders on the open-orders list, and an order LEAVES that list the moment it stops working. Its disappearance is the fill signal - poll GET /v1/accounts/{account_id}/orders and treat an order_id you no longer see as done, rather than waiting for a status that will never arrive. The list does not say WHY it left (filled, cancelled or rejected); reconcile against the account’s trade history. The internal enum does carry completed/cancelled/failed, but an order carrying one is evicted from the cache this route reads, so none of them can ever be serialized.

Value Description
pending Sent, not yet acknowledged by the exchange.
open Resting on the book.
unknown Still working, but the exchange has not resolved its state. Treat it as open.

All errors are RFC 9457 problem documents.

Status Description
400 The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request)
401 Missing, malformed, disabled, or revoked API key. (code: invalid_api_key)
404 No accessible account with that id. (code: account_not_found)
500 An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error)
502 An internal service answered in a way the API could not serve. Retry. (code: upstream_error)
503 The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable)
504 An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout)
{
"type": "https://docs.haasapi.com/errors/invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request is malformed (invalid limit, unusable cursor, …).",
"code": "invalid_request"
}