...

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.

NameTypeRequiredDescription
symbolstringYesE.g., BTCUSDT
timeframestringYes5m, 15m, 1h, 4h
limitintegerNoMax 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.

NameTypeRequiredDescription
symbolstringYesE.g., ETHUSDT
timeframestringYes+1m, 5m, 15m, 1h, 4h
limitintegerNoMax 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.

NameTypeRequiredDescription
symbolstringYesE.g., SOLUSDT
timeframestringYes1m, 5m, 15m, 1h, 4h
limitintegerNoMax 1,000.
startTimeintegerNoStart Epoch (ms).
endTimeintegerNoEnd 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.

NameTypeRequiredDescription
symbolstringYesE.g., BNBUSDT
timeframestringYes1m...1d (See overview)
limitintegerNoMax 1,000.
startTimeintegerNoStart Epoch (ms).
endTimeintegerNoEnd 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.

NameTypeRequiredDescription
symbolstringYesE.g., XRPUSDT
timeframestringYesAll supported
limitintegerNoMax 50,000.
startTimeintegerNoStart Epoch (ms).
endTimeintegerNoEnd 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.`);