Candles API
Access OHLCV (Open, High, Low, Close, Volume) data across multiple tiers.
The Candles API is the primary datasource for all TickCatcher services. It allows you to retrieve historic market data for thousands of cryptocurrency pairs.
All Candle endpoints return an array of standard Candle objects:
[
{
"ts": 1734264000000, // Unix Timestamp (ms)
"open": 65000.50, // Opening price
"high": 65200.00, // Highest price during interval
"low": 64900.00, // Lowest price during interval
"close": 65100.20, // Closing price
"volume": 1200.5 // Volume traded
}
]Endpoint: GET /api/bcandles
Ideal for testing connectivity and simple visualization.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | E.g., BTCUSDT |
timeframe | string | Yes | 5m, 15m, 1h, 4h |
limit | integer | No | Max 200. Default 200. |
import { CandlesApi } from "tickcatcher";
// 1. Basic Candles
const candles = await new CandlesApi(config).basicCandles({
symbol: "BTCUSDT",
timeframe: "1h",
limit: 50
});
console.log(`Received ${candles.length} candles.`);Endpoint: GET /api/pcandles
Higher limits and more granular data.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | E.g., ETHUSDT |
timeframe | string | Yes | +1m, 5m, 15m, 1h, 4h |
limit | integer | No | Max 1,000. Default 1,000. |
import { CandlesApi } from "tickcatcher";
// 1. Pro Candles
const candles = await new CandlesApi(config).proCandles({
symbol: "ETHUSDT",
timeframe: "5m",
limit: 500
});
console.log(`Latest High: ${candles[candles.length - 1].high}`);Endpoint: GET /api/ucandles
Time travel support via specific date ranges.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | E.g., SOLUSDT |
timeframe | string | Yes | 1m, 5m, 15m, 1h, 4h |
limit | integer | No | Max 1,000. |
startTime | integer | No | Start Epoch (ms). |
endTime | integer | No | End Epoch (ms). |
import { CandlesApi } from "tickcatcher";
// 1. Ultra Candles (Time Travel)
const candles = await new CandlesApi(config).ultraCandles({
symbol: "SOLUSDT",
timeframe: "15m",
startTime: 1704067200000
});
console.log(`Historical Data Points: ${candles.length}`);Endpoint: GET /api/mcandles
Expanded timeframe selection including daily candles.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | E.g., BNBUSDT |
timeframe | string | Yes | 1m...1d (See overview) |
limit | integer | No | Max 1,000. |
startTime | integer | No | Start Epoch (ms). |
endTime | integer | No | End Epoch (ms). |
import { CandlesApi } from "tickcatcher";
// 1. Mega Candles (Daily support)
const candles = await new CandlesApi(config).megaCandles({
symbol: "BNBUSDT",
timeframe: "1d"
});
console.log(`Day Close: ${candles[candles.length - 1].close}`);Endpoint: GET /api/ecandles
Bulk export endpoint for datasets up to 1 year deep.
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | E.g., XRPUSDT |
timeframe | string | Yes | All supported |
limit | integer | No | Max 50,000. |
startTime | integer | No | Start Epoch (ms). |
endTime | integer | No | End Epoch (ms). |
import { CandlesApi } from "tickcatcher";
// 1. Enterprise Bulk Export
const candles = await new CandlesApi(config).enterpriseCandles({
symbol: "XRPUSDT",
timeframe: "1m",
limit: 50000
});
console.log(`Donwloaded ${candles.length} candles successfully.`);