Skip to content

API Keys

Access the TokenBot REST API with workspace-scoped API keys for programmatic integrations.


The TokenBot REST API allows you to interact with the platform programmatically. API keys are scoped to a specific organization (workspace), ensuring isolation between different workspaces.


Terminal window
tokenbot apikey create --name "analytics integration" --env live

The secret is printed exactly once. Capture it there and then — it cannot be retrieved later.

--env accepts live or test and defaults to live. --permissions takes a comma-separated list; run tokenbot apikey create --help for the values your account accepts.

Terminal window
tokenbot apikey list # active keys, without secrets
tokenbot apikey revoke <id>

These keys are for your own integrations against the REST and GraphQL APIs. The CLI itself does not use them — it signs requests with the identity keypair from tokenbot init.


ScopeDescription
OrganizationEach key belongs to one organization and can only access its resources
PermissionsRead-only, trade, or full management access
Rate LimitsPer-key rate limiting to prevent abuse

PermissionAccess
ReadView accounts, strategies, trades, balances
TradeExecute trades, manage copiers
ManageCreate/delete strategies, manage exchange accounts

  • Never share API keys or commit them to version control
  • Use minimal permissions — only grant what’s needed
  • Rotate keys regularly — delete old keys and create new ones
  • Monitor usage — check API key activity logs

REST APIGraphQL API
AuthAPI keysNextAuth sessions
Use CaseExternal integrations, botsFrontend dashboards
ScopeOrganizationUser session
AccessProgrammaticBrowser-based

The REST API is the external developer API. The GraphQL API (AWS AppSync) powers all TokenBot frontend applications and is not intended for direct external use.


API keys are rate-limited to ensure fair usage. Current limits are displayed in your API key management page. Exceeding limits returns 429 Too Many Requests.