hyperquant 0.38__py3-none-any.whl → 0.39__py3-none-any.whl

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.
@@ -1016,9 +1016,14 @@ class OurbitSpotDataStore(DataStoreCollection):
1016
1016
 
1017
1017
  def onmessage(self, msg: Item, ws: ClientWebSocketResponse | None = None) -> None:
1018
1018
  channel = msg.get("c")
1019
-
1019
+ if 'msg' in msg:
1020
+ if 'invalid' in msg['msg']:
1021
+ logger.warning(f"WebSocket message invalid: {msg['msg']}")
1022
+ return
1023
+
1020
1024
  if channel is None:
1021
1025
  return
1026
+
1022
1027
  if 'increase.aggre.depth' in channel:
1023
1028
  self.book._on_message(msg)
1024
1029
 
hyperquant/broker/ws.py CHANGED
@@ -11,8 +11,14 @@ class Heartbeat:
11
11
  while not ws.closed:
12
12
  await ws.send_str('{"method":"ping"}')
13
13
  await asyncio.sleep(10.0)
14
+
15
+ async def ourbit_spot(ws: pybotters.ws.ClientWebSocketResponse):
16
+ while not ws.closed:
17
+ await ws.send_str('{"method":"ping"}')
18
+ await asyncio.sleep(10.0)
14
19
 
15
20
  pybotters.ws.HeartbeatHosts.items['futures.ourbit.com'] = Heartbeat.ourbit
21
+ pybotters.ws.HeartbeatHosts.items['www.ourbit.com'] = Heartbeat.ourbit_spot
16
22
 
17
23
  class WssAuth:
18
24
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperquant
3
- Version: 0.38
3
+ Version: 0.39
4
4
  Summary: A minimal yet hyper-efficient backtesting framework for quantitative trading
5
5
  Project-URL: Homepage, https://github.com/yourusername/hyperquant
6
6
  Project-URL: Issues, https://github.com/yourusername/hyperquant/issues
@@ -7,15 +7,15 @@ hyperquant/notikit.py,sha256=x5yAZ_tAvLQRXcRbcg-VabCaN45LUhvlTZnUqkIqfAA,3596
7
7
  hyperquant/broker/auth.py,sha256=oA9Yw1I59-u0Tnoj2e4wUup5q8V5T2qpga5RKbiAiZI,2614
8
8
  hyperquant/broker/hyperliquid.py,sha256=7MxbI9OyIBcImDelPJu-8Nd53WXjxPB5TwE6gsjHbto,23252
9
9
  hyperquant/broker/ourbit.py,sha256=zXPJmdxQV7PyJIG_eX5dd6MBKy1xcUUggB7rZIAFouY,15835
10
- hyperquant/broker/ws.py,sha256=QlidyxbVRvY_muOt3t4ycWcRP693zOTDJu2cLMo6PkI,1287
10
+ hyperquant/broker/ws.py,sha256=umRzxwCaZaRIgIq4YY-AuA0wCXFT0uOBmQbIXFY8CK0,1555
11
11
  hyperquant/broker/lib/hpstore.py,sha256=LnLK2zmnwVvhEbLzYI-jz_SfYpO1Dv2u2cJaRAb84D8,8296
12
12
  hyperquant/broker/lib/hyper_types.py,sha256=HqjjzjUekldjEeVn6hxiWA8nevAViC2xHADOzDz9qyw,991
13
13
  hyperquant/broker/models/hyperliquid.py,sha256=c4r5739ibZfnk69RxPjQl902AVuUOwT8RNvKsMtwXBY,9459
14
- hyperquant/broker/models/ourbit.py,sha256=uh23LIgElDbXu8ps1mRyUEUE_7rytQkcu278lJYJ3-s,37321
14
+ hyperquant/broker/models/ourbit.py,sha256=fC0yDPyWb1kAfLRmFh4bOnHga72l4mMoM-CyjKYyFtw,37492
15
15
  hyperquant/datavison/_util.py,sha256=92qk4vO856RqycO0YqEIHJlEg-W9XKapDVqAMxe6rbw,533
16
16
  hyperquant/datavison/binance.py,sha256=3yNKTqvt_vUQcxzeX4ocMsI5k6Q6gLZrvgXxAEad6Kc,5001
17
17
  hyperquant/datavison/coinglass.py,sha256=PEjdjISP9QUKD_xzXNzhJ9WFDTlkBrRQlVL-5pxD5mo,10482
18
18
  hyperquant/datavison/okx.py,sha256=yg8WrdQ7wgWHNAInIgsWPM47N3Wkfr253169IPAycAY,6898
19
- hyperquant-0.38.dist-info/METADATA,sha256=n9rIctGu54x9VTLHoSsRf2mtFNlen8lxqZrZmtgeSeI,4317
20
- hyperquant-0.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
- hyperquant-0.38.dist-info/RECORD,,
19
+ hyperquant-0.39.dist-info/METADATA,sha256=HC7jvAznxXIr341r7P2eEe8qqsoaZAq-TeRGFDoyN4Q,4317
20
+ hyperquant-0.39.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ hyperquant-0.39.dist-info/RECORD,,