hyperquant 0.53__tar.gz → 0.54__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.
- {hyperquant-0.53 → hyperquant-0.54}/PKG-INFO +1 -1
- {hyperquant-0.53 → hyperquant-0.54}/pyproject.toml +1 -1
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/models/ourbit.py +4 -4
- {hyperquant-0.53 → hyperquant-0.54}/tests/test_ourbit.py +5 -3
- {hyperquant-0.53 → hyperquant-0.54}/uv.lock +1 -1
- {hyperquant-0.53 → hyperquant-0.54}/.gitignore +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/.python-version +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/README.md +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/apis.json +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/backtest_tmp.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/data/alpine_smoke.log +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/data/logs/notikit.log +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/data/logs/test_order_sync.log +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/deals.json +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/pnl_chart.html +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/pub.sh +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/requirements-dev.lock +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/requirements.lock +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/__init__.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/auth.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/hyperliquid.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/lib/hpstore.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/lib/hyper_types.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/models/hyperliquid.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/ourbit.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/broker/ws.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/core.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/datavison/_util.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/datavison/binance.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/datavison/coinglass.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/datavison/okx.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/db.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/draw.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/logkit.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/src/hyperquant/notikit.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/test.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/test_draw.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/test_lbank.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/test_order_sync.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/test_store.py +0 -0
- {hyperquant-0.53 → hyperquant-0.54}/tests/tmp.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hyperquant
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.54
|
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
|
@@ -55,7 +55,7 @@ class Book(DataStore):
|
|
55
55
|
self._find_and_delete({"s": symbol})
|
56
56
|
|
57
57
|
# 处理买卖盘数据
|
58
|
-
for side_id, levels in (("
|
58
|
+
for side_id, levels in (("b", bids), ("a", asks)):
|
59
59
|
for i, level in enumerate(levels):
|
60
60
|
# level格式: [price, size, count]
|
61
61
|
if len(level) >= 3:
|
@@ -420,7 +420,7 @@ class OurbitSwapDataStore(DataStoreCollection):
|
|
420
420
|
|
421
421
|
Keys: ("s", "S", "p")
|
422
422
|
- s: 交易对符号,如 "BTC_USDT"
|
423
|
-
- S: 买卖方向,"
|
423
|
+
- S: 买卖方向,"a" 表示卖单(ask),"b" 表示买单(bid)
|
424
424
|
- p: 价格
|
425
425
|
|
426
426
|
Data structure:
|
@@ -430,7 +430,7 @@ class OurbitSwapDataStore(DataStoreCollection):
|
|
430
430
|
[
|
431
431
|
{
|
432
432
|
"s": "BTC_USDT", # 交易对符号
|
433
|
-
"S": "
|
433
|
+
"S": "a", # 卖单方向(ask)
|
434
434
|
"p": "110152.5", # 价格
|
435
435
|
"q": "53539", # 数量
|
436
436
|
"ct": 1, # 该价格的订单数量
|
@@ -438,7 +438,7 @@ class OurbitSwapDataStore(DataStoreCollection):
|
|
438
438
|
},
|
439
439
|
{
|
440
440
|
"s": "BTC_USDT", # 交易对符号
|
441
|
-
"S": "
|
441
|
+
"S": "b", # 买单方向(bid)
|
442
442
|
"p": "110152.4", # 价格
|
443
443
|
"q": "76311", # 数量
|
444
444
|
"ct": 1, # 该价格的订单数量
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import pybotters
|
2
2
|
|
3
3
|
from hyperquant.broker.ourbit import OurbitSpot
|
4
|
-
from hyperquant.broker.ourbit import
|
4
|
+
from hyperquant.broker.ourbit import OurbitSwap
|
5
5
|
|
6
6
|
async def download_orders():
|
7
7
|
async with pybotters.Client(
|
@@ -61,7 +61,7 @@ async def test_detail():
|
|
61
61
|
'name': 'OPEN'
|
62
62
|
}))
|
63
63
|
|
64
|
-
async def
|
64
|
+
async def test_ourbit_wrap():
|
65
65
|
async with pybotters.Client(
|
66
66
|
apis={
|
67
67
|
"ourbit": [
|
@@ -69,7 +69,9 @@ async def test_query_orders():
|
|
69
69
|
]
|
70
70
|
}
|
71
71
|
) as client:
|
72
|
-
ob =
|
72
|
+
ob = OurbitSwap(client)
|
73
|
+
await ob.__aenter__()
|
74
|
+
print(ob.store.detail.find())
|
73
75
|
|
74
76
|
if __name__ == "__main__":
|
75
77
|
import asyncio
|
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
|