Skip to content

Get bot

GET https://rest.haasapi.com/v1/bots/{bot_id}

Returns one bot with its runtime state: the list row’s fields plus script name, activation timestamps and order/position counts. Full order and position listings are separate (later) endpoints.

Requires the read scope.

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

200 OK. Returns a BotDetail.

{
"bot_id": "7b90995d7434433f81cb652d7bc0ce25",
"name": "Cypress DCA Bot",
"account_id": "af85799d-a214-4fd2-92ea-443c5eed18ad",
"market_tag": "GEMINI_BTC_USDT",
"script_id": "7a4b2f91d6e53c8942a0bd7e1f5896c4",
"script_name": "Haasonline Original - Dollar Cost Average Bot",
"is_activated": false,
"is_paused": false,
"activated_at": "2026-08-29T19:24:23Z",
"deactivated_at": "2026-08-29T19:24:24Z",
"realized_profit": "0",
"unrealized_profit": "0",
"roi": "0",
"open_orders_count": 0,
"open_positions_count": 0,
"closed_positions_count": 0
}
Field Type Description
bot_id string Bot identifier - the id every other bot endpoint accepts.
name string User-chosen bot name.
account_id string The exchange account the bot trades on - joins against account_id on /v1/accounts.
market_tag string, nullable The market the bot trades - joins against market_tag on /v1/markets. null when the bot has no market assigned.
script_id string The HaasScript the bot runs.
script_name string Name of the script the bot runs.
is_activated boolean Whether the bot is currently activated (running).
is_paused boolean Whether the bot is paused - activated but not processing ticks.
activated_at string, nullable When the bot was last activated, RFC 3339 UTC. null when it has never been activated.
deactivated_at string, nullable When the bot was last deactivated, RFC 3339 UTC. null when it has never been deactivated.
realized_profit string (decimal) Realized profit since activation, in the bot’s profit currency.
unrealized_profit string (decimal) Unrealized profit of open positions, in the bot’s profit currency.
roi string (decimal) Return on investment since activation, percent.
open_orders_count integer (int32) Number of orders the bot currently has open on the exchange. The order list itself is a later endpoint.
open_positions_count integer (int32) Number of positions currently open.
closed_positions_count integer (int32) Number of positions closed since activation, summed across the bot’s markets.

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. (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"
}