quantplay 2.1.63__tar.gz → 2.1.64__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quantplay-2.1.63 → quantplay-2.1.64}/PKG-INFO +1 -1
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/aliceblue.py +25 -9
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/ft_utils/ft_noren.py +1 -1
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.1.63 → quantplay-2.1.64}/setup.py +1 -1
- {quantplay-2.1.63 → quantplay-2.1.64}/README.md +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/pyproject.toml +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/angelone_utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/angelone_utils/angeloneWS.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/breeze/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/breeze/breeze_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/broker_factory.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/dhan.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/icici_direct.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/jainam_xts.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/kotak.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/kotak_utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/kotak_utils/kotak_ws.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/kotak_utils/kotak_ws_lib.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/noren.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils_v2/ConnectV2.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils_v2/InteractiveSocketClientV2.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils_v2/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/core/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/core/strategy.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/indicator/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/indicator/iv.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/broker.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/broker_response.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/generics.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/model/order_event.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/py.typed +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/strategy/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/strategy/iv_spike.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/strategy/obuy.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/caching.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/constant.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay/wrapper/redis.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/setup.cfg +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/tests/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/tests/conftest.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.1.63 → quantplay-2.1.64}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -726,39 +726,55 @@ class Aliceblue(Broker):
|
|
|
726
726
|
logger.error("[ORDER_UPDATE_PROCESSING_FAILED] {}".format(e))
|
|
727
727
|
traceback.print_exc()
|
|
728
728
|
|
|
729
|
-
def start_order_websocket(self):
|
|
729
|
+
def start_order_websocket(self) -> None:
|
|
730
730
|
ws_token = self.create_websocket_token()
|
|
731
731
|
print(f"{self.user_id}: WebSocket connection established.")
|
|
732
732
|
headers = {"Content-Type": "application/json"}
|
|
733
733
|
payload = {"orderToken": ws_token, "userId": self.user_id}
|
|
734
734
|
session_data = json.dumps(payload)
|
|
735
735
|
|
|
736
|
-
|
|
736
|
+
stop_event = threading.Event()
|
|
737
|
+
|
|
738
|
+
def on_message(ws: websocket.WebSocket, message: Any) -> None:
|
|
737
739
|
order = json.loads(message)
|
|
738
740
|
|
|
741
|
+
if order.get("status", "") == "Ok":
|
|
742
|
+
return
|
|
743
|
+
|
|
739
744
|
if order["t"] == "om":
|
|
740
745
|
self.handle_order_update(order)
|
|
741
746
|
|
|
742
|
-
def on_error(ws: websocket.WebSocket, error: Any):
|
|
747
|
+
def on_error(ws: websocket.WebSocket, error: Any) -> None:
|
|
743
748
|
if type(ws) is not websocket.WebSocketApp: # type: ignore
|
|
744
749
|
error = ws
|
|
745
750
|
|
|
746
|
-
|
|
751
|
+
traceback.print_exc()
|
|
752
|
+
logger.error(f"{self.user_id}: WebSocket Error. Reason: {error}")
|
|
747
753
|
|
|
748
|
-
def on_close(
|
|
754
|
+
def on_close(
|
|
755
|
+
ws: websocket.WebSocket, close_status_code: int, close_msg: str
|
|
756
|
+
) -> None:
|
|
757
|
+
traceback.print_exc()
|
|
749
758
|
logger.error(
|
|
750
759
|
f"{self.user_id}: WebSocket Closed. Status code: {close_status_code}, Reason: {close_msg}"
|
|
751
760
|
)
|
|
752
761
|
|
|
753
|
-
|
|
762
|
+
time.sleep(2)
|
|
763
|
+
|
|
764
|
+
stop_event.set()
|
|
765
|
+
self.stream_order_data()
|
|
766
|
+
|
|
767
|
+
return
|
|
768
|
+
|
|
769
|
+
def on_open(ws: websocket.WebSocket) -> None:
|
|
754
770
|
print(f"{self.user_id}: WebSocket Connection Opened")
|
|
755
771
|
ws.send(session_data)
|
|
756
772
|
threading.Thread(
|
|
757
773
|
target=heart_beat_connection, args=(ws,), daemon=True
|
|
758
774
|
).start()
|
|
759
775
|
|
|
760
|
-
def heart_beat_connection(ws: websocket.WebSocket):
|
|
761
|
-
while
|
|
776
|
+
def heart_beat_connection(ws: websocket.WebSocket) -> None:
|
|
777
|
+
while not stop_event.is_set():
|
|
762
778
|
try:
|
|
763
779
|
payload = {"heartbeat": "h", "userId": self.user_id}
|
|
764
780
|
hearbeat_data = json.dumps(payload)
|
|
@@ -779,6 +795,6 @@ class Aliceblue(Broker):
|
|
|
779
795
|
)
|
|
780
796
|
ws.run_forever() # type: ignore
|
|
781
797
|
|
|
782
|
-
def stream_order_data(self):
|
|
798
|
+
def stream_order_data(self) -> None:
|
|
783
799
|
thread = threading.Thread(target=self.start_order_websocket, daemon=True)
|
|
784
800
|
thread.start()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quantplay-2.1.63 → quantplay-2.1.64}/quantplay/broker/xts_utils_v2/InteractiveSocketClientV2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|