All URIs are relative to https://api.upstox.com
Method | HTTP request | Description |
---|---|---|
get_historical_candle_data | GET /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date} | Historical candle data |
get_historical_candle_data1 | GET /v3/historical-candle/{instrumentKey}/{unit}/{interval}/{to_date}/{from_date} | Historical candle data |
get_intra_day_candle_data | GET /v3/historical-candle/intraday/{instrumentKey}/{unit}/{interval} | Intra day candle data |
GetHistoricalCandleResponse get_historical_candle_data(instrument_key, unit, interval, to_date)
Historical candle data
Get OHLC values for all instruments for the present trading day with expanded interval options.
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.HistoryV3Api()
instrument_key = 'instrument_key_example' # str |
unit = 'unit_example' # str |
interval = 56 # int |
to_date = 'to_date_example' # str |
try:
# Historical candle data
api_response = api_instance.get_historical_candle_data(instrument_key, unit, interval, to_date)
pprint(api_response)
except ApiException as e:
print("Exception when calling HistoryV3Api->get_historical_candle_data: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instrument_key | str | ||
unit | str | ||
interval | int | ||
to_date | str |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetHistoricalCandleResponse get_historical_candle_data1(instrument_key, unit, interval, to_date, from_date)
Historical candle data
Get OHLC values for all instruments for the present trading day with expanded interval options
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.HistoryV3Api()
instrument_key = 'instrument_key_example' # str |
unit = 'unit_example' # str |
interval = 56 # int |
to_date = 'to_date_example' # str |
from_date = 'from_date_example' # str |
try:
# Historical candle data
api_response = api_instance.get_historical_candle_data1(instrument_key, unit, interval, to_date, from_date)
pprint(api_response)
except ApiException as e:
print("Exception when calling HistoryV3Api->get_historical_candle_data1: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instrument_key | str | ||
unit | str | ||
interval | int | ||
to_date | str | ||
from_date | str |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetIntraDayCandleResponse get_intra_day_candle_data(instrument_key, unit, interval)
Intra day candle data
Get OHLC values for all instruments for the present trading day
from __future__ import print_function
import time
import upstox_client
from upstox_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = upstox_client.HistoryV3Api()
instrument_key = 'instrument_key_example' # str |
unit = 'unit_example' # str |
interval = 56 # int |
try:
# Intra day candle data
api_response = api_instance.get_intra_day_candle_data(instrument_key, unit, interval)
pprint(api_response)
except ApiException as e:
print("Exception when calling HistoryV3Api->get_intra_day_candle_data: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
instrument_key | str | ||
unit | str | ||
interval | int |
No authorization required
[Back to top] [Back to API list] [Back to Model list] [Back to README]