Index spot data is not getting but able to see symbol information #12
Unanswered
kamadinesh
asked this question in
Q&A
Replies: 1 comment
-
hi @kamadinesh i see that you have already connected python to SAS alphatrader ! can u help me out to connect it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
exchange='NSE'
symbol='NiftyBank'
Able to find index instrument details using below
print(sas.get_instrument_by_token('NSE','26009'))
print(sas.get_instrument_by_token('NSE','26000'))
print(sas.get_instrument_by_symbol('NSE', 'Nifty Bank'))
print(sas.get_instrument_by_symbol('NSE', 'Nifty 50'))
Not able to get data in historical candles
data = sas.get_historical_candles(exchange,symbol,start_time,end_time,1)
C:\Users\admin\anaconda3\python.exe F:/algo/aphatrade1/alphatrade/examples/occ_v1.py
Instrument(exchange='NSE', token=26009, symbol='Nifty Bank', name='Nifty Bank', expiry=None, lot_size=None)
Empty DataFrame
Columns: [date, open, high, low, close, volume]
Index: []
Process finished with exit code 0
Not able to get index data in intraday candles data
data = sas.get_intraday_candles(exchange,symbol,1)
C:\Users\admin\anaconda3\python.exe F:/algo/aphatrade1/alphatrade/examples/occ_v1.py
Cannot find symbol NSE NIFTY BANK in master contract
Traceback (most recent call last):
File "F:/algo/aphatrade1/alphatrade/examples/occ_v1.py", line 41, in
data = sas.get_intraday_candles(exchange,symbol,1)
File "F:\algo\aphatrade1\alphatrade\examples\alphatrade.py", line 1103, in get_intraday_candles
'token': instrument.token
AttributeError: 'NoneType' object has no attribute 'token
Thanks
Beta Was this translation helpful? Give feedback.
All reactions