Shadow Trading API

REST API Documentation - Version 1.0.0

Get current ledger state (cash, PnL, positions)

Query Parameters
ledger_path string (optional) Path to ledger file
Try it →

Get comprehensive shadow trading report

Query Parameters
since_hours int (optional) Only include decisions in last N hours
Try it →

Get paginated decision log with filtering

Query Parameters
page int (default: 1) Page number
limit int (default: 50) Items per page
market_id string (optional) Filter by market ID
category string (optional) Filter by category
Try it →

Get positions (open or all)

Query Parameters
category string (optional) Filter by category
resolved bool (optional) Filter by resolved status
Try it →

Get aggregated statistics

Query Parameters
time_range string (default: "all") today/week/month/all
Try it →

Get available categories with counts

Try it →

Get current risk limit status

Try it →
POST /api/shadow/run

Run a shadow trading cycle

Request Body
{
  "category": ["all"],
  "limit": 50,
  "event_limit": 100,
  "execution_mode": "pessimistic",
  "resolve_settlements": true
}
GET /api/shadow/run/{run_id}/status

Get status of a shadow run

Get current configuration

Try it →
GET /health

Health check endpoint

Try it →