Skip to content

Historical Data


The Historical data endpoints retrieve the historical prices of the specified instrument in the OHLCV Format

Historical API Endpoint

https://api.tiqs.trading/candle/:exchange/:token/:interval?from=fromTime&to=endTime

Type Endpoint
exchange nse, nfo
token Symbol Exchange Token (Ex: SBIN - 3045)
interval min, 3min, 5min, 10min, 15min, 30min, hour, 2hours, 3hours, 4hours, day, week, month
from in yyyy-mm-ddThh:mm:ss format (Ex: 2006-01-01T09:15:00)
to in yyyy-mm-ddThh:mm:ss format (Ex: 2006-01-01T15:30:00)
Sample Request for NSE
curl --location 'https://api.tiqs.trading/candle/nse/3045/day?from=2023-05-01T00:00:00&to=2023-06-29T20:00:00' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
Sample Response for NSE
[
    [
        "2023-05-02T00:00:00+0530",
        58000,
        58085,
        57315,
        57530,
        13667511
    ],
    [
        "2023-05-03T00:00:00+0530",
        57065,
        57500,
        56900,
        57050,
        9699527
    ],
    [
        "2023-05-04T00:00:00+0530",
        57020,
        58080,
        56850,
        58000,
        12533761
    ],
    [
        "2023-05-05T00:00:00+0530",
        58020,
        58825,
        57504,
        57650,
        18163461
    ],
    [
        "2023-05-08T00:00:00+0530",
        57765,
        58760,
        57735,
        58360,
        12990869
    ],
    [
        "2023-05-09T00:00:00+0530",
        58500,
        58645,
        57210,
        57350,
        18959065
    ],
    [
        "2023-05-10T00:00:00+0530",
        57500,
        57500,
        56325,
        57220,
        18561315
    ]
]

Note

In the OHLCV Values, the Open, High, Low, Close values are multiplied by 100. So in the above case of SBIN for example

[ "2023-05-02T00:00:00+0530", 58000, 58085, 57315, 57530, 13667511 ]

The Open is 580.00, High is 580.85, Low is 573.15, Close is 575.30 and Volume is 13667511

Sample Request for NFO
curl --location 'https://api.tiqs.trading/candle/nfo/41927/day?from=2024-03-05T00%3A00%3A00&to=2024-03-08T00%3A00%3A00&oi=1' \
--header 'appId: <YOUR_APP_ID>' \
--header 'token: <YOUR_TOKEN>'
Sample Response for NFO
[
    [
        "2024-03-05T00:00:00+0530",
        26000,
        41505,
        21400,
        33330,
        2950530,
        487485
    ],
    [
        "2024-03-06T00:00:00+0530",
        28930,
        60000,
        25520,
        40705,
        13948425,
        1778205
    ],
    [
        "2024-03-07T00:00:00+0530",
        42400,
        44800,
        28810,
        32915,
        26726955,
        3863355
    ]
]

Note

In case of NFO, if you put a flag on of oi in query parameters, you get the Open Interest as well including OHLCV Similar to the case of NSE, in the OHLCV Values, the Open, High, Low, Close values are multiplied by 100.

[ "2024-03-05T00:00:00+0530", 26000, 41505, 21400, 33330, 2950530, 487485 ]

The Open for the above instrument is is 260.00, High is 415.05, Low is 214.00, Close is 333.30, Volume is 2950530 and OI is 487485