GET /v1/tradingview/udf/history
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/lifi/v1/tradingview/udf/historyCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeOHLC candles for a token, by {chainId}:{address} symbol.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
symbol | query | str | required | Chart symbol in {chainId}:{address} form example: 1:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
resolution | query | str | optional | Candle resolution in seconds (TradingView UDF convention) example: 60 |
from | query | int | optional | Window start, epoch seconds example: 1789000000 |
to | query | int | optional | Window end, epoch seconds example: 1789210000 |
Response
type: object
data key: t
pagination: none
sample: {
"s": "str",
"t": "array[59]",
"o": "array[59]",
"h": "array[59]",
"l": "array[59]",
"c": "array[59]"
}
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/lifi/v1/tradingview/udf/history?symbol=1%3A0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&resolution=60&from=1789000000&to=1789210000"