quote() got an unexpected keyword argument 'instruments'

ZV4555
ZV4555 edited March 2018 in Python client
def get_quote(self, exchange, symbol_list):
instrument_list = []
instrument_dict = {}
quote_dict = {}
for symbol in symbol_list:
instrument_token = self.get_instrument_token(exchange=exchange, stock=symbol)
instrument_list.append(str(instrument_token))
instrument_dict[str(instrument_token)] = symbol
i = 0
while i < 100:
i += 1
try:

<b class="Bold"><i class="Italic"> quote = self.kite.quote(instruments=instrument_list)</i></b>

except Exception as e:
print(e)
time.sleep(0.5)
continue
break
for instrument_token in quote:
quote_dict[instrument_dict[instrument_token]] = quote[instrument_token]
return quote_dict
Tagged:
  • sujith
    Can you check what version of pykiteconnect you are using?
  • ZV4555
    C:\Users\Administrator>pip show kiteconnect
    Name: kiteconnect
    Version: 3.7.0b9
    Summary: The official Python client for the Kite Connect trading API
    Home-page: https://kite.trade
    Author: Zerodha Technology Pvt ltd. (India)
    Author-email: [email protected]
    License: MIT
    Location: c:\python\lib\site-packages\kiteconnect-3.7.0b9-py3.6.egg
    Requires: requests, six, pyOpenSSL, enum34, python-dateutil, autobahn, pypiwin32
  • Vivek
    @ZV4555 As per docs instruments is a args param so you can pass your instruments list as
    self.kite.quote(*instrument_list)
    or

    self.kite.quote(instrument_list)
Sign In or Register to comment.