☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
998
Java client
1.1K
API clients
404
PHP client
4K
Python client
347
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
December 12
sujith
December 12
amitjet
last_price from ohlc and ltp methods is not matching the zerodha web application values
amitjet
December 6
in
Python client
I am getting some unexpected data in python code
e.g. for symbol = NIFTY 12th DEC 24800 CE
symbolToken = '11809538'
sym_data = kite.ohlc(symbolToken)
sym_df = pd.DataFrame(sym_data)
print(f"{datetime.datetime.now().strftime('%H:%M:%S')} DEBUG:{symbolToken}{sym_data}:{round(sym_df.iloc[1][0],2)}")
gave following output
11:07:30: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 174.65, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:174.65
11:07:34: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 160.3, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:160.3
11:07:36: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 176.9, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:176.9
11:07:38: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 177.15, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:177.15
11:07:41: DEBUG:11809538{'11809538': {'instrument_token': 11809538,
'last_price': 161
, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:161
11:07:43: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 163.45, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:163.45
11:07:45: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 176.65, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:176.65
11:07:47: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 176.75, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:176.75
11:07:49: DEBUG:11809538{'11809538': {'instrument_token': 11809538, 'last_price': 174.9, 'ohlc': {'open': 162.95, 'high': 214.9, 'low': 129.8, 'close': 163.95}}}:174.9
if you see at 11:07:41, we got last_price as 161. however, if you go to kite website, the 1 min candle had a low of 170.05.
so how the ohlc api reported the last_price as 161 ?
Tagged:
Python Client
kiteapi
OHLC
API call getOHLC
amitjet
December 12
can anyone from Zerodha help in answering this please ?
sujith
December 12
You can follow up
here
.
This discussion has been closed.