Skip to main content
A request body has three required fields, start, end and structure, and five optional sections with sensible defaults.

Top level

date
required
First day, YYYY-MM-DD. Must fall inside your backtest lookback.
date
required
Last day, inclusive.
string
default:"DER.BTC_USD"
DER.BTC_USD or DER.ETH_USD (inverse, history from September 2021), DER.SOL_USDC (from February 2024) or DER.XRP_USDC (from March 2024).
string
default:"backtest"
A label for the run. It names the files of the csv and xlsx formats.

Structure

What to trade. Each position the strategy opens is one instance of this structure.
Leg[]
required
One to eight legs.
object
Which expiry the legs trade.
string
The id of a leg whose strike every other option leg adopts. Two legs both asking for 50 delta land on different strikes; anchoring them makes a true straddle. Use it for calendars too.
object
Optional hedge, off by default.

Lifecycle

When positions open and close. With no rules and no weekdays, a position opens whenever the strategy is flat and is held to expiry.
Rule[]
Up to 16 exit rules, checked in order at every decision time. The first rule that fires closes the position, and its name is recorded as the trade’s reason.
Combine predicates with any or all, which can nest:
do.action is close_all (the whole structure) or close (only do.target, such as leg:short_call).
string[]
Open new positions only on these days, such as ["friday"].
string[]
Close whatever is open on these days, at the decision hour. Together with entry_weekdays this builds weekend and weekly strategies.

Capital and sizing

number
default:"100"
Starting equity in coin.
object
How big each new position is.

Costs

string
default:"mark"
mark fills at the mark price. bid_ask crosses the spread: buys at the ask and sells at the bid, falling back to fallback_spread_pct around the mark when no quote exists.
number
default:"0"
Extra slippage on every fill, in basis points.
number
default:"0.0003"
Taker fee rate applied to every fill.
number
default:"0.125"
Fees are capped at this fraction of the option’s premium, as on the exchange.
number
default:"0.05"
Assumed spread when fill is bid_ask and no quote is available.

Clock

integer | null
default:"8"
The hour, UTC, at which the strategy looks at the market once a day. 08:00 is the expiry time. Set null to look every hour: much finer, but about 24 times more data, so keep hourly runs to short windows.
number
default:"400"
Ignore contracts further out than this.
boolean
default:"true"
Start the reported equity curve at the first trade, so a slow start doesn’t dilute the statistics.