Quickstart
Get up and running with the TokenBot API in minutes.
Prerequisites
Section titled “Prerequisites”-
A TokenBot account (run
tokenbot initafter installing the CLI) -
An API key — create one with the CLI:
Terminal window tokenbot apikey create --name "my-app" --env liveThe secret is printed once — copy it somewhere safe.
Step 1: Test Your API Key
Section titled “Step 1: Test Your API Key”curl https://api.tokenbot.com/v1/health \ -H "X-API-Key: tb_live_your_api_key"Step 2: List Your Exchange Accounts
Section titled “Step 2: List Your Exchange Accounts”curl https://api.tokenbot.com/v1/exchanges \ -H "X-API-Key: tb_live_your_api_key"Step 3: List Your Strategies
Section titled “Step 3: List Your Strategies”curl https://api.tokenbot.com/v1/strategies \ -H "X-API-Key: tb_live_your_api_key"Step 4: View Recent Trades
Section titled “Step 4: View Recent Trades”curl "https://api.tokenbot.com/v1/trades?limit=10" \ -H "X-API-Key: tb_live_your_api_key"Error Responses
Section titled “Error Responses”Errors come back as a flat JSON object:
{ "statusCode": 401, "code": "UNAUTHENTICATED", "message": "API key is required. Provide it via X-API-Key header or Authorization: Bearer token."}See Error Handling for the full list of codes.
Step 5: Set Up Webhooks
Section titled “Step 5: Set Up Webhooks”Get real-time notifications when events occur. See the Webhooks guide.
Next Steps
Section titled “Next Steps”- REST API Reference — All endpoints
- GraphQL API — Advanced queries and mutations
- Authentication — All auth methods

