QTSurfer API (0.13.04)

Download OpenAPI specification:

QTSurfer backend services API

Exchange

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:

  • Retrieve the list of available exchanges on the platform.
  • Get the instruments available on a specific exchange (currency pairs, assets, etc.).

Get a list of available exchanges

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Get a list of Instruments from a specific exchange

Authorizations:
bearerAuth
path Parameters
exchangeId
required
string
Example: binance

ID of the exchange to retrieve instruments for

Responses

Response samples

Content type
application/json
[
  • "BTC/USDT",
  • "BTC/ETH"
]

Backtesting

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:

  • Prepare historical market data for fast access.
  • Run simulations of trading strategies using prepared historical market data.
  • Assess performance and optimize strategies based on past results and metrics.

Prepare backtesting data for an exchange

This endpoint prepares backtesting data (e.g., tickers) for an exchange. The user must provide a date range and a list of instruments to prepare for execution of backtests.

Authorizations:
bearerAuth
path Parameters
exchangeId
required
string
Example: binance

ID of the exchange to prepare the backtesting for

type
required
string (DataSourceType)
Enum: "ticker" "kline" "frate"
Example: ticker

The type of data source to prepare from

Request Body schema: application/json
required

The required data to prepare a backtesting

from
string

Start date for the preparation process. Supports the following formats:

  • ISO-8601 (e.g. 2024-12-14T23:59:59Z)
  • ISO DATE (e.g. 2024-12-14)
  • BASIC ISO DATE (e.g., 20241214)
to
string

End date for the preparation process. Supports the following formats:

  • ISO-8601 (e.g. 2024-12-14T23:59:59Z)
  • ISO DATE (e.g. 2024-12-14)
  • BASIC ISO DATE (e.g., 20241214)
instruments
Array of strings (Instrument)

List of instruments (e.g., currency pairs) to include in the preparation

Responses

Request samples

Content type
application/json
{
  • "from": "2024-12-13T00:00:00Z",
  • "to": "2024-12-14",
  • "instruments": [
    ]
}

Response samples

Content type
application/json
{
  • "requestId": "13RBLGQlPnfDjO6wyKSX8i",
  • "jobs": {
    }
}

Get the status of a backtest preparation job request

This endpoint retrieves the status of a backtest preparation job for a specific exchange and data source type using the provided request ID.

Authorizations:
bearerAuth
path Parameters
exchangeId
required
string
Example: binance

ID of the exchange for the backtesting process

type
required
string (DataSourceType)
Enum: "ticker" "kline" "frate"
Example: ticker

The type of data source to prepare from

requestId
required
string
Example: 13RBLGQlPnfDjO6wyKSX8i

Unique identifier for the backtesting preparation job request

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Execute a strategy backtesting for a specific exchange, data source type

This endpoint executes a strategy backtesting for a specific exchange, data source type using the provided request ID.

Authorizations:
bearerAuth
path Parameters
exchangeId
required
string
Example: binance

ID of the exchange for the backtesting process

type
required
string (DataSourceType)
Enum: "ticker" "kline" "frate"
Example: ticker

The type of data source to execute from

requestId
required
string
Example: 13RBLGQlPnfDjO6wyKSX8i

Unique identifier for the backtesting prepared job request

Request Body schema: application/json
required

The required data to execute a backtesting

strategyId
string (strategyId)

Unique identifier for a compiled strategy

Responses

Request samples

Content type
application/json
{
  • "strategyId": "6bsh31ikwkuivhtgcoa6s4"
}

Response samples

Content type
application/json
{
  • "requestId": "13RBLGQlPnfDjO6wyKSX8i",
  • "jobs": {
    }
}

Get the results of a backtest execution job request

This endpoint retrieves the results of a backtest execution job for a specific exchange and data source type using the provided request ID.

Authorizations:
bearerAuth
path Parameters
exchangeId
required
string
Example: binance

ID of the exchange for the backtesting process

type
required
string (DataSourceType)
Enum: "ticker" "kline" "frate"
Example: ticker

The type of data source to execute from

requestId
required
string
Example: 13RBLGQlPnfDjO6wyKSX8i

Unique identifier for the backtesting execution job request

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Strategy

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:

  • Submit rich Java™ based trading strategies for validation and compilation.
  • Ensure strategies meet the required syntax and operational constraints.
  • Validate strategies to identify potential issues or errors before execution.
  • Integrate strategies with specific exchanges and market instruments for tailored use.

Submits a strategy code to be compiled/validated

Authorizations:
bearerAuth
Request Body schema: text/plain
required

The strategy code to be submitted for validation

string

The raw strategy code submitted by the user

Responses

Response samples

Content type
application/json
{
  • "strategyId": "6bsh31ikwkuivhtgcoa6s4"
}