Bulk backtests
Run up to 50 copy-trading backtests in one request: different traders, start dates or sizing, each replayed by the same engine as Orca's Quick Backtest. Bulk backtests are part of the Quant plan; this page is open to everyone.
What a run is#
A run copies one or more wallets, together and from one cash pool, from startAt until the moment it runs. Every trade they made in that window is replayed, and the portfolio is priced twice:
- executable: each copy is filled after
executionDelaySeconds(60 by default, Orca's own lag) at prices a copier could actually have gotten, after fees. Judge a strategy by this one. - ideal: every copy at the trader's own price. It is an upper bound, and on a fast trader it differs from the executable figure by most of the return.
A batch is processed one run at a time, so it takes from seconds to tens of minutes. You get the results by polling, or from the backtest.completed webhook.
Start a batch#
POST /v2/backtests takes a runs array and answers 202 with the batch. The key needs the backtests:write scope (full-access keys have it). Send an Idempotency-Key so a retry never queues the batch twice.
Run fields#
wallets: 1 to 10 addresses, copied together.startAt: an ISO instant or date in the past, at most 365 days ago.startingBalanceUsd: the cash the portfolio starts with.sizing:{"mode": "fixed", "amountUsd"}copies every buy for the same dollar amount;{"mode": "proportional", "ratio", "maxAmountUsd"}copies a share of the trader's own order (0.05is 5%), with an optional cap. Proportional copies under $1 are skipped. A sell sells the same share of the position the trader sold.excludeCategories(optional): categories not to copy, such assports.executionDelaySeconds(optional): 0 to 600, default 60.label(optional): your name for the run, up to 100 characters, echoed back.
Get the results#
- Poll
GET /v2/backtests/{id}, or subscribe an endpoint tobacktest.completed, which is sent when every run of the batch has finished. - Read
runs: one entry per run, in the order you sent them, with its settings, its status and, once completed, itsresult. - Add
include=equityCurvesfor each completed run's daily portfolio value, executable and ideal.
What the result holds#
endingValueUsd,totalReturn(a fraction:0.18is +18%), realized and unrealized P&L,winRate(null until a position has closed or resolved), wins and losses.maxDrawdown: the largest fall from a peak of the daily equity curve, as a share of the peak.fills(executable): how many copies were priced from the recorded order book, how many by the calibrated estimate, and how many did not fill or filled in part.estimatedoverpricedis how much of the result rests on estimates.copies: copies skipped because the cash ran out, proportional copies under $1, and trades left out byexcludeCategories.wallets: each trader's copied trades and share of the profit.truncatedWalletsnames a trader whose history did not reach back tostartAt, and from when it did.
A run that fails says why in error; the rest of the batch still runs. A run Polymarket does not answer for is retried, up to 3 attempts.
Ideas for a batch#
- One run per trader on the Smart Money board, same window and sizing, to rank them by what a copier keeps.
- One trader at fixed and proportional sizing, or at several ratios, to see how sizing changes the curve.
- One trader at
executionDelaySecondsof 0, 60, 300 and 600: how fast you would have to be. - The same basket over 30, 90, 180 and 365 days, to see whether the edge is recent.
Limits#
- 50 runs per batch, and 10 wallets per run.
- A start up to 365 days back.
- 3 batches queued or running at once.
- 200 runs a UTC day per account, 20 during a Quant trial. The allowance resets at 00:00 UTC.
- 90 seconds per run. A run over it fails: try fewer wallets or a later start.
- Results are kept 90 days after the batch finishes.
Each call counts once against the daily request quota, whatever the batch holds. Going over a limit answers 409 resource_limit_reached and queues nothing.
In the Developer portal#
The portal's Backtests page starts the same batches without code: paste wallets, run each on its own or all together, pick a window and sizing. Open a batch to sort its runs by return, drawdown or win rate, chart any run's equity curves, and download the batch as CSV. Batches started through the API show up there too.
What a backtest does not tell you#
Note