Skip to content

Commit

Permalink
3.1.2 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
chairz-2 authored Aug 23, 2022
1 parent efb6bc6 commit 2f991ab
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### 3.1.2 - 2022-08-23

### Update
- Fix encoding issue of parameters in `DELETE /fapi/v1/batchOrders`

## 3.1.1 - 2022-06-02

### Update
Expand Down
10 changes: 7 additions & 3 deletions binance/um_futures/account.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from binance.lib.utils import check_required_parameter
from binance.lib.utils import check_required_parameter, convert_list_to_json_array
from binance.lib.utils import check_required_parameters


Expand Down Expand Up @@ -336,11 +336,15 @@ def cancel_batch_order(
]
)
elif orderIdList:
params = {"symbol": symbol, "orderIdList": orderIdList, **kwargs}
params = {
"symbol": symbol,
"orderIdList": convert_list_to_json_array(orderIdList),
**kwargs,
}
else:
params = {
"symbol": symbol,
"origClientOrderIdList": origClientOrderIdList,
"origClientOrderIdList": convert_list_to_json_array(origClientOrderIdList),
**kwargs,
}

Expand Down
2 changes: 1 addition & 1 deletion examples/um_futures/trade/cancel_batch_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

try:
response = um_futures_client.cancel_batch_order(
symbol="BTCUSDT", orderIdList=[1234567, 2345678], recvWindow=2000
symbol="BTCUSDT", orderIdList=[], origClientOrderIdList=[], recvWindow=2000
)
logging.info(response)
except ClientError as error:
Expand Down
12 changes: 10 additions & 2 deletions examples/um_futures/trade/new_batch_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@
"type": "LIMIT",
"quantity": "0.001",
"timeInForce": "GTC",
"price": "60000.1",
}
"price": "10000.1",
},
{
"symbol": "BTCUSDT",
"side": "BUY",
"type": "LIMIT",
"quantity": "0.01",
"timeInForce": "GTC",
"price": "8000.1",
},
]

try:
Expand Down

0 comments on commit 2f991ab

Please sign in to comment.