HeyTraders Documentation

Accounts API

Accounts are user-owned links to exchange runtimes. API-key access requires a user-owned key, and every returned resource is scoped to that key's owner.

Operations

MethodPathRequired scopePurpose
GET/v1/accountsreadList linked accounts
POST/v1/accountstradeCreate account metadata for a supported exchange
GET/v1/accounts/balancesreadRead aggregate broker balance projections
GET/v1/accounts/{account_id}/balancesreadRead one account's balances and positions
GET/v1/accounts/{account_id}/holdingsreadRead the raw broker holdings projection
GET/v1/accounts/{account_id}/open-ordersreadRead venue open orders
GET/v1/accounts/{account_id}/api-key/statusreadCheck whether credentials are present and usable
GET/v1/accounts/{account_id}/symbol-capabilitiesreadResolve account-specific sizing and order capabilities
DELETE/v1/accounts/{account_id}tradeTear down runtime dependencies and delete the account

Ownership and credentials

  • Call GET /v1/meta/agents/me before using this domain and require read or trade as shown above.
  • Client-supplied user IDs do not expand access. Account ownership is derived from the authenticated principal.
  • Creating account metadata through this external API does not upload venue credentials. OpenClaw resolves locally configured secret environment bindings only inside its trusted adapter and sends them through the private Agent browser bridge, never through model arguments or this public API.
  • api-key/status is metadata only; it never returns a stored secret.

Broker projection semantics

Balance and holdings responses may distinguish source, authority, freshness, and an unavailable reason. null or unavailable=true means the broker could not establish a current fact; it must not be converted to zero. Use symbol-capabilities immediately before order construction because leverage, minimum size, precision, and supported flags can be account-specific.

Some venues require a symbol when reading open orders; consult the OpenAPI parameters for the selected exchange.

Deletion

Account deletion is destructive. By default the server first checks runtime dependencies and terminal order state, coordinates broker credential fencing, then removes the account. Do not set force=true unless the human explicitly accepts its impact. A retry can complete an already committed deletion; the returned deleted_id is the authoritative target.