Skip to content

API Reference

The FastAPI dashboard exposes a REST API at http://localhost:8000. Interactive docs available at /docs (Swagger UI) and /redoc.

Trading Endpoints

Base path: /api/trading

Strategies

Method Path Description
GET /api/trading/strategies List all strategies

Orders

Method Path Description
GET /api/trading/orders List orders with optional filters
GET /api/trading/orders/{client_order_id} Get a single order
GET /api/trading/orders/{client_order_id}/fills Get fills for an order
GET /api/trading/orders/{client_order_id}/deny-reason Get deny reason for a rejected order

Query parameters for GET /orders:

Parameter Type Description
strategy_id string Filter by strategy UUID
strategy_name string Filter by strategy name (partial match)
instrument_id string Filter by instrument (e.g. BTCUSDT.BINANCE)
status string Filter by status (e.g. FILLED, PENDING)
limit int Max results (default: 100, max: 1000)
offset int Pagination offset

Fills

Method Path Description
GET /api/trading/fills List fills with optional filters
GET /api/trading/fills/summary Aggregated fill statistics

Query parameters for GET /fills:

Parameter Type Description
instrument_id string Filter by instrument
strategy_id string Filter by strategy UUID
strategy_name string Filter by strategy name
side string BUY or SELL
limit int Max results (default: 100, max: 1000)
offset int Pagination offset

Positions

Method Path Description
GET /api/trading/positions List positions

Query parameters:

Parameter Type Default Description
strategy_id string Filter by strategy
instrument_id string Filter by instrument
status string open open or closed

Summary

Method Path Description
GET /api/trading/summary Aggregate counts: signals, orders, fills

Audit Logs

Method Path Description
GET /api/trading/audit List audit log entries

Budget Endpoints

Base path: /api/budget

Manages per-strategy capital caps. The budget system enforces allocated limits before order submission.

Method Path Description
GET /api/budget/registry Full in-memory registry snapshot
GET /api/budget/{strategy_id} Budget summary for a strategy
PUT /api/budget/{strategy_id}/{currency} Create or update allocated cap
DELETE /api/budget/{strategy_id}/{currency} Delete budget entry
GET /api/budget/{strategy_id}/pnl/realized Realized PnL from fills (per-currency)

BudgetSummaryResponse

{
  "strategy_id": "uuid",
  "currency": "USDT",
  "allocated": 1000.0,
  "reserved": 200.0,
  "available": 800.0,
  "realized_pnl": 42.5,
  "total_fees": 1.2
}

Health Check

Method Path Description
GET /health Returns {"status": "ok"}