GET /chart/bars/{symbol}
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/tradingview/chart/bars/{symbol}Cache cached 10s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical OHLCV candlestick bars for one symbol across crypto, equities, FX, indices and futures.
Fetched over a CF-leased data.tradingview.com chart session (chart_create_session / resolve_symbol / create_series). Returns ascending OHLCV bars. Second and tick intervals require a paid TradingView plan.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
symbol | path | str | required | EXCHANGE:TICKER symbol (e.g. BINANCE:BTCUSDT, NASDAQ:AAPL, FX:EURUSD) example: BINANCE:BTCUSDT |
timeframe | query | str1 | 3 | 5 | 15 | 30 | 45 | 60 | 120 | 240 | 1D | 1W | 1M | optional | Bar resolution (minutes or D/W/M) default: 1Dexample: 1D |
count | query | int | optional | Number of bars to fetch (1..5000) default: 300example: 300 |
Response
type: object
data key: bars
count key: count
pagination: none
sample: {
"symbol": "str",
"timeframe": "str",
"count": "int",
"bars": "array[300] object{time:int,open:float,high:float,low:float,close:float,volume:float}"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/tradingview/chart/bars/BINANCE:BTCUSDT?timeframe=1D&count=300"