CandleSticks
Get List of CandleSticks
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Query:
offset
: (integer) Pagination offset.limit
: (integer) Number of records to return.rangeDateStart
: (string) Start date of the range.rangeDateEnd
: (string) End date of the range.exchangeNames[]
: (array) List of exchange names (e.g. Binance).symbol
: (string) Trading pair symbol (e.g. BTC/USDT).
Description:
The /api/v1/crypto/candle-sticks endpoint is designed to fetch historical candlestick data for a given cryptocurrency trading pair across specified exchanges. This data is crucial for technical analysis, allowing users to view price movements within a defined date range. The endpoint accommodates various query parameters to tailor the data request, including pagination controls (offset, limit), a date range for the data (rangeDateStart, rangeDateEnd), exchange names (exchangeNames[]), and the specific trading pair symbol (symbol).
Example with curl:
Example Response Payload:
Request Complete Candle Sticks Aggregation
Method: POST
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-complete
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
rangeDateStart
: (string) The start date and time of the requested data range.rangeDateEnd
: (string) The end date and time of the requested data range.symbols
: (array of strings) The list of cryptocurrency pair symbols (e.g. "BTC/USDT").exchangeNames
: (array of strings) The list of exchange names from which the data is to be aggregated (e.g. "Binance", "Bybit", "OKX").
Description:
This endpoint queues an asynchronous job to aggregate complete candlestick data for specified cryptocurrency pairs from multiple exchanges within a given date and time range. The task is offloaded to a worker for processing. Clients can poll the task status using the /api/v1/crypto/aggregation-tasks/:id
endpoint and retrieve the results upon completion with the /api/v1/crypto/candle-sticks/aggregate-complete/results/:id
endpoint.
Example with curl:
Example Response Payload:
Note: To check the status of the aggregation task, replace :id
with the actual task ID in the /api/v1/crypto/aggregation-tasks/:id
endpoint. Once the task is complete, the results can be retrieved in a similar manner using the /api/v1/crypto/candle-sticks/aggregate-discrete/results/:id
endpoint, again replacing :id
with the task ID.
Get Complete Aggregation Task Results
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-complete/results/:id
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (string) The identifier of the discrete aggregation task.
Description:
The /api/v1/crypto/candle-sticks/aggregate-complete/results/:id
endpoint is used to retrieve the results of a discrete candle sticks aggregation task. The task is identified using the id
path variable, which corresponds to the unique ID returned when the aggregation task was initially requested and processed.
Example with curl:
Example Response Payload:
List Complete Aggregation Task Results
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-complete/results
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Query:
limit
: (integer) The maximum number of results to retrieve.offset
: (integer) The number of results to skip (typically for pagination).rangeDateStart
: (string) The start date and time for filtering the results.rangeDateEnd
: (string) The end date and time for filtering the results.symbols[]
: (array) Filter for the list of cryptocurrency pair symbols (e.g., BTC/USDT).exchangeNames[]
: (array) Filter for the list of exchange names from which the data is to be retrieved.
Description:
The /api/v1/crypto/candle-sticks/aggregate-complete/results
endpoint is designed to list aggregated candlestick data results based on specified query parameters. Clients can filter results by date range, symbols, exchange names, and candlestick time frames.
Example with curl:
Example Response Payload:
Request Discrete Candle Sticks Aggregation
Method: POST
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-discrete
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
rangeDateStart
: (string) The start date and time of the requested data range.rangeDateEnd
: (string) The end date and time of the requested data range.symbols
: (array of strings) The list of cryptocurrency pair symbols (e.g. "BTC/USDT").exchangeNames
: (array of strings) The list of exchange names from which the data is to be aggregated (e.g. "Binance", "Bybit", "OKX").timeframeMinutes
: (integer) The time frame in minutes for each candlestick data point.
Description:
This endpoint queues an asynchronous job to aggregate discrete candlestick data for specified cryptocurrency pairs from multiple exchanges within a given date and time range. The task is offloaded to a worker for processing. Clients can poll the task status using the /api/v1/crypto/aggregation-tasks/:id
endpoint and retrieve the results upon completion with the /api/v1/crypto/candle-sticks/aggregate-discrete/results/:id
endpoint.
Example with curl:
Example Response Payload:
Note: To check the status of the aggregation task, replace :id
with the actual task ID in the /api/v1/crypto/aggregation-tasks/:id
endpoint. Once the task is complete, the results can be retrieved in a similar manner using the /api/v1/crypto/candle-sticks/aggregate-discrete/results/:id
endpoint, again replacing :id
with the task ID.
Get Discrete Aggregation Task Results
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-discrete/results/:id
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (string) The identifier of the discrete aggregation task.
Description:
The /api/v1/crypto/candle-sticks/aggregate-discrete/results/:id
endpoint is used to retrieve the results of a discrete candle sticks aggregation task. The task is identified using the id
path variable, which corresponds to the unique ID returned when the aggregation task was initially requested and processed.
Example with curl:
Example Response Payload:
List Discrete Aggregation Task Results
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-discrete/results
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Query:
limit
: (integer) The maximum number of results to retrieve.offset
: (integer) The number of results to skip (typically for pagination).rangeDateStart
: (string) The start date and time for filtering the results.rangeDateEnd
: (string) The end date and time for filtering the results.symbols[]
: (array) Filter for the list of cryptocurrency pair symbols (e.g., BTC/USDT).exchangeNames[]
: (array) Filter for the list of exchange names from which the data is to be retrieved.timeframeMinutes[]
: (array) The time frames in minutes to filter the candlestick data.
Description:
The /api/v1/crypto/candle-sticks/aggregate-discrete/results
endpoint is designed to list aggregated candlestick data results based on specified query parameters. Clients can filter results by date range, symbols, exchange names, and candlestick time frames.
Example with curl:
Example Response Payload:
Get Discrete Aggregation
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-discrete/items/:id
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (string) The identifier of the discrete aggregation task.
Description:
This /api/v1/crypto/candle-sticks/aggregate-discrete/items/:id
endpoint returns pre-aggregated candlestick data with deterministic timestamps. The endpoint retrieves stored record by id from the database that have already been aggregated according to specified intervals, such as 1 minute, 5 minutes, 10 minutes, etc. Each candlestick includes the open, high, low, close prices, volume, and an average price for the specified interval. The deterministic timestamps ensure that the candlesticks are aligned to the exact start of the intervals (e.g., 00:00, 00:05, 00:10 for 5-minute intervals), providing consistency across different use cases and allowing for storage and aggregation optimization.
Example with curl:
Example Response Payload:
List Discrete Aggregations
Method: GET
Endpoint:
/api/v1/crypto/candle-sticks/aggregate-discrete/items
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Query:
limit
: (integer) The maximum number of results to retrieve.offset
: (integer) The number of results to skip (typically for pagination).rangeDateStart
: (string) The start date and time for filtering the results.rangeDateEnd
: (string) The end date and time for filtering the results.symbols[]
: (array) Filter for the list of cryptocurrency pair symbols (e.g., BTC/USDT).exchangeNames[]
: (array) Filter for the list of exchange names from which the data is to be retrieved.timeframeMinutes[]
: (array) The time frames in minutes to filter the candlestick data.
Description:
This /api/v1/crypto/candle-sticks/aggregate-discrete/items
endpoint returns pre-aggregated candlestick data with deterministic timestamps. The endpoint retrieves stored records from the database that have already been aggregated according to specified intervals, such as 1 minute, 5 minutes, 10 minutes, etc. Each candlestick includes the open, high, low, close prices, volume, and an average price for the specified interval. The deterministic timestamps ensure that the candlesticks are aligned to the exact start of the intervals (e.g., 00:00, 00:05, 00:10 for 5-minute intervals), providing consistency across different use cases and allowing for storage and aggregation optimization.
Example with curl:
Example Response Payload:
Last updated