Skip to main content
POST
Create Backtest

Authorizations

X-API-Key
string
header
required

Issue from /v1/keys (or admin-issued for enterprise tier).

Headers

Idempotency-Key
string | null
authorization
string | null
X-API-Key
string | null
POLY_API_KEY
string | null
Poly-API-Key
string | null

Body

application/json
condition_ids
string[]
required
Required array length: 1 - 100 elements
start
string
required
end
string
required
strategy
StrategySpec · object
required
initial_bankroll
string
default:1000
latency_ms
integer
default:104

Decision-to-arrival latency, in milliseconds. An order decided at a tick is priced on the book as it stands at tick + latency_ms; where the archive cannot reconstruct that instant, on the first certified book at a later tick in the window; with neither, it does not fill. Default 104, our measured production API p50. 0 prices orders on the book their own decision saw, and the result then reports execution.signals_used_pre_decision_data_only=false.

Required range: 0 <= x <= 60000
token_ids
Token Ids · object | null

Optional explicit condition_id → token_id map. When omitted, the job resolves tokens from strategy.outcome and archive metadata.

Response

Successful Response

job_id
string
required
status
enum<string>
required
Available options:
pending,
running,
completed,
failed,
cancelled
condition_ids
string[]
required
start
string
required
end
string
required
fill_model
enum<string>
required
Available options:
midpoint,
top_of_book,
depth_walk,
depth_walk_depletion
created_at
string
required
started_at
string | null
completed_at
string | null
error_message
string | null
initial_bankroll
string | null
total_pnl
string | null
total_return_pct
string | null
win_rate
string | null

Fraction of closed positions that made money, in [0, 1] ("0.5000" = half). Not a percentage.

max_drawdown
string | null
num_trades
integer | null
market_hours_charged
string | null
settlement_scored
boolean
default:false
tick_mode
enum<string> | null
Available options:
grid,
event
ticks_evaluated
integer | null
tick_degraded
boolean
default:false
tick_notice
string | null
is_replay
boolean
default:false
universe_eligible
boolean
default:false
token_ids
Token Ids · object | null
execution
BacktestExecution · object | null

How a run's orders were executed, computed from the run itself.

Absent on runs stored before it existed. Every field describes what the executor DID, so two runs with different assumptions cannot be mistaken for each other.