REST API Overview
Base URL
Section titled “Base URL”| Environment | URL |
|---|---|
| Production | https://api.tokenbot.com/v1 |
| Development | https://api-dev.tokenbot.com/v1 |
Endpoints are also reachable without the /v1 prefix as legacy aliases, but new integrations should use /v1.
Authentication
Section titled “Authentication”Most endpoints require authentication. The primary method is an API key via the X-API-Key header (or Authorization: Bearer <key>). The tokenbot CLI uses signed requests as a fast-path. See Authentication.
A handful of endpoints are public (no auth): GET /v1/health, GET /v1/health/detailed, GET /v1/version, and GET /v1/auth/cli-challenge.
Pagination
Section titled “Pagination”List endpoints support pagination:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Items per page (max 100) |
offset | integer | 0 | Number of items to skip |
Sorting
Section titled “Sorting”| Parameter | Type | Description |
|---|---|---|
sort | string | Field to sort by |
order | string | asc or desc |
Endpoints
Section titled “Endpoints”| Resource | Path | Documentation |
|---|---|---|
| Health | /v1/health, /v1/health/detailed | health |
| Version | /v1/version | — |
| CLI identity | /v1/auth/cli-challenge, /v1/auth/cli-identity | — |
| Me | /v1/me | me |
| Exchanges | /v1/exchanges | exchanges.md |
| Supported Exchanges | /v1/supported-exchanges | supported-exchanges.md |
| Strategies | /v1/strategies | strategies.md |
| Copiers | /v1/copiers | copiers.md |
| Trades | /v1/trades | trades.md |
| Trade Pairs | /v1/trade-pairs | trade-pairs.md |
| Notifications | /v1/notifications | notifications.md |
| Settings | /v1/settings | settings.md |
| Rewards | /v1/rewards | rewards.md |
| Withdrawals | /v1/withdrawals | withdrawals.md |
| API Keys | /v1/api-keys | api-keys.md |
| Webhooks | /v1/webhooks | webhooks |
Removed: Bot Service Proxies
Section titled “Removed: Bot Service Proxies”The
/v1/trading-bot/*and/v1/market-maker/*proxy namespaces have been removed (rest-api #121). They forwarded to dashboard-era bot HTTP surfaces that were never wired up in any deployed environment — every call returned503— and those bot-side APIs are gone too (trading-bot #121, market-maker-bot #132). The embedded operator CLIs (tokenbot-trading,tokenbot-mm) now talk to the platform APIs directly: this REST API plus GraphQL atgql-api.tokenbot.com, with real-time data over thetradeSignalandorderbookUpdatesubscriptions. Remote bot control (pause / emergency-stop) returns in a future signed control-plane wave.
Health
Section titled “Health”GET /v1/health
Section titled “GET /v1/health”Basic health check (public).
GET /v1/health/detailed
Section titled “GET /v1/health/detailed”Detailed health check with service status (public).
GET /v1/me
Section titled “GET /v1/me”Returns the authenticated user’s profile.
curl https://api.tokenbot.com/v1/me \ -H "X-API-Key: tb_live_your_key"
