Hi Breeze Team,
I am writing to report a bug encountered while using the Breeze-Python-SDK.
Issue Description:
When attempting to establish a websocket connection using the SDK, the following exception is raised:
Exception(except_message.LIVESTREAM_SOCKET_CONNECTION_DISCONNECTED.value) Exception: Failed to connect to live stream.
#Below is the code
`
from breeze_connect import BreezeConnect
from time import sleep
import os
import threading
api_key = os.getenv("BREEZE_API_KEY")
api_secret = os.getenv("BREEZE_API_SECRET")
session_token = "51787546"
breeze = BreezeConnect(api_key=api_key)
def on_ticks(tick):
print("Ticks: {}".format(tick))
breeze.on_ticks = on_ticks
breeze.generate_session(api_secret=api_secret, session_token=session_token)
]
breeze.ws_connect()
sleep(2) # Wait for connection to establish
breeze.subscribe_feeds(
exchange_code="NFO",
stock_code="NIFTY",
expiry_date="2025-06-12", # Format: YYYY-MM-DD
strike_price="25000",
right="put",
product_type="options",
get_market_depth=False,
get_exchange_quotes=True,
)
threading.Event().wait()`
Feel free to connect on vmpatel328@gmail.com if more details needed.
WR,
Vivek Patel.
Hi Breeze Team,
I am writing to report a bug encountered while using the Breeze-Python-SDK.
Issue Description:
When attempting to establish a websocket connection using the SDK, the following exception is raised:
Exception(except_message.LIVESTREAM_SOCKET_CONNECTION_DISCONNECTED.value) Exception: Failed to connect to live stream.
#Below is the code
`
from breeze_connect import BreezeConnect
from time import sleep
import os
import threading
api_key = os.getenv("BREEZE_API_KEY")
api_secret = os.getenv("BREEZE_API_SECRET")
session_token = "51787546"
breeze = BreezeConnect(api_key=api_key)
def on_ticks(tick):
print("Ticks: {}".format(tick))
breeze.on_ticks = on_ticks
breeze.generate_session(api_secret=api_secret, session_token=session_token)
]
breeze.ws_connect()
sleep(2) # Wait for connection to establish
breeze.subscribe_feeds(
exchange_code="NFO",
stock_code="NIFTY",
expiry_date="2025-06-12", # Format: YYYY-MM-DD
strike_price="25000",
right="put",
product_type="options",
get_market_depth=False,
get_exchange_quotes=True,
)
threading.Event().wait()`
Feel free to connect on vmpatel328@gmail.com if more details needed.
WR,
Vivek Patel.