Open suyeshs opened 9 months ago
getting this error since past 10 days,
using the code below.
breeze = BreezeConnect(api_key=api_key) breeze.generate_session(api_secret=api_secret, session_token=session_token)
breeze.ws_connect() sleep(2)
def on_ticks(tick): print("Ticks: {}".format(tick))
breeze.on_ticks = on_ticks
breeze.subscribe_feeds( exchange_code="NFO", stock_code="CNXBAN", product_type="options", expiry_date="11-Oct-2023", strike_price="45000", right="call", get_exchange_quotes=True, get_market_depth=False, )
Traceback (most recent call last):
File "/Users/yogiyadav08/PycharmProjects/Trading/test.py", line 31, in
today getting the above errors....anyone with fix for this
Yes, faced this problem today, now its working... What was the issue?
I have also faced this error, this is stupid but this is supposed to accept specific date time formats for everything like while subscribing to option feed, while fetching option chain, etc.
So, for your reference below is the kind of format which works:
expiryOpt="2023-12-22T06:00:00.000Z" this is DATE for the expiry of the Option
subscribeOpt= "22-Dec-2023" #this is DATE for subscribing the OHLCV of the Option
expiryFut="2023-12-22T06:00:00.000Z" #this is DATE for the expiry of the FUTURE
Also if you don't require tick by tick data, you may use:
interval: "1minute"
for 1 minute data
Anyone got the Solution. This subscribe_feeds work with NSE as exchnage_code but fails for NFO stating concatenation error
breeze.subscribe_feeds(exchange_code="NFO", stock_code="ZEEENT", product_type="options", expiry_date="28-Dec-2023", strike_price="350", right="Call", interval="", get_exchange_quotes=True, get_market_depth=False)
I am getting the below Error when connecting to the WebSocket using Python. Connection is successful.
env\Lib\site-packages\breeze_connect\breeze_connect.py", line 358, in subscribe_feeds
env\Lib\site-packages\breeze_connect\breeze_connect.py", line 319, in get_stock_token_value
TypeError: can only concatenate str (not "bool") to str
The request code
class TickDataConsumer(AsyncWebsocketConsumer): async def connect(self): self.breeze = BreezeConnect(api_key="") self.breeze.generate_session(api_secret="", session_token="23017248") self.breeze.ws_connect() # Use the ws_connect method of BreezeConnect