zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
978 stars 467 forks source link

Wrong Data Structure Used in subscribed_tokens #123

Closed algotraderdhruv closed 2 years ago

algotraderdhruv commented 3 years ago

As mentioned in your description In file ticker.py

List of current subscribed tokens

    self.subscribed_tokens = {}

you have made it actually a dictionary instead of a list. Reason for raising issue is if I want to unsubscribe from all the instruments I could have written ticker.unsubscribe[ticker. self.subscribed_tokens] but now I have to convert it to list , would be advisable to change it to a list instead.

algotraderdhruv commented 3 years ago

what I meant was a list of [{"token":"mode"}, {}, ... ] then I can use as ticker.unsubscribe[list(ticker. self.subscribed_tokens.keys())]