Skip to content

Commit 2f991ab

Browse files
authored
3.1.2 (#51)
1 parent efb6bc6 commit 2f991ab

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
### 3.1.2 - 2022-08-23
4+
5+
### Update
6+
- Fix encoding issue of parameters in `DELETE /fapi/v1/batchOrders`
7+
38
## 3.1.1 - 2022-06-02
49

510
### Update

binance/um_futures/account.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from binance.lib.utils import check_required_parameter
1+
from binance.lib.utils import check_required_parameter, convert_list_to_json_array
22
from binance.lib.utils import check_required_parameters
33

44

@@ -336,11 +336,15 @@ def cancel_batch_order(
336336
]
337337
)
338338
elif orderIdList:
339-
params = {"symbol": symbol, "orderIdList": orderIdList, **kwargs}
339+
params = {
340+
"symbol": symbol,
341+
"orderIdList": convert_list_to_json_array(orderIdList),
342+
**kwargs,
343+
}
340344
else:
341345
params = {
342346
"symbol": symbol,
343-
"origClientOrderIdList": origClientOrderIdList,
347+
"origClientOrderIdList": convert_list_to_json_array(origClientOrderIdList),
344348
**kwargs,
345349
}
346350

examples/um_futures/trade/cancel_batch_orders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
try:
1515
response = um_futures_client.cancel_batch_order(
16-
symbol="BTCUSDT", orderIdList=[1234567, 2345678], recvWindow=2000
16+
symbol="BTCUSDT", orderIdList=[], origClientOrderIdList=[], recvWindow=2000
1717
)
1818
logging.info(response)
1919
except ClientError as error:

examples/um_futures/trade/new_batch_order.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
"type": "LIMIT",
1919
"quantity": "0.001",
2020
"timeInForce": "GTC",
21-
"price": "60000.1",
22-
}
21+
"price": "10000.1",
22+
},
23+
{
24+
"symbol": "BTCUSDT",
25+
"side": "BUY",
26+
"type": "LIMIT",
27+
"quantity": "0.01",
28+
"timeInForce": "GTC",
29+
"price": "8000.1",
30+
},
2331
]
2432

2533
try:

0 commit comments

Comments
 (0)