It looks like you're new here. If you want to get involved, click one of these buttons!
try:
kite.quote(list_of_instruments)
except Exception as e:
print(e)
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (b'If I do:400 Bad request
\nYour browser sent an invalid request.\n\n')
count = 0No error.
for i in list_of_instruments:
try:
z = kite.quote(i)
count+=1
print(count)
except Exception as e:
print(e)
print(f'\n\n\n{i}')
kite.quote(list_of_instruments)
list here of instruments in proper string format with proper comma separator?Eg:
list_of_instruments = ["NSE:SBIN", "BSE:ONGC", ....]
for i in list_of_instruments.....
test code.Here is the list, just in case:
It could be because length of param is too long. You can try using only instrument tokens that will reduce the payload length.