All URIs are relative to https://api.upstox.com
Method | HTTP request | Description |
---|---|---|
getHistoricalCandleData | GET /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date} | Historical candle data |
getHistoricalCandleData1 | GET /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date}/{from_date} | Historical candle data |
getIntraDayCandleData | GET /v3/historical-candle/intraday/{instrumentKey}/{unit}/{interval} | Intra day candle data |
GetHistoricalCandleResponse getHistoricalCandleData(instrumentKey, unit, interval, toDate)
Historical candle data
Get OHLC values for all instruments for the present trading day with expanded interval options.
import {UpstoxClient} from 'upstox-js-sdk';
let apiInstance = new UpstoxClient.HistoryV3Api();
let instrumentKey = "instrumentKey_example"; // String |
let unit = "unit_example"; // String |
let interval = 56; // Number |
let toDate = "toDate_example"; // String |
apiInstance.getHistoricalCandleData(instrumentKey, unit, interval, toDate, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Number | ||
toDate | String |
No authorization required
GetHistoricalCandleResponse getHistoricalCandleData1(instrumentKey, unit, interval, toDate, fromDate)
Historical candle data
Get OHLC values for all instruments for the present trading day with expanded interval options
import {UpstoxClient} from 'upstox-js-sdk';
let apiInstance = new UpstoxClient.HistoryV3Api();
let instrumentKey = "instrumentKey_example"; // String |
let unit = "unit_example"; // String |
let interval = 56; // Number |
let toDate = "toDate_example"; // String |
let fromDate = "fromDate_example"; // String |
apiInstance.getHistoricalCandleData1(instrumentKey, unit, interval, toDate, fromDate, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Number | ||
toDate | String | ||
fromDate | String |
No authorization required
GetIntraDayCandleResponse getIntraDayCandleData(instrumentKey, unit, interval)
Intra day candle data
Get OHLC values for all instruments for the present trading day
import {UpstoxClient} from 'upstox-js-sdk';
let apiInstance = new UpstoxClient.HistoryV3Api();
let instrumentKey = "instrumentKey_example"; // String |
let unit = "unit_example"; // String |
let interval = 56; // Number |
apiInstance.getIntraDayCandleData(instrumentKey, unit, interval, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Number |
No authorization required