Skip to main content

Bankr API

Manage your personal Bankr API key and interact with the Bankr trading service. Each user can store their own encrypted API key, which takes precedence over the platform-wide key. If no personal key is configured and no platform key is available, endpoints return a 503 with needsKey: true so your client can prompt for key entry.
All Bankr endpoints require session authentication. Your personal API key is encrypted at rest with AES-256-GCM and is never returned in plaintext through the API.

Bankr API key management

Manage your personal Bankr API key. When configured, your key is used for all Bankr requests instead of the platform default.

Check key status

Returns whether you have a personal Bankr API key configured. Does not reveal the key itself.

Response

Response fields

Errors

Save API key

Stores or updates your personal Bankr API key. The key is encrypted with AES-256-GCM before being saved. If you already have a key configured, it is replaced.

Request body

Response

Errors

Remove API key

Removes your personal Bankr API key. After deletion, Bankr endpoints fall back to the platform-wide key if one is configured.

Response

Errors

Get balances

Returns wallet balances from the Bankr trading service across the specified chains.

Key resolution

The endpoint resolves the API key in the following order:
  1. Your personal key (set via POST /api/user/bankr-key)
  2. The platform-wide key
  3. If neither is available, returns 503 with needsKey: true

Query parameters

Response

The response shape is determined by the Bankr API and contains balance data for the requested chains.

Errors

Error response (no key)

When your client receives a 503 response with needsKey: true, display a key-entry form so the user can configure their personal Bankr API key via POST /api/user/bankr-key.

Send prompt

Sends a natural-language prompt to the Bankr trading agent and returns its response. Use this to execute trades, check positions, or ask trading-related questions through the Bankr service.

Key resolution

Uses the same key resolution order as the balances endpoint.

Request body

Response

The response shape is determined by the Bankr API and contains the agent’s reply.

Errors

Get job status

Polls the status of an asynchronous Bankr agent job.

Query parameters

Response

The response shape is determined by the Bankr API and contains the current job status and result.

Errors