Get historical chart data and real-time quotes with the JavaScript SDK
const bars = await client.chart.getHistoricalBars({ symbol: 'AAPL', fromDate: '2025-01-01', toDate: '2025-01-15', resolution: '1D' }); bars.forEach(bar => { console.log(`${bar.timestamp}: O:${bar.open} H:${bar.high} L:${bar.low} C:${bar.close} V:${bar.volume}`); });
const quotes = await client.chart.getQuotes(['AAPL', 'GOOGL']);
const info = await client.chart.getSymbolInfo('AAPL');
const config = await client.chart.getConfig();
const timestamp = await client.chart.getServerTime();
interface Bar { timestamp: Date; open: number; high: number; low: number; close: number; volume: number; }
Was this page helpful?