hyperquant 0.74__py3-none-any.whl → 0.76__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/lbank.py
CHANGED
@@ -223,7 +223,31 @@ class Lbank:
|
|
223
223
|
page_index: int = 1,
|
224
224
|
page_size: int = 20,
|
225
225
|
) -> dict[str, Any]:
|
226
|
-
"""
|
226
|
+
"""
|
227
|
+
返回值示例:
|
228
|
+
|
229
|
+
.. code:: json
|
230
|
+
|
231
|
+
{
|
232
|
+
"order_id": "1000632478428573",
|
233
|
+
"instrument_id": "SOLUSDT",
|
234
|
+
"position_id": "1000632478428573",
|
235
|
+
"direction": "0",
|
236
|
+
"offset_flag": "0",
|
237
|
+
"trade_time": 1760123456,
|
238
|
+
"avg_price": 182.5,
|
239
|
+
"volume": 0.03,
|
240
|
+
"turnover": 5.475,
|
241
|
+
"fee": 0.003285,
|
242
|
+
"trade_count": 1
|
243
|
+
}
|
244
|
+
|
245
|
+
如果没有订单成交返回
|
246
|
+
{
|
247
|
+
"order_id": "1000632478428573",
|
248
|
+
"trade_count": 0
|
249
|
+
}
|
250
|
+
"""
|
227
251
|
|
228
252
|
if not order_id:
|
229
253
|
raise ValueError("order_id is required to query order statistics")
|
@@ -440,9 +464,7 @@ class Lbank:
|
|
440
464
|
# logger.warning("Price is ignored for market orders")
|
441
465
|
pass
|
442
466
|
|
443
|
-
|
444
|
-
# payload["LocalID"] = client_order_id
|
445
|
-
print(payload)
|
467
|
+
|
446
468
|
res = await self.client.post(
|
447
469
|
f"{self.front_api}/cfd/cff/v1/SendOrderInsert",
|
448
470
|
json=payload,
|
@@ -274,10 +274,14 @@ class Position(DataStore):
|
|
274
274
|
bus_id = entry.get("BusinessNo")
|
275
275
|
if not position_id:
|
276
276
|
return None
|
277
|
-
|
278
|
-
|
279
|
-
side =
|
280
|
-
|
277
|
+
|
278
|
+
q = float(entry.get("Position", 0))
|
279
|
+
side = "net"
|
280
|
+
if q > 0:
|
281
|
+
side = "long"
|
282
|
+
elif q < 0:
|
283
|
+
side = "short"
|
284
|
+
|
281
285
|
return {
|
282
286
|
"position_id": position_id,
|
283
287
|
"bus_id": bus_id,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hyperquant
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.76
|
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
|
@@ -8,7 +8,7 @@ hyperquant/broker/auth.py,sha256=Wst7mTBuUS2BQ5hZd0a8FNNs5Uc01ac9WzJpseTuyAY,767
|
|
8
8
|
hyperquant/broker/bitget.py,sha256=PEzULGJJQeQ91TKa4F56WhEpcnUHC3WpIx1pi5UXpVQ,9182
|
9
9
|
hyperquant/broker/edgex.py,sha256=TqUO2KRPLN_UaxvtLL6HnA9dAQXC1sGxOfqTHd6W5k8,18378
|
10
10
|
hyperquant/broker/hyperliquid.py,sha256=7MxbI9OyIBcImDelPJu-8Nd53WXjxPB5TwE6gsjHbto,23252
|
11
|
-
hyperquant/broker/lbank.py,sha256=
|
11
|
+
hyperquant/broker/lbank.py,sha256=lWpRH4SQR_Ock096MEFZB4917KwQ1aHQxGPKRfN15XM,18995
|
12
12
|
hyperquant/broker/ourbit.py,sha256=NUcDSIttf-HGWzoW1uBTrGLPHlkuemMjYCm91MigTno,18228
|
13
13
|
hyperquant/broker/ws.py,sha256=9Zu5JSLj-ylYEVmFmRwvZDDnVYKwb37cLHfZzA0AZGc,2200
|
14
14
|
hyperquant/broker/lib/edgex_sign.py,sha256=lLUCmY8HHRLfLKyGrlTJYaBlSHPsIMWg3EZnQJKcmyk,95785
|
@@ -18,12 +18,12 @@ hyperquant/broker/lib/util.py,sha256=iMU1qF0CHj5zzlIMEQGwjz-qtEVosEe7slXOCuB7Rcw
|
|
18
18
|
hyperquant/broker/models/bitget.py,sha256=0RwDY75KrJb-c-oYoMxbqxWfsILe-n_Npojz4UFUq7c,11389
|
19
19
|
hyperquant/broker/models/edgex.py,sha256=vPAkceal44cjTYKQ_0BoNAskOpmkno_Yo1KxgMLPc6Y,33954
|
20
20
|
hyperquant/broker/models/hyperliquid.py,sha256=c4r5739ibZfnk69RxPjQl902AVuUOwT8RNvKsMtwXBY,9459
|
21
|
-
hyperquant/broker/models/lbank.py,sha256=
|
21
|
+
hyperquant/broker/models/lbank.py,sha256=7B1NHusI6E5JLhj9Vzk0vzX8Zne3vmAEolGQicSiFw0,19076
|
22
22
|
hyperquant/broker/models/ourbit.py,sha256=xMcbuCEXd3XOpPBq0RYF2zpTFNnxPtuNJZCexMZVZ1k,41965
|
23
23
|
hyperquant/datavison/_util.py,sha256=92qk4vO856RqycO0YqEIHJlEg-W9XKapDVqAMxe6rbw,533
|
24
24
|
hyperquant/datavison/binance.py,sha256=3yNKTqvt_vUQcxzeX4ocMsI5k6Q6gLZrvgXxAEad6Kc,5001
|
25
25
|
hyperquant/datavison/coinglass.py,sha256=PEjdjISP9QUKD_xzXNzhJ9WFDTlkBrRQlVL-5pxD5mo,10482
|
26
26
|
hyperquant/datavison/okx.py,sha256=yg8WrdQ7wgWHNAInIgsWPM47N3Wkfr253169IPAycAY,6898
|
27
|
-
hyperquant-0.
|
28
|
-
hyperquant-0.
|
29
|
-
hyperquant-0.
|
27
|
+
hyperquant-0.76.dist-info/METADATA,sha256=NfNMp_dfAMLYjQPq2VzuCzemwD3_xWXTQ_Jsqa29v4c,4317
|
28
|
+
hyperquant-0.76.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
29
|
+
hyperquant-0.76.dist-info/RECORD,,
|
File without changes
|