hyperquant 0.91__py3-none-any.whl → 0.92__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.
hyperquant/broker/coinup.py
CHANGED
|
@@ -209,27 +209,27 @@ class Coinup:
|
|
|
209
209
|
|
|
210
210
|
async def sub_orderbook(
|
|
211
211
|
self,
|
|
212
|
-
|
|
212
|
+
symbols: Sequence[str] | str,
|
|
213
213
|
*,
|
|
214
214
|
depth_step: str = "step0",
|
|
215
215
|
depth_limit: int | None = None,
|
|
216
216
|
) -> pybotters.ws.WebSocketApp:
|
|
217
217
|
"""订阅订单簿深度频道。
|
|
218
218
|
|
|
219
|
-
参数 ``channels`` 支持 ``subSymbol`` 或完整频道名称:
|
|
220
|
-
|
|
221
219
|
- ``"e_wlfiusdt"`` -> 发送 ``market_e_wlfiusdt_depth_step0``
|
|
222
220
|
- ``"market_e_wlfiusdt_depth_step0"`` -> 原样发送
|
|
223
221
|
"""
|
|
224
222
|
|
|
225
|
-
if isinstance(
|
|
226
|
-
|
|
223
|
+
if isinstance(symbols, str):
|
|
224
|
+
symbols = [symbols]
|
|
227
225
|
|
|
228
226
|
payloads = []
|
|
229
|
-
for
|
|
230
|
-
ch =
|
|
227
|
+
for symbol in symbols:
|
|
228
|
+
ch = symbol.lower()
|
|
229
|
+
# 去除特殊符号
|
|
230
|
+
ch = ch.replace("-", "").replace("_", "")
|
|
231
231
|
if not ch.startswith("market_"):
|
|
232
|
-
ch = f"
|
|
232
|
+
ch = f"market_e_{ch}_depth_{depth_step}"
|
|
233
233
|
payloads.append(
|
|
234
234
|
{
|
|
235
235
|
"event": "sub",
|
|
@@ -239,6 +239,7 @@ class Coinup:
|
|
|
239
239
|
},
|
|
240
240
|
}
|
|
241
241
|
)
|
|
242
|
+
print(payloads)
|
|
242
243
|
|
|
243
244
|
if not payloads:
|
|
244
245
|
raise ValueError("channels must not be empty")
|
|
@@ -32,13 +32,14 @@ class Book(DataStore):
|
|
|
32
32
|
bids = bids[: self.limit]
|
|
33
33
|
chanel = msg["channel"]
|
|
34
34
|
symbol = chanel.split("_")[2].upper()
|
|
35
|
+
symbol = symbol.replace("USDT", "-USDT")
|
|
35
36
|
asks = [
|
|
36
37
|
{"s": symbol, "S": "a", "p": float(price), "q": float(quantity)} for price, quantity in asks
|
|
37
38
|
]
|
|
38
39
|
bids = [
|
|
39
40
|
{"s": symbol, "S": "b", "p": float(price), "q": float(quantity)} for price, quantity in bids
|
|
40
41
|
]
|
|
41
|
-
self.
|
|
42
|
+
self._find_and_delete({"s": symbol})
|
|
42
43
|
self._insert(asks + bids)
|
|
43
44
|
|
|
44
45
|
class Detail(DataStore):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperquant
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.92
|
|
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
|
|
@@ -6,7 +6,7 @@ hyperquant/logkit.py,sha256=nUo7nx5eONvK39GOhWwS41zNRL756P2J7-5xGzwXnTY,8462
|
|
|
6
6
|
hyperquant/notikit.py,sha256=x5yAZ_tAvLQRXcRbcg-VabCaN45LUhvlTZnUqkIqfAA,3596
|
|
7
7
|
hyperquant/broker/auth.py,sha256=xNZEQP0LRRV9BkT2uXBJ-vFfeahUnRVq1bjIT6YbQu8,10089
|
|
8
8
|
hyperquant/broker/bitget.py,sha256=X_S0LKZ7FZAEb6oEMr1vdGP1fondzK74BhmNTpRDSEA,9488
|
|
9
|
-
hyperquant/broker/coinup.py,sha256=
|
|
9
|
+
hyperquant/broker/coinup.py,sha256=I9qWeol1t-0GWUycc8CjOux0K4KlijN3RvPHET0vJFw,20388
|
|
10
10
|
hyperquant/broker/coinw.py,sha256=SnJU0vASh77rfcpMGWaIfTblQSjQk3vjlW_4juYdbcs,17214
|
|
11
11
|
hyperquant/broker/edgex.py,sha256=TqUO2KRPLN_UaxvtLL6HnA9dAQXC1sGxOfqTHd6W5k8,18378
|
|
12
12
|
hyperquant/broker/hyperliquid.py,sha256=7MxbI9OyIBcImDelPJu-8Nd53WXjxPB5TwE6gsjHbto,23252
|
|
@@ -18,7 +18,7 @@ hyperquant/broker/lib/hpstore.py,sha256=LnLK2zmnwVvhEbLzYI-jz_SfYpO1Dv2u2cJaRAb8
|
|
|
18
18
|
hyperquant/broker/lib/hyper_types.py,sha256=HqjjzjUekldjEeVn6hxiWA8nevAViC2xHADOzDz9qyw,991
|
|
19
19
|
hyperquant/broker/lib/util.py,sha256=iMU1qF0CHj5zzlIMEQGwjz-qtEVosEe7slXOCuB7Rcw,566
|
|
20
20
|
hyperquant/broker/models/bitget.py,sha256=0RwDY75KrJb-c-oYoMxbqxWfsILe-n_Npojz4UFUq7c,11389
|
|
21
|
-
hyperquant/broker/models/coinup.py,sha256=
|
|
21
|
+
hyperquant/broker/models/coinup.py,sha256=X_ngB2_sgTOdfAZqTyeWvCN03j-0_inZ6ugZKW6hR7k,11173
|
|
22
22
|
hyperquant/broker/models/coinw.py,sha256=LvLMVP7i-qkkTK1ubw8eBkMK2RQmFoKPxdKqmC4IToY,22157
|
|
23
23
|
hyperquant/broker/models/edgex.py,sha256=vPAkceal44cjTYKQ_0BoNAskOpmkno_Yo1KxgMLPc6Y,33954
|
|
24
24
|
hyperquant/broker/models/hyperliquid.py,sha256=c4r5739ibZfnk69RxPjQl902AVuUOwT8RNvKsMtwXBY,9459
|
|
@@ -28,6 +28,6 @@ hyperquant/datavison/_util.py,sha256=92qk4vO856RqycO0YqEIHJlEg-W9XKapDVqAMxe6rbw
|
|
|
28
28
|
hyperquant/datavison/binance.py,sha256=3yNKTqvt_vUQcxzeX4ocMsI5k6Q6gLZrvgXxAEad6Kc,5001
|
|
29
29
|
hyperquant/datavison/coinglass.py,sha256=PEjdjISP9QUKD_xzXNzhJ9WFDTlkBrRQlVL-5pxD5mo,10482
|
|
30
30
|
hyperquant/datavison/okx.py,sha256=yg8WrdQ7wgWHNAInIgsWPM47N3Wkfr253169IPAycAY,6898
|
|
31
|
-
hyperquant-0.
|
|
32
|
-
hyperquant-0.
|
|
33
|
-
hyperquant-0.
|
|
31
|
+
hyperquant-0.92.dist-info/METADATA,sha256=g3CE4Sd5ARP0lqmDHAbg693fqAZTBQUU4bn6tGbgpCk,4382
|
|
32
|
+
hyperquant-0.92.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
hyperquant-0.92.dist-info/RECORD,,
|
|
File without changes
|