Documentation Open Backtest
APISessions

Créer une session de backtest

POST
/sessions

Autorisation

ApiKeyAuth
x-api-key<token>

Emplacement: header

Corps de la requête

application/json

Définitions TypeScript

Utilisez le type request body en TypeScript.

Corps de la réponse

application/json

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,    "accountCurrency": "string",    "strategy": "string",    "description": "string",    "layoutTemplate": "1",    "assets": [      {        "id": "string",        "sessionId": "string",        "symbol": "string",        "feed": "binance-spot",        "timeframe": "1m",        "calendarCode": "string",        "executionCostConfig": {          "spread": 0,          "slippage": 0,          "fees": {            "entryFee": 0,            "exitFee": 0,            "type": "percent"          }        },        "contractPolicy": {          "kind": "spot"        },        "position": 0,        "createdAt": 0      }    ],    "feesConfig": {      "entryFee": 0,      "exitFee": 0,      "type": "percent"    },    "rangeStart": 0,    "rangeEnd": 0,    "randomSourceStart": 0,    "randomSourceEnd": 0,    "randomSeed": 0,    "blindMode": true,    "smoothCandles": true,    "accountTimezone": "string",    "startedAt": 0,    "endedAt": 0,    "createdAt": 0,    "updatedAt": 0  }}