Download OpenAPI specification:
QTSurfer backend services API
This set of endpoints allows interaction with various exchanges for cryptocurrencies and financial assets. With these endpoints, users can access information about available exchanges, retrieve the instruments (currency pairs or assets) offered by each exchange, and perform analyses on them. The data provided by these endpoints is crucial for strategic decision-making within the trading platform.
Key functionalities:
| exchangeId required | string Example: binance ID of the exchange to retrieve instruments for |
[- {
- "id": "BTC/USDT",
- "base": "BTC",
- "quote": "USDT",
- "dataFrom": "2026-03-17T00:00:00Z",
- "dataTo": "2026-03-31T18:00:00Z",
- "lastPrice": 84250.5,
- "volume24h": 1234567.89
}, - {
- "id": "ETH/USDT",
- "base": "ETH",
- "quote": "USDT",
- "dataFrom": "2026-03-17T00:00:00Z",
- "dataTo": "2026-03-31T18:00:00Z",
- "lastPrice": 3120.75,
- "volume24h": 456789.12
}
]The backtest endpoints enable users to test trading strategies based on historical data before applying them in real-time trading. This functionality is essential for traders who want to evaluate the performance of a strategy under past market conditions and optimize it before implementing it in a live trading environment.
Key functionalities:
Enqueues a prepare task over the requested date range. Returns immediately with a jobId;
poll GET /backtest/{exchangeId}/{type}/prepare/{jobId} for completion.
The same params always return the same jobId (idempotent). Repeated calls with identical
params do not enqueue duplicate work — they reuse the existing job.
| exchangeId required | string Example: binance ID of the exchange to prepare the backtesting for |
| type required | string (DataSourceType) Value: "ticker" Example: ticker The type of data source to prepare from |
The required data to prepare a backtesting
| instrument required | string (Instrument) Exchange instrument identifier (e.g. a currency pair) |
| from required | string Start date for the preparation process. Supports the following formats:
|
| to required | string End date for the preparation process. Supports the following formats:
|
{- "instrument": "BTC/USDT",
- "from": "2024-12-13T00:00:00Z",
- "to": "2024-12-14T00:00:00Z"
}{- "jobId": "13RBLGQlPnfDjO6wyKSX8i"
}Retrieves the current state of the prepare job identified by jobId.
Poll until status is Completed, Failed, or Aborted.
| exchangeId required | string Example: binance ID of the exchange for the backtesting process |
| type required | string (DataSourceType) Value: "ticker" Example: ticker The type of data source to prepare from |
| jobId required | string Example: 13RBLGQlPnfDjO6wyKSX8i Job ID returned by |
{- "contextId": "jctx:ticker:4a627755-7f5a-4297-b647-8dddd8aee416:binance:1rabbrpk5r4kkegs83w6qr:btc/usdt:0bjmoxd4vahkgc0hnvdldh",
- "status": "Completed",
- "statusDetail": null,
- "size": 0,
- "completed": 24,
- "startTime": "2026-04-14T15:00:00Z",
- "endTime": "2026-04-14T15:00:01Z"
}Enqueues an execute task that runs the strategy identified by strategyId over the data
prepared by the prepare job identified by prepareJobId. The instrument and date range are
recovered from the prepare job — they do not need to be sent again.
Returns immediately with a jobId; poll GET /backtest/{exchangeId}/{type}/execute/{jobId}
for the result.
The same params (same prepareJobId, strategyId, storeSignals) always return the same
jobId (idempotent).
| exchangeId required | string Example: binance ID of the exchange for the backtesting process |
| type required | string (DataSourceType) Value: "ticker" Example: ticker The type of data source to execute from |
Execute task parameters
| prepareJobId required | string Job ID returned by |
| strategyId required | string (strategyId) Unique identifier for a compiled strategy |
| storeSignals | boolean Default: false When true, the worker uploads emitted signals to object storage and the
response includes |
{- "prepareJobId": "13RBLGQlPnfDjO6wyKSX8i",
- "strategyId": "6bsh31ikwkuivhtgcoa6s4",
- "storeSignals": false
}{- "jobId": "13RBLGQlPnfDjO6wyKSX8i"
}Requests cancellation of the specified execution. The execution
status will transition to Aborted once the cancellation is
processed. Cancellation is asynchronous — poll the GET endpoint
to confirm the final status.
| exchangeId required | string Example: binance |
| type required | string (DataSourceType) Value: "ticker" Example: ticker Managed exchange data sources available for backtesting. Currently only ticker is supported; kline and funding rate support is planned. |
| jobId required | string Example: 13RBLGQlPnfDjO6wyKSX8i Job ID returned by |
{- "status": "cancelling",
- "jobId": "13RBLGQlPnfDjO6wyKSX8i"
}Retrieves the current state and results of the execute job identified by jobId.
Poll until state.status is Completed, Failed, or Aborted.
| exchangeId required | string Example: binance ID of the exchange for the backtesting process |
| type required | string (DataSourceType) Value: "ticker" Example: ticker The type of data source to execute from |
| jobId required | string Example: 13RBLGQlPnfDjO6wyKSX8i Job ID returned by |
{- "state": {
- "contextId": "jctx:ticker:4a627755-7f5a-4297-b647-8dddd8aee416:binance:3vsndwikcuaatjmb83fjtl:btc/usdt:2mnyblatqqw34kix2echpb",
- "status": "Completed",
- "statusDetail": null,
- "size": 0,
- "completed": 73158,
- "startTime": "2026-03-18T13:21:28.958Z",
- "endTime": "2026-03-18T13:21:29.605Z"
}, - "results": {
- "hostName": "backtesting-job-worker-v2-688fc5c6fc-5khwk",
- "iops": 123956.53,
- "strategyId": "strategy:4a627755-7f5a-4297-b647-8dddd8aee416:ticker:2iyvtenlzh9dabqtxn7nbv",
- "instrument": "BTC/USDT",
- "pnlTotal": 42.75,
- "totalTrades": 156,
- "winRate": 58.33,
- "sharpeRatio": 1.245,
- "sortinoRatio": 1.872,
- "cagr": 0.1534,
- "maxDrawdown": 12.5,
- "maxDrawdownPercent": 8.75,
- "signalCount": 100000,
- "signalsId": "4a627755-7f5a-4297-b647-8dddd8aee416/exec/binance/3vsndwikcuaatjmb83fjtl",
- "signalsUpload": "Done",
- "signalsUploadedAt": "2026-03-18T13:21:48.170Z"
}
}The strategy endpoints allow users to submit, compile, and validate trading strategies within the platform. This feature is crucial for traders who develop automated trading systems and wish to ensure their strategy is both executable and effective before deploying it in a live/backtesting environment.
Key functionalities:
Submits raw strategy source for compilation. By default the call is synchronous and returns
the strategyId once compilation succeeds. Set the header X-Compile-Async: true to enqueue
the compile task and return immediately with a jobId — poll
GET /strategy/{strategyId} to check status.
The strategyId is deterministic: the same source for the same user always produces the
same id.
| X-Compile-Async | boolean Default: false When |
The raw strategy source code
Raw strategy Java source code
{- "strategyId": "6bsh31ikwkuivhtgcoa6s4"
}Polls the status of a strategy compilation. Useful when the strategy was submitted with
X-Compile-Async: true. Returns the resolved strategyId once compilation completes.
| strategyId required | string Example: 6bsh31ikwkuivhtgcoa6s4 The id returned by |
{- "jobId": "6bsh31ikwkuivhtgcoa6s4",
- "status": "Completed",
- "strategyId": "6bsh31ikwkuivhtgcoa6s4",
- "statusDetail": "string"
}