Documentation / New API reference / TradingView
Get TradingView Udf History
Reference
Last reviewed 2026-10-07
OHLC candles for charting.
Try it
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
symbol | query | string | Yes | Symbol identifier: SUB-<netuid>, or SUB--1 for the total series. Required: a missing value is rejected with 400. |
resolution | query | string | Yes | Resolution token: 1, 5, 15, 60, 240, 1D, 7D, 30D. Required: a missing value is rejected with 400. |
from | query | integer (int64) | Range start, Unix seconds (inclusive). | |
to | query | integer (int64) | Yes | Range end, Unix seconds (inclusive). Required. |
countback | query | integer (int32) | Number of bars to return (most recent within the range). |
Responses
200 — TradingView UDF OHLC history
| Field | Type | Required | Description |
|---|---|---|---|
c | array, nullable | Close prices. | |
c[] | number (double) | ||
h | array, nullable | High prices. | |
h[] | number (double) | ||
l | array, nullable | Low prices. | |
l[] | number (double) | ||
nextTime | integer (int64), nullable | Next available data timestamp (Unix seconds) when s = "no_data". | |
o | array, nullable | Open prices. | |
o[] | number (double) | ||
s | string | Yes | "ok" or "no_data". |
t | array, nullable | Candle open timestamps (Unix seconds). | |
t[] | integer (int64) | ||
v | array, nullable | Per-bar alpha volume traded, parallel-indexed with t. Sourced from dtao_subnet_volume_v1; 0 for a bar with no trades. | |
v[] | number (double) |
400 — Invalid query parameter
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Plain-english message describing the failure from the caller's perspective. |
status_code | integer (int32) | Yes | HTTP status code (mirrored in the response status line for convenience). |
500 — Internal server error
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | Plain-english message describing the failure from the caller's perspective. |
status_code | integer (int32) | Yes | HTTP status code (mirrored in the response status line for convenience). |
Every request needs an Authorization header holding your API key — see Getting started with the Taostats API.