unicex 0.13.10__py3-none-any.whl → 0.13.12__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.
- unicex/binance/client.py +93 -75
- {unicex-0.13.10.dist-info → unicex-0.13.12.dist-info}/METADATA +1 -1
- {unicex-0.13.10.dist-info → unicex-0.13.12.dist-info}/RECORD +6 -6
- {unicex-0.13.10.dist-info → unicex-0.13.12.dist-info}/WHEEL +0 -0
- {unicex-0.13.10.dist-info → unicex-0.13.12.dist-info}/licenses/LICENSE +0 -0
- {unicex-0.13.10.dist-info → unicex-0.13.12.dist-info}/top_level.txt +0 -0
unicex/binance/client.py
CHANGED
|
@@ -38,7 +38,6 @@ class Client(BaseClient):
|
|
|
38
38
|
method: RequestMethod,
|
|
39
39
|
signed: bool,
|
|
40
40
|
params: dict[str, Any] | None,
|
|
41
|
-
data: dict[str, Any] | None,
|
|
42
41
|
) -> tuple[dict[str, Any], dict[str, Any] | None]:
|
|
43
42
|
"""Подготавливает payload и заголовки для запроса.
|
|
44
43
|
|
|
@@ -46,13 +45,12 @@ class Client(BaseClient):
|
|
|
46
45
|
- добавляет подпись и все обязательные параметры в заголовки
|
|
47
46
|
|
|
48
47
|
Если signed=False:
|
|
49
|
-
- возвращает только отфильтрованные params
|
|
48
|
+
- возвращает только отфильтрованные params.
|
|
50
49
|
|
|
51
50
|
Параметры:
|
|
52
51
|
method (`RequestMethod`): Метод запроса.
|
|
53
52
|
signed (`bool`): Нужно ли подписывать запрос.
|
|
54
53
|
params (`dict | None`): Параметры для query string.
|
|
55
|
-
data (`dict | None`): Параметры для тела запроса.
|
|
56
54
|
|
|
57
55
|
Возвращает:
|
|
58
56
|
tuple:
|
|
@@ -61,16 +59,18 @@ class Client(BaseClient):
|
|
|
61
59
|
"""
|
|
62
60
|
# Фильтруем параметры от None значений
|
|
63
61
|
params = filter_params(params) if params else {}
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
# Получаем заголовки для запроса
|
|
64
|
+
headers = self._get_headers(method)
|
|
65
65
|
|
|
66
66
|
if not signed:
|
|
67
|
-
return {"params": params
|
|
67
|
+
return {"params": params}, headers
|
|
68
68
|
|
|
69
69
|
if not self.is_authorized():
|
|
70
70
|
raise NotAuthorized("Api key and api secret is required to private endpoints")
|
|
71
71
|
|
|
72
72
|
# Объединяем все параметры в payload
|
|
73
|
-
payload = {**params
|
|
73
|
+
payload = {**params}
|
|
74
74
|
payload["timestamp"] = int(time.time() * 1000)
|
|
75
75
|
payload["recvWindow"] = self._RECV_WINDOW
|
|
76
76
|
|
|
@@ -82,7 +82,6 @@ class Client(BaseClient):
|
|
|
82
82
|
"hex",
|
|
83
83
|
)
|
|
84
84
|
|
|
85
|
-
headers = self._get_headers(method)
|
|
86
85
|
return payload, headers
|
|
87
86
|
|
|
88
87
|
async def _make_request(
|
|
@@ -92,13 +91,12 @@ class Client(BaseClient):
|
|
|
92
91
|
signed: bool = False,
|
|
93
92
|
*,
|
|
94
93
|
params: dict[str, Any] | None = None,
|
|
95
|
-
data: dict[str, Any] | None = None,
|
|
96
94
|
) -> Any:
|
|
97
95
|
"""Выполняет HTTP-запрос к эндпоинтам Binance API.
|
|
98
96
|
|
|
99
97
|
Если signed=True, формируется подпись для приватных endpoint'ов:
|
|
100
|
-
- Если
|
|
101
|
-
- Если
|
|
98
|
+
- Если метод запроса "GET" — подпись добавляется в параметры запроса.
|
|
99
|
+
- Если метод запроса "POST" | "PUT" | "DELETE" — подпись добавляется в тело запроса.
|
|
102
100
|
|
|
103
101
|
Если signed=False, запрос отправляется как публичный.
|
|
104
102
|
|
|
@@ -107,22 +105,15 @@ class Client(BaseClient):
|
|
|
107
105
|
url (`str`): Полный URL эндпоинта Binance API.
|
|
108
106
|
signed (`bool`): Нужно ли подписывать запрос.
|
|
109
107
|
params (`dict | None`): Query-параметры.
|
|
110
|
-
data (`dict | None`): Тело запроса.
|
|
111
108
|
|
|
112
109
|
Возвращает:
|
|
113
110
|
`dict`: Ответ в формате JSON.
|
|
114
111
|
"""
|
|
115
|
-
payload, headers = self._prepare_payload(
|
|
116
|
-
method=method, signed=signed, params=params, data=data
|
|
117
|
-
)
|
|
112
|
+
payload, headers = self._prepare_payload(method=method, signed=signed, params=params)
|
|
118
113
|
|
|
119
114
|
if not signed:
|
|
120
115
|
return await super()._make_request(method=method, url=url, **payload)
|
|
121
116
|
|
|
122
|
-
if data:
|
|
123
|
-
return await super()._make_request(
|
|
124
|
-
method=method, url=url, data=payload, headers=headers
|
|
125
|
-
)
|
|
126
117
|
return await super()._make_request(method=method, url=url, params=payload, headers=headers)
|
|
127
118
|
|
|
128
119
|
async def request(
|
|
@@ -391,7 +382,7 @@ class Client(BaseClient):
|
|
|
391
382
|
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#new-order-trade
|
|
392
383
|
"""
|
|
393
384
|
url = self._BASE_SPOT_URL + "/api/v3/order"
|
|
394
|
-
|
|
385
|
+
params = {
|
|
395
386
|
"symbol": symbol,
|
|
396
387
|
"side": side,
|
|
397
388
|
"type": type,
|
|
@@ -406,8 +397,8 @@ class Client(BaseClient):
|
|
|
406
397
|
"selfTradePreventionMode": self_trade_prevention_mode,
|
|
407
398
|
}
|
|
408
399
|
|
|
409
|
-
# return await self._make_request("POST", url, True,
|
|
410
|
-
return await self._make_request("POST", url, True, params=
|
|
400
|
+
# return await self._make_request("POST", url, True, params=params)
|
|
401
|
+
return await self._make_request("POST", url, True, params=params)
|
|
411
402
|
|
|
412
403
|
async def order_test(
|
|
413
404
|
self,
|
|
@@ -429,7 +420,7 @@ class Client(BaseClient):
|
|
|
429
420
|
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#test-new-order-trade
|
|
430
421
|
"""
|
|
431
422
|
url = self._BASE_SPOT_URL + "/api/v3/order/test"
|
|
432
|
-
|
|
423
|
+
params = {
|
|
433
424
|
"symbol": symbol,
|
|
434
425
|
"side": side,
|
|
435
426
|
"type": type,
|
|
@@ -444,7 +435,7 @@ class Client(BaseClient):
|
|
|
444
435
|
"selfTradePreventionMode": self_trade_prevention_mode,
|
|
445
436
|
}
|
|
446
437
|
|
|
447
|
-
return await self._make_request("POST", url, True,
|
|
438
|
+
return await self._make_request("POST", url, True, params=params)
|
|
448
439
|
|
|
449
440
|
async def order_cancel(
|
|
450
441
|
self,
|
|
@@ -458,14 +449,14 @@ class Client(BaseClient):
|
|
|
458
449
|
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#cancel-order-trade
|
|
459
450
|
"""
|
|
460
451
|
url = self._BASE_SPOT_URL + "/api/v3/order"
|
|
461
|
-
|
|
452
|
+
params = {
|
|
462
453
|
"symbol": symbol,
|
|
463
454
|
"orderId": order_id,
|
|
464
455
|
"origClientOrderId": orig_client_order_id,
|
|
465
456
|
"newClientOrderId": new_client_order_id,
|
|
466
457
|
}
|
|
467
458
|
|
|
468
|
-
return await self._make_request("DELETE", url, True,
|
|
459
|
+
return await self._make_request("DELETE", url, True, params=params)
|
|
469
460
|
|
|
470
461
|
async def orders_cancel_all(self, symbol: str) -> list[dict]:
|
|
471
462
|
"""Отмена всех активных ордеров по символу.
|
|
@@ -473,9 +464,9 @@ class Client(BaseClient):
|
|
|
473
464
|
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#cancel-all-open-orders-on-a-symbol-trade
|
|
474
465
|
"""
|
|
475
466
|
url = self._BASE_SPOT_URL + "/api/v3/openOrders"
|
|
476
|
-
|
|
467
|
+
params = {"symbol": symbol}
|
|
477
468
|
|
|
478
|
-
return await self._make_request("DELETE", url, True,
|
|
469
|
+
return await self._make_request("DELETE", url, True, params=params)
|
|
479
470
|
|
|
480
471
|
async def orders_open(self, symbol: str | None = None) -> list[dict]:
|
|
481
472
|
"""Получение всех активных ордеров.
|
|
@@ -491,42 +482,69 @@ class Client(BaseClient):
|
|
|
491
482
|
self,
|
|
492
483
|
symbol: str,
|
|
493
484
|
side: str,
|
|
494
|
-
quantity:
|
|
495
|
-
price: float,
|
|
496
|
-
stop_price: float,
|
|
497
|
-
stop_limit_price: float | None = None,
|
|
485
|
+
quantity: str,
|
|
498
486
|
list_client_order_id: str | None = None,
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
487
|
+
# ABOVE ORDER
|
|
488
|
+
above_type: str = "TAKE_PROFIT_LIMIT",
|
|
489
|
+
above_client_order_id: str | None = None,
|
|
490
|
+
above_price: str | None = None,
|
|
491
|
+
above_stop_price: str | None = None,
|
|
492
|
+
above_trailing_delta: int | None = None,
|
|
493
|
+
above_time_in_force: str | None = None,
|
|
494
|
+
above_iceberg_qty: str | None = None,
|
|
495
|
+
above_strategy_id: int | None = None,
|
|
496
|
+
above_strategy_type: int | None = None,
|
|
497
|
+
# BELOW ORDER
|
|
498
|
+
below_type: str = "STOP_LOSS_LIMIT",
|
|
499
|
+
below_client_order_id: str | None = None,
|
|
500
|
+
below_price: str | None = None,
|
|
501
|
+
below_stop_price: str | None = None,
|
|
502
|
+
below_trailing_delta: int | None = None,
|
|
503
|
+
below_time_in_force: str | None = None,
|
|
504
|
+
below_iceberg_qty: str | None = None,
|
|
505
|
+
below_strategy_id: int | None = None,
|
|
506
|
+
below_strategy_type: int | None = None,
|
|
507
|
+
# EXTRA
|
|
502
508
|
new_order_resp_type: str | None = None,
|
|
503
509
|
self_trade_prevention_mode: str | None = None,
|
|
504
|
-
limit_iceberg_qty: float | None = None,
|
|
505
|
-
stop_iceberg_qty: float | None = None,
|
|
506
510
|
) -> dict:
|
|
507
|
-
"""Создание OCO
|
|
511
|
+
"""Создание OCO ордера (новая версия).
|
|
508
512
|
|
|
509
|
-
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/
|
|
513
|
+
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#new-order-list---oco-trade
|
|
510
514
|
"""
|
|
511
|
-
url = self._BASE_SPOT_URL + "/api/v3/
|
|
512
|
-
|
|
515
|
+
url = self._BASE_SPOT_URL + "/api/v3/orderList/oco"
|
|
516
|
+
|
|
517
|
+
params = {
|
|
513
518
|
"symbol": symbol,
|
|
514
519
|
"side": side,
|
|
515
520
|
"quantity": quantity,
|
|
516
|
-
"price": price,
|
|
517
|
-
"stopPrice": stop_price,
|
|
518
|
-
"stopLimitPrice": stop_limit_price,
|
|
519
521
|
"listClientOrderId": list_client_order_id,
|
|
520
|
-
|
|
521
|
-
"
|
|
522
|
-
"
|
|
522
|
+
# ABOVE
|
|
523
|
+
"aboveType": above_type,
|
|
524
|
+
"aboveClientOrderId": above_client_order_id,
|
|
525
|
+
"abovePrice": above_price,
|
|
526
|
+
"aboveStopPrice": above_stop_price,
|
|
527
|
+
"aboveTrailingDelta": above_trailing_delta,
|
|
528
|
+
"aboveTimeInForce": above_time_in_force,
|
|
529
|
+
"aboveIcebergQty": above_iceberg_qty,
|
|
530
|
+
"aboveStrategyId": above_strategy_id,
|
|
531
|
+
"aboveStrategyType": above_strategy_type,
|
|
532
|
+
# BELOW
|
|
533
|
+
"belowType": below_type,
|
|
534
|
+
"belowClientOrderId": below_client_order_id,
|
|
535
|
+
"belowPrice": below_price,
|
|
536
|
+
"belowStopPrice": below_stop_price,
|
|
537
|
+
"belowTrailingDelta": below_trailing_delta,
|
|
538
|
+
"belowTimeInForce": below_time_in_force,
|
|
539
|
+
"belowIcebergQty": below_iceberg_qty,
|
|
540
|
+
"belowStrategyId": below_strategy_id,
|
|
541
|
+
"belowStrategyType": below_strategy_type,
|
|
542
|
+
# EXTRA
|
|
523
543
|
"newOrderRespType": new_order_resp_type,
|
|
524
544
|
"selfTradePreventionMode": self_trade_prevention_mode,
|
|
525
|
-
"limitIcebergQty": limit_iceberg_qty,
|
|
526
|
-
"stopIcebergQty": stop_iceberg_qty,
|
|
527
545
|
}
|
|
528
546
|
|
|
529
|
-
return await self._make_request("POST", url, True,
|
|
547
|
+
return await self._make_request("POST", url, True, params=params)
|
|
530
548
|
|
|
531
549
|
async def oco_order_cancel(
|
|
532
550
|
self,
|
|
@@ -540,14 +558,14 @@ class Client(BaseClient):
|
|
|
540
558
|
https://developers.binance.com/docs/binance-spot-api-docs/rest-api/spot-trading-endpoints#cancel-oco-trade
|
|
541
559
|
"""
|
|
542
560
|
url = self._BASE_SPOT_URL + "/api/v3/orderList"
|
|
543
|
-
|
|
561
|
+
params = {
|
|
544
562
|
"symbol": symbol,
|
|
545
563
|
"orderListId": order_list_id,
|
|
546
564
|
"listClientOrderId": list_client_order_id,
|
|
547
565
|
"newClientOrderId": new_client_order_id,
|
|
548
566
|
}
|
|
549
567
|
|
|
550
|
-
return await self._make_request("DELETE", url, True,
|
|
568
|
+
return await self._make_request("DELETE", url, True, params=params)
|
|
551
569
|
|
|
552
570
|
async def oco_order_get(
|
|
553
571
|
self, order_list_id: int | None = None, orig_client_order_id: str | None = None
|
|
@@ -1088,9 +1106,9 @@ class Client(BaseClient):
|
|
|
1088
1106
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Change-Multi-Assets-Mode
|
|
1089
1107
|
"""
|
|
1090
1108
|
url = self._BASE_FUTURES_URL + "/fapi/v1/multiAssetsMargin"
|
|
1091
|
-
|
|
1109
|
+
params = {"multiAssetsMargin": multi_assets_margin}
|
|
1092
1110
|
|
|
1093
|
-
return await self._make_request("POST", url, True,
|
|
1111
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1094
1112
|
|
|
1095
1113
|
async def futures_multi_asset_mode_get(self) -> dict:
|
|
1096
1114
|
"""Получение режима мультиактивной маржи.
|
|
@@ -1129,7 +1147,7 @@ class Client(BaseClient):
|
|
|
1129
1147
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/New-Order
|
|
1130
1148
|
"""
|
|
1131
1149
|
url = self._BASE_FUTURES_URL + "/fapi/v1/order"
|
|
1132
|
-
|
|
1150
|
+
params = {
|
|
1133
1151
|
"symbol": symbol,
|
|
1134
1152
|
"side": side,
|
|
1135
1153
|
"type": type,
|
|
@@ -1150,7 +1168,7 @@ class Client(BaseClient):
|
|
|
1150
1168
|
"goodTillDate": good_till_date,
|
|
1151
1169
|
}
|
|
1152
1170
|
|
|
1153
|
-
return await self._make_request("POST", url, True,
|
|
1171
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1154
1172
|
|
|
1155
1173
|
async def futures_order_modify(
|
|
1156
1174
|
self,
|
|
@@ -1167,7 +1185,7 @@ class Client(BaseClient):
|
|
|
1167
1185
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Order
|
|
1168
1186
|
"""
|
|
1169
1187
|
url = self._BASE_FUTURES_URL + "/fapi/v1/order"
|
|
1170
|
-
|
|
1188
|
+
params = {
|
|
1171
1189
|
"orderId": order_id,
|
|
1172
1190
|
"origClientOrderId": orig_client_order_id,
|
|
1173
1191
|
"symbol": symbol,
|
|
@@ -1177,7 +1195,7 @@ class Client(BaseClient):
|
|
|
1177
1195
|
"priceMatch": price_match,
|
|
1178
1196
|
}
|
|
1179
1197
|
|
|
1180
|
-
return await self._make_request("PUT", url, True,
|
|
1198
|
+
return await self._make_request("PUT", url, True, params=params)
|
|
1181
1199
|
|
|
1182
1200
|
async def futures_order_get(
|
|
1183
1201
|
self,
|
|
@@ -1237,9 +1255,9 @@ class Client(BaseClient):
|
|
|
1237
1255
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders
|
|
1238
1256
|
"""
|
|
1239
1257
|
url = self._BASE_FUTURES_URL + "/fapi/v1/allOpenOrders"
|
|
1240
|
-
|
|
1258
|
+
params = {"symbol": symbol}
|
|
1241
1259
|
|
|
1242
|
-
return await self._make_request("DELETE", url, True,
|
|
1260
|
+
return await self._make_request("DELETE", url, True, params=params)
|
|
1243
1261
|
|
|
1244
1262
|
async def futures_countdown_cancel_all(
|
|
1245
1263
|
self,
|
|
@@ -1251,12 +1269,12 @@ class Client(BaseClient):
|
|
|
1251
1269
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders
|
|
1252
1270
|
"""
|
|
1253
1271
|
url = self._BASE_FUTURES_URL + "/fapi/v1/countdownCancelAll"
|
|
1254
|
-
|
|
1272
|
+
params = {
|
|
1255
1273
|
"symbol": symbol,
|
|
1256
1274
|
"countdownTime": countdown_time,
|
|
1257
1275
|
}
|
|
1258
1276
|
|
|
1259
|
-
return await self._make_request("POST", url, True,
|
|
1277
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1260
1278
|
|
|
1261
1279
|
async def futures_position_info(self, symbol: str | None = None) -> list[dict]:
|
|
1262
1280
|
"""Получение информации о позициях на фьючерсах.
|
|
@@ -1320,9 +1338,9 @@ class Client(BaseClient):
|
|
|
1320
1338
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Change-Initial-Leverage
|
|
1321
1339
|
"""
|
|
1322
1340
|
url = self._BASE_FUTURES_URL + "/fapi/v1/leverage"
|
|
1323
|
-
|
|
1341
|
+
params = {"symbol": symbol, "leverage": leverage}
|
|
1324
1342
|
|
|
1325
|
-
return await self._make_request("POST", url, True,
|
|
1343
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1326
1344
|
|
|
1327
1345
|
async def futures_margin_type_change(self, symbol: str, margin_type: str) -> dict:
|
|
1328
1346
|
"""Изменение типа маржи на фьючерсах.
|
|
@@ -1330,9 +1348,9 @@ class Client(BaseClient):
|
|
|
1330
1348
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Change-Margin-Type
|
|
1331
1349
|
"""
|
|
1332
1350
|
url = self._BASE_FUTURES_URL + "/fapi/v1/marginType"
|
|
1333
|
-
|
|
1351
|
+
params = {"symbol": symbol, "marginType": margin_type}
|
|
1334
1352
|
|
|
1335
|
-
return await self._make_request("POST", url, True,
|
|
1353
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1336
1354
|
|
|
1337
1355
|
async def futures_position_margin_modify(
|
|
1338
1356
|
self,
|
|
@@ -1346,14 +1364,14 @@ class Client(BaseClient):
|
|
|
1346
1364
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Modify-Isolated-Position-Margin
|
|
1347
1365
|
"""
|
|
1348
1366
|
url = self._BASE_FUTURES_URL + "/fapi/v1/positionMargin"
|
|
1349
|
-
|
|
1367
|
+
params = {
|
|
1350
1368
|
"symbol": symbol,
|
|
1351
1369
|
"positionSide": position_side,
|
|
1352
1370
|
"amount": amount,
|
|
1353
1371
|
"type": type,
|
|
1354
1372
|
}
|
|
1355
1373
|
|
|
1356
|
-
return await self._make_request("POST", url, True,
|
|
1374
|
+
return await self._make_request("POST", url, True, params=params)
|
|
1357
1375
|
|
|
1358
1376
|
async def futures_position_margin_history(
|
|
1359
1377
|
self,
|
|
@@ -1438,13 +1456,13 @@ class Client(BaseClient):
|
|
|
1438
1456
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order
|
|
1439
1457
|
"""
|
|
1440
1458
|
url = self._BASE_FUTURES_URL + "/fapi/v1/order"
|
|
1441
|
-
|
|
1459
|
+
params = {
|
|
1442
1460
|
"symbol": symbol,
|
|
1443
1461
|
"orderId": order_id,
|
|
1444
1462
|
"origClientOrderId": orig_client_order_id,
|
|
1445
1463
|
}
|
|
1446
1464
|
|
|
1447
|
-
return await self._make_request("DELETE", url,
|
|
1465
|
+
return await self._make_request("DELETE", url, params=params)
|
|
1448
1466
|
|
|
1449
1467
|
async def futures_batch_orders_create(self, orders: list[dict]) -> list[dict]:
|
|
1450
1468
|
"""Создание множественных ордеров одновременно на фьючерсах.
|
|
@@ -1452,9 +1470,9 @@ class Client(BaseClient):
|
|
|
1452
1470
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders
|
|
1453
1471
|
"""
|
|
1454
1472
|
url = self._BASE_FUTURES_URL + "/fapi/v1/batchOrders"
|
|
1455
|
-
|
|
1473
|
+
params = {"batchOrders": json.dumps(orders)} # Нужен особый дамп
|
|
1456
1474
|
|
|
1457
|
-
return await self._make_request("POST", url, signed=True,
|
|
1475
|
+
return await self._make_request("POST", url, signed=True, params=params)
|
|
1458
1476
|
|
|
1459
1477
|
async def futures_batch_orders_cancel(
|
|
1460
1478
|
self,
|
|
@@ -1467,17 +1485,17 @@ class Client(BaseClient):
|
|
|
1467
1485
|
https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders
|
|
1468
1486
|
"""
|
|
1469
1487
|
url = self._BASE_FUTURES_URL + "/fapi/v1/batchOrders"
|
|
1470
|
-
|
|
1488
|
+
params = {"symbol": symbol}
|
|
1471
1489
|
|
|
1472
1490
|
if order_id_list:
|
|
1473
|
-
|
|
1491
|
+
params["orderIdList"] = json.dumps(order_id_list) # Нужен особый дамп
|
|
1474
1492
|
|
|
1475
1493
|
if orig_client_order_id_list:
|
|
1476
|
-
|
|
1494
|
+
params["origClientOrderIdList"] = json.dumps( # Нужен особый дамп
|
|
1477
1495
|
orig_client_order_id_list
|
|
1478
1496
|
)
|
|
1479
1497
|
|
|
1480
|
-
return await self._make_request("DELETE", url, signed=True,
|
|
1498
|
+
return await self._make_request("DELETE", url, signed=True, params=params)
|
|
1481
1499
|
|
|
1482
1500
|
# topic: user data streams
|
|
1483
1501
|
|
|
@@ -14,7 +14,7 @@ unicex/_base/client.py,sha256=asIIQLZlRwwmUDvxveSv7aCvth54iiSRJdz19bxGorI,8904
|
|
|
14
14
|
unicex/_base/websocket.py,sha256=haSV3dSgkT352n8knpLm_iI4ZlUGWWKFCB3k5Ua2esU,12542
|
|
15
15
|
unicex/binance/__init__.py,sha256=sDk4ZjakRdpFMaMSpOCfqjf6ZPfAS9tlrt4WlDHtDkw,932
|
|
16
16
|
unicex/binance/adapter.py,sha256=JbUFyjnDAFtyuYYrh90YeOvQOZQ6faim0nWS6U0NxXw,8799
|
|
17
|
-
unicex/binance/client.py,sha256=
|
|
17
|
+
unicex/binance/client.py,sha256=H_6xq3ahD55EPR_lBYak-7Gd0_bqbIJUf7TXm43ZI3A,62298
|
|
18
18
|
unicex/binance/exchange_info.py,sha256=LNDkgBC5HB3JxtIBi39puqDg6LIVWqIWjT-6akDxtMs,2437
|
|
19
19
|
unicex/binance/uni_client.py,sha256=W4yxiU0kkJKPJjimhv4KAWreuEBwt7GgrWXefcw5BEA,8365
|
|
20
20
|
unicex/binance/uni_websocket_manager.py,sha256=HYHs6PYOTxBqN31AuOzbzs6o4oLBsZPMccqbjJiMu_4,8696
|
|
@@ -86,8 +86,8 @@ unicex/okx/uni_client.py,sha256=E_Wod0JSGt1K6k1mAIWnOv350pELbv-nic7g1KgOuos,8694
|
|
|
86
86
|
unicex/okx/uni_websocket_manager.py,sha256=b4f_QjA64DJmENQdIGb5IOVc7kvit7KMCdWeCmRbxGY,9326
|
|
87
87
|
unicex/okx/user_websocket.py,sha256=8c9kpm-xVa729pW93OKUGLHaE9MY0uzEpjIgNIFRF80,126
|
|
88
88
|
unicex/okx/websocket_manager.py,sha256=wROXTUDqKzOE-wDnCtXso_MC4SzfPuPols5aPg_Z3y4,26027
|
|
89
|
-
unicex-0.13.
|
|
90
|
-
unicex-0.13.
|
|
91
|
-
unicex-0.13.
|
|
92
|
-
unicex-0.13.
|
|
93
|
-
unicex-0.13.
|
|
89
|
+
unicex-0.13.12.dist-info/licenses/LICENSE,sha256=lNNK4Vqak9cXm6qVJLhbqS7iR_BMj6k7fd7XQ6l1k54,1507
|
|
90
|
+
unicex-0.13.12.dist-info/METADATA,sha256=VJOyBIHHQDlU0wbvaGEZBVEe2AXEyHfVNZJZILHGRk0,11753
|
|
91
|
+
unicex-0.13.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
92
|
+
unicex-0.13.12.dist-info/top_level.txt,sha256=_7rar-0OENIg4KRy6cgjWiebFYAJhjKEcMggAocGWG4,7
|
|
93
|
+
unicex-0.13.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|