Skip to content

List a bot's open orders

GET https://rest.haasapi.com/v1/partner/users/{user_id}/bots/{bot_id}/orders

Returns the open orders of one of an end-user’s bots.

Requires the partner scope.

Terminal window
curl "https://rest.haasapi.com/v1/partner/users/{user_id}/bots/{bot_id}/orders" \
-H "Authorization: Bearer hk_live_YOUR_KEY"

200 OK. Returns a PartnerBotOrders.

{
"data": [
{
"order_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"exchange_order_id": "88123456",
"position_id": "p-1",
"market": "BINANCE_BTC_USDT",
"direction": "buy",
"order_type": "limit",
"price": "25000",
"trigger_price": "0",
"trade_price": "0",
"amount": "0.01",
"amount_filled": "0",
"fee_costs": "0",
"fee_currency": "USDT",
"profit": "0",
"roi": "0",
"leverage": "0",
"created_at": "2026-08-28T19:04:11Z",
"note": null
}
]
}
Field Type Description
data array of PartnerBotOrder The bot’s open orders.
Field Type Description
order_id string
exchange_order_id string, nullable The id the exchange assigned, once placed.
position_id string, nullable
market string, nullable
direction string buy, sell, go_long, exit_long, go_short, or exit_short.
order_type string The order type (e.g. limit, market).
price string (decimal)
trigger_price string (decimal)
trade_price string (decimal) The average fill price.
amount string (decimal)
amount_filled string (decimal)
fee_costs string (decimal)
fee_currency string, nullable
profit string (decimal)
roi string (decimal)
leverage string (decimal)
created_at string When the order was opened. RFC 3339 UTC.
note string, nullable

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 bot with that id for this end-user. (code: bot_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"
}