Open Backtest Docs
APISessions

Create a backtest session

POST
/sessions

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/sessions" \  -H "Content-Type: application/json" \  -d '{    "projectId": "string",    "name": "string",    "initialBalance": 1  }'
{  "session": {    "id": "string",    "projectId": "string",    "name": "string",    "mode": "manual",    "status": "active",    "source": "web",    "initialBalance": 0,    "feesConfig": {      "entryFee": 0,      "exitFee": 0,      "type": "percent"    },    "startedAt": 0,    "endedAt": 0,    "createdAt": 0,    "updatedAt": 0  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Session not found"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Session not found"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Session not found"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Session not found"  }}