hyperquant 0.38__tar.gz → 0.39__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.
Files changed (30) hide show
  1. {hyperquant-0.38 → hyperquant-0.39}/PKG-INFO +1 -1
  2. {hyperquant-0.38 → hyperquant-0.39}/pyproject.toml +1 -1
  3. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/models/ourbit.py +6 -1
  4. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/ws.py +6 -0
  5. {hyperquant-0.38 → hyperquant-0.39}/tmp.py +5 -4
  6. {hyperquant-0.38 → hyperquant-0.39}/uv.lock +1 -1
  7. {hyperquant-0.38 → hyperquant-0.39}/.gitignore +0 -0
  8. {hyperquant-0.38 → hyperquant-0.39}/.python-version +0 -0
  9. {hyperquant-0.38 → hyperquant-0.39}/README.md +0 -0
  10. {hyperquant-0.38 → hyperquant-0.39}/data/logs/notikit.log +0 -0
  11. {hyperquant-0.38 → hyperquant-0.39}/pub.sh +0 -0
  12. {hyperquant-0.38 → hyperquant-0.39}/requirements-dev.lock +0 -0
  13. {hyperquant-0.38 → hyperquant-0.39}/requirements.lock +0 -0
  14. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/__init__.py +0 -0
  15. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/auth.py +0 -0
  16. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/hyperliquid.py +0 -0
  17. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/lib/hpstore.py +0 -0
  18. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/lib/hyper_types.py +0 -0
  19. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/models/hyperliquid.py +0 -0
  20. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/broker/ourbit.py +0 -0
  21. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/core.py +0 -0
  22. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/datavison/_util.py +0 -0
  23. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/datavison/binance.py +0 -0
  24. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/datavison/coinglass.py +0 -0
  25. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/datavison/okx.py +0 -0
  26. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/db.py +0 -0
  27. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/draw.py +0 -0
  28. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/logkit.py +0 -0
  29. {hyperquant-0.38 → hyperquant-0.39}/src/hyperquant/notikit.py +0 -0
  30. {hyperquant-0.38 → hyperquant-0.39}/test.py +0 -0
@@ -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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hyperquant"
3
- version = "0.38"
3
+ version = "0.39"
4
4
  description = "A minimal yet hyper-efficient backtesting framework for quantitative trading"
5
5
  authors = [
6
6
  { name = "MissinA", email = "1421329142@qq.com" }
@@ -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
 
@@ -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
@@ -22,11 +22,12 @@ async def main():
22
22
  ob_spot = OurbitSpot(client)
23
23
  await ob_spot.__aenter__()
24
24
  await ob_spot.sub_personal()
25
- await ob_spot.update('balance')
25
+ await ob_spot.update('ticker')
26
+ print(ob_spot.store.ticker.find())
26
27
 
27
- while True:
28
- await ob_spot.store.balance.wait()
29
- print(ob_spot.store.balance.find())
28
+ # while True:
29
+ # await ob_spot.store.balance.wait()
30
+ # print(ob_spot.store.balance.find())
30
31
  return
31
32
 
32
33
  await store.initialize(
@@ -530,7 +530,7 @@ wheels = [
530
530
 
531
531
  [[package]]
532
532
  name = "hyperquant"
533
- version = "0.37"
533
+ version = "0.38"
534
534
  source = { editable = "." }
535
535
  dependencies = [
536
536
  { name = "aiohttp" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes