Get Quote / Latest Price before placing order using API

str
I'm trying to get the quote before placing the order in Python. But i always get empty result {}.
My kiteconnect version '3.7.0'.
Getting Orders list and placing order are working fine.
I have only paid for Kite connect API (2K), do i also need to pay for the data (additional 2K) to get the quote?

My Code:
>>> from kiteconnect import KiteConnect
>>> kite = KiteConnect(api_key="MyPublicKey")
>>> data = kite.generate_session("MyToken", api_secret="MyPrivateKey")
>>> kite.set_access_token(data["access_token"])
>>> kite.quote(['NSE:INFY'])

I have gone through other threads, but nothing helped.
  • Man7630
    kite.quote(['NSE:INFY']) works fine at my end, and it gave below results.

    {u'NSE:INFY': {u'oi': 0, u'timestamp': datetime.datetime(2018, 6, 8, 15, 59, 53), u'average_price': 1257.47, u'last_price': 1260.05, u'oi_day_low': 0, u'ohlc': {u'high': 1262, u'close': 1252.45, u'open': 1248, u'low': 1246.05}, u'oi_day_high': 0, u'volume': 3229939, u'depth': {u'sell': [{u'price': 1260.05, u'orders': 10, u'quantity': 411}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}], u'buy': [{u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}, {u'price': 0, u'orders': 0, u'quantity': 0}]}, u'instrument_token': 408065, u'last_trade_time': datetime.datetime(2018, 6, 8, 15, 56, 26), u'sell_quantity': 411, u'buy_quantity': 0, u'last_quantity': 1, u'net_change': 7.6000977}}

Sign In or Register to comment.