Skip to content

Quickstart

Get up and running with the TokenBot API in minutes.

  • A TokenBot account (run tokenbot init after installing the CLI)

  • An API key — create one with the CLI:

    Terminal window
    tokenbot apikey create --name "my-app" --env live

    The secret is printed once — copy it somewhere safe.

Terminal window
curl https://api.tokenbot.com/v1/health \
-H "X-API-Key: tb_live_your_api_key"
Terminal window
curl https://api.tokenbot.com/v1/exchanges \
-H "X-API-Key: tb_live_your_api_key"
Terminal window
curl https://api.tokenbot.com/v1/strategies \
-H "X-API-Key: tb_live_your_api_key"
Terminal window
curl "https://api.tokenbot.com/v1/trades?limit=10" \
-H "X-API-Key: tb_live_your_api_key"

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.

Get real-time notifications when events occur. See the Webhooks guide.