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 classes:
//import com.upstox.ApiException;
//import io.swagger.client.api.HistoryV3Api;
HistoryV3Api apiInstance = new HistoryV3Api();
String instrumentKey = "instrumentKey_example"; // String |
String unit = "unit_example"; // String |
Integer interval = 56; // Integer |
String toDate = "toDate_example"; // String |
try {
GetHistoricalCandleResponse result = apiInstance.getHistoricalCandleData(instrumentKey, unit, interval, toDate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HistoryV3Api#getHistoricalCandleData");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Integer | ||
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 classes:
//import com.upstox.ApiException;
//import io.swagger.client.api.HistoryV3Api;
HistoryV3Api apiInstance = new HistoryV3Api();
String instrumentKey = "instrumentKey_example"; // String |
String unit = "unit_example"; // String |
Integer interval = 56; // Integer |
String toDate = "toDate_example"; // String |
String fromDate = "fromDate_example"; // String |
try {
GetHistoricalCandleResponse result = apiInstance.getHistoricalCandleData1(instrumentKey, unit, interval, toDate, fromDate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HistoryV3Api#getHistoricalCandleData1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Integer | ||
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 classes:
//import com.upstox.ApiException;
//import io.swagger.client.api.HistoryV3Api;
HistoryV3Api apiInstance = new HistoryV3Api();
String instrumentKey = "instrumentKey_example"; // String |
String unit = "unit_example"; // String |
Integer interval = 56; // Integer |
try {
GetIntraDayCandleResponse result = apiInstance.getIntraDayCandleData(instrumentKey, unit, interval);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling HistoryV3Api#getIntraDayCandleData");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
instrumentKey | String | ||
unit | String | ||
interval | Integer |
No authorization required