Skip to content

Deployments API

List Deployments

GET /api/deployments

Get Deployment

GET /api/deployments/:id

Create Deployment

POST /api/deployments

Body:

json
{
  "strategyId": "str_abc123",
  "credentialId": "cred_xyz",
  "symbols": ["BTCUSDT"],
  "params": { "lookback": "20" }
}

Subject to your plan's live bot limit.

Stop Deployment

POST /api/deployments/:id/stop

Gracefully stops the strategy and closes open positions.

Restart Deployment

POST /api/deployments/:id/restart

Delete Deployment

DELETE /api/deployments/:id

Stops the deployment if running, then removes it.

Get Deployment Logs

GET /api/deployments/:id/logs

Returns structured log entries:

json
[
  {
    "timestamp": "2024-02-01T14:20:00Z",
    "level": "info",
    "message": "Strategy started on BTCUSDT"
  }
]

WebSocket

Real-time order updates are available on channel deployment:<id>:orders.

tradectl — Automate Crypto Trading