HTTP API reference
The Banger control plane is a small REST API. The CLI, the MCP server, and the dashboard all hit the same endpoints. You can use it directly for any integration use case the SDKs don’t cover yet.
Base URL
https://www.bangertrades.com/api/v1Authentication
Bearer token in the Authorization header:
curl https://www.bangertrades.com/api/v1/strategies \
-H "Authorization: Bearer $BANGER_API_KEY"Generate keys at /settings. Keys have a scope: read < deploy < admin. Endpoints state which scope they require.
Endpoints
Strategies
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /strategies | read | List your strategies |
POST | /strategies | deploy | Upload a new strategy from source |
GET | /strategies/:id | read | Fetch a strategy with source |
PATCH | /strategies/:id | deploy | Update name, source, visibility, etc. |
DELETE | /strategies/:id | deploy | Soft-delete |
GET | /strategies/:id/performance?range=24h | read | P&L series + summary |
Deployments
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /deployments[?status=running] | read | List your deployments (with strategy names) |
POST | /deployments | deploy | Start a deployment for a strategy |
POST | /deployments/:id/stop | deploy | Stop a running deployment |
Backtests
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /backtests | read | List recent runs |
POST | /backtests | deploy | Start an immutable hosted run |
GET | /backtests/:id | read | Poll status and fetch a bounded result |
POST | /backtests/:id/deploy | deploy | Promote a successful run to paper |
Creating a backtest requires an Idempotency-Key header containing 8–128 characters from A-Z a-z 0-9 _ . : -. Reuse the same key only for transport retries of the identical request; changing any input requires a new key.
Marketplace
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /marketplace | read | List public strategies |
GET | /marketplace/:id | read | Public strategy detail (incl. source) |
POST | /marketplace/:id/clone | deploy | Fork into your account; optionally start a deployment |
Positions
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /positions[?venue=polymarket] | read | Open positions across running deployments |
Account (dashboard-only)
These endpoints use Clerk session auth, not API keys — you can’t hit them from the CLI/MCP. They power the dashboard UI directly.
| Method | Path | Description |
|---|---|---|
GET/POST | /api_keys | List + mint API keys |
DELETE | /api_keys/:id | Revoke |
GET/POST | /venue_credentials | List + add (encrypted) BYO venue keys |
POST | /billing/checkout | Create a Stripe Checkout session for a tier upgrade |
POST | /billing/portal | Open the Stripe Customer Portal |
Errors
All error responses are JSON in the shape { "error": "..." }. Common statuses:
401— missing or invalid auth403— auth ok, but scope insufficient404— resource not found (or not yours)400— invalid request body (withissuesfrom Zod for details)500— something on our end
Rate limits
Hosted backtests enforce owner-level daily and concurrent limits at the database boundary. Strategy inspection is separately metered, and exact source cache hits consume no inspection unit. Other endpoint buckets remain subject to product-specific limits.