Strategies
Manage trading strategies.
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
| GET | /v1/strategies | List strategies |
| GET | /v1/strategies/:id | Get strategy |
| POST | /v1/strategies | Create strategy |
| PATCH | /v1/strategies/:id | Update strategy |
| DELETE | /v1/strategies/:id | Delete strategy |
| POST | /v1/strategies/:id/copiers | Link copiers to strategy |
List Strategies
Section titled “List Strategies”GET /v1/strategiescurl https://api.tokenbot.com/v1/strategies \ -H "X-API-Key: tb_live_your_key"Get Strategy
Section titled “Get Strategy”GET /v1/strategies/:idcurl https://api.tokenbot.com/v1/strategies/str_abc123 \ -H "X-API-Key: tb_live_your_key"Create Strategy
Section titled “Create Strategy”POST /v1/strategiesRequest Body:
{ "exchange_account_id": "exc_abc123", "name": "BTC Momentum", "description": "Momentum-based BTC/USDT strategy", "is_public": false, "risk_level": 3, "max_drawdown": 10.0, "max_allocation": 50.0, "trading_pairs": ["BTC/USDT"]}curl -X POST https://api.tokenbot.com/v1/strategies \ -H "X-API-Key: tb_live_your_key" \ -H "Content-Type: application/json" \ -d '{"exchange_account_id":"exc_abc123","name":"BTC Momentum","risk_level":3}'Update Strategy
Section titled “Update Strategy”PATCH /v1/strategies/:idcurl -X PATCH https://api.tokenbot.com/v1/strategies/str_abc123 \ -H "X-API-Key: tb_live_your_key" \ -H "Content-Type: application/json" \ -d '{"name":"Updated Name","risk_level":2}'Delete Strategy
Section titled “Delete Strategy”DELETE /v1/strategies/:idcurl -X DELETE https://api.tokenbot.com/v1/strategies/str_abc123 \ -H "X-API-Key: tb_live_your_key"Link Copiers to Strategy
Section titled “Link Copiers to Strategy”POST /v1/strategies/:id/copiersRequest Body:
{ "copier_ids": ["cop_abc123", "cop_def456"]}curl -X POST https://api.tokenbot.com/v1/strategies/str_abc123/copiers \ -H "X-API-Key: tb_live_your_key" \ -H "Content-Type: application/json" \ -d '{"copier_ids":["cop_abc123"]}'
