Skip to navigation

Create a backtest

Draft scaffold — not implemented or available in the API.

Backtests the draft version’s latest revision from startsAt. It runs once and stores its results; an edit of the draft marks it stale and never reruns it.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

rateCardstringRequiredformat: "^[a-z0-9_]{1,64}$"
The rate card's key.
versionstringRequiredformat: "^[1-9]\d{0,8}$"
The version number.

Headers

Paid-BetaenumRequired

This endpoint is in the rate_cards=v1 beta. Send this header to use it.

Allowed values:

Request

Body
startsAtdatetimeRequired
Where the backtest starts. It can't be earlier than what the meter versions the draft names have computed back to.

Response

201
idstring
The backtest's ID.
objectenum

The type of object. Always backtest.

Allowed values:
createdAtdatetime
When the object was created.
completedAtdatetime or null

When the analysis finished, or null while it runs.

livemodeboolean

true for an object on a live account, false on a test account.

revisioninteger
The draft revision the analysis ran on.
staleboolean

true once the draft has a later revision than the one analysed. The results stay as they were; create a new analysis to see the latest revision.

startsAtdatetime
The start of the period the analysis covers.
statusenum

running while it computes, then ready with results, or failed. More statuses may be added.

Allowed values:
updatedAtdatetime
When the object was last changed.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error