hyperquant 0.57__tar.gz → 0.59__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 (38) hide show
  1. {hyperquant-0.57 → hyperquant-0.59}/PKG-INFO +1 -1
  2. {hyperquant-0.57 → hyperquant-0.59}/pyproject.toml +1 -1
  3. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/models/ourbit.py +1 -1
  4. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/ourbit.py +5 -1
  5. {hyperquant-0.57 → hyperquant-0.59}/tests/test_ourbit.py +24 -9
  6. {hyperquant-0.57 → hyperquant-0.59}/uv.lock +1 -1
  7. {hyperquant-0.57 → hyperquant-0.59}/.gitignore +0 -0
  8. {hyperquant-0.57 → hyperquant-0.59}/.python-version +0 -0
  9. {hyperquant-0.57 → hyperquant-0.59}/README.md +0 -0
  10. {hyperquant-0.57 → hyperquant-0.59}/apis.json +0 -0
  11. {hyperquant-0.57 → hyperquant-0.59}/backtest_tmp.py +0 -0
  12. {hyperquant-0.57 → hyperquant-0.59}/data/alpine_smoke.log +0 -0
  13. {hyperquant-0.57 → hyperquant-0.59}/data/logs/notikit.log +0 -0
  14. {hyperquant-0.57 → hyperquant-0.59}/data/logs/test_order_sync.log +0 -0
  15. {hyperquant-0.57 → hyperquant-0.59}/deals.json +0 -0
  16. {hyperquant-0.57 → hyperquant-0.59}/pnl_chart.html +0 -0
  17. {hyperquant-0.57 → hyperquant-0.59}/pub.sh +0 -0
  18. {hyperquant-0.57 → hyperquant-0.59}/requirements-dev.lock +0 -0
  19. {hyperquant-0.57 → hyperquant-0.59}/requirements.lock +0 -0
  20. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/__init__.py +0 -0
  21. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/auth.py +0 -0
  22. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/hyperliquid.py +0 -0
  23. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/lib/hpstore.py +0 -0
  24. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/lib/hyper_types.py +0 -0
  25. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/models/hyperliquid.py +0 -0
  26. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/broker/ws.py +0 -0
  27. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/core.py +0 -0
  28. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/datavison/_util.py +0 -0
  29. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/datavison/binance.py +0 -0
  30. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/datavison/coinglass.py +0 -0
  31. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/datavison/okx.py +0 -0
  32. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/db.py +0 -0
  33. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/draw.py +0 -0
  34. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/logkit.py +0 -0
  35. {hyperquant-0.57 → hyperquant-0.59}/src/hyperquant/notikit.py +0 -0
  36. {hyperquant-0.57 → hyperquant-0.59}/tests/test_draw.py +0 -0
  37. {hyperquant-0.57 → hyperquant-0.59}/tests/test_lbank.py +0 -0
  38. {hyperquant-0.57 → hyperquant-0.59}/tests/tmp.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperquant
3
- Version: 0.57
3
+ Version: 0.59
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.57"
3
+ version = "0.59"
4
4
  description = "A minimal yet hyper-efficient backtesting framework for quantitative trading"
5
5
  authors = [
6
6
  { name = "MissinA", email = "1421329142@qq.com" }
@@ -213,7 +213,7 @@ class Detail(DataStore):
213
213
  "io": detail.get("io"),
214
214
  "contract_sz": detail.get("cs"),
215
215
  "minv": detail.get("minV"),
216
- "maxv": detail.get("maxV")
216
+ "maxv": detail.get("maxV"),
217
217
  "online_time": detail.get("tcd")
218
218
  }
219
219
  )
@@ -70,11 +70,15 @@ class OurbitSwap:
70
70
 
71
71
  for symbol in symbols:
72
72
  step = self.store.detail.find({"symbol": symbol})[0].get("tick_size")
73
+ step_str = str(Decimal(str(step)).normalize())
73
74
 
74
75
  send_jsons.append(
75
76
  {
76
77
  "method": "sub.depth.step",
77
- "param": {"symbol": symbol, "step": str(step)},
78
+ "param": {
79
+ "symbol": symbol,
80
+ "step": step_str,
81
+ },
78
82
  }
79
83
  )
80
84
 
@@ -190,21 +190,36 @@ async def test_order_close_swap():
190
190
  # await ob.sub_personal() # 私有频道
191
191
  # result = await order_sync( ob, symbol="SOL_USDT", side="buy", order_type="market", usdt_amount=8, price=200, window_sec=3)
192
192
  # print(result)
193
- # oid = await ob.place_order(
194
- # "SOL_USDT",
195
- # "buy",
196
- # order_type="market",
197
- # size=1
198
- # )
193
+ oid = await ob.place_order(
194
+ "SOL_USDT",
195
+ "buy",
196
+ order_type="limit_GTC",
197
+ size=1,
198
+ price=200
199
+ )
200
+
201
+ print(oid)
199
202
 
200
203
  # print(oid)
201
204
  # await ob.update('position')
202
205
  # print(ob.store.position.find())
203
206
 
204
- await ob.place_order('SOL_USDT', 'close_sell', 1, position_id=6062178)
205
-
207
+ # await ob.place_order('SOL_USDT', 'close_sell', 1, position_id=6062178)
208
+
209
+ async def test_sub_book():
210
+ async with pybotters.Client(
211
+ ) as client:
212
+ ob = OurbitSwap(client)
213
+ await ob.__aenter__()
214
+ ob.store.book.limit = 1
215
+ await ob.sub_orderbook(["BIO_USDT", "MAIGA_USDT", "TST_USDT"]) # 订单簿频道
216
+ async for change in ob.store.book.watch():
217
+ print(change.operation, change.data)
218
+ # while True:
219
+ # await asyncio.sleep(1)
220
+ # print(ob.store.book.find())
206
221
 
207
222
 
208
223
  if __name__ == "__main__":
209
224
  import asyncio
210
- asyncio.run(test_order_close_swap())
225
+ asyncio.run(test_sub_book())
@@ -530,7 +530,7 @@ wheels = [
530
530
 
531
531
  [[package]]
532
532
  name = "hyperquant"
533
- version = "0.56"
533
+ version = "0.58"
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes