Skip to content

Commit 4925710

Browse files
committed
Release v3.8.0
1 parent 190a9a8 commit 4925710

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1162
-191
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 3.8.0 - 2024-07-04
4+
### Added
5+
- Trade
6+
- Spot
7+
- `POST /api/v3/orderList/oto`
8+
- `POST /api/v3/orderList/otoco`
9+
- Websocket API
10+
- `orderList.place.oto`
11+
- `orderList.place.otoco`
12+
13+
### Updated
14+
- Updated and Resolved documentation issue
15+
- Updated `Restful` OCO trade deprecated endpoint `POST /api/v3/order/oco` to `POST /api/v3/orderList/oco`
16+
- Updated `Websocket API` OCO trade deprecated endpoint `orderList.place` to `orderList.place.oco`
17+
318
## 3.7.0 - 2024-05-03
419
### Added
520
- Convert

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ a 10 minutes period. This package handles the pong responses automatically.
387387
```python
388388
from binance.websocket.spot.websocket_client import SpotWebsocketClient as WebsocketClient
389389

390-
ws_client = WebsocketClient(stream_url='wss://testnet.binance.vision')
390+
ws_client = WebsocketClient(stream_url='wss://stream.testnet.binance.vision')
391391
```
392392

393393
## Test Case

binance/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.7.0"
1+
__version__ = "3.8.0"

binance/spot/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def __init__(self, api_key=None, api_secret=None, **kwargs):
3434
from binance.spot._trade import get_open_orders
3535
from binance.spot._trade import get_orders
3636
from binance.spot._trade import new_oco_order
37+
from binance.spot._trade import new_oto_order
38+
from binance.spot._trade import new_otoco_order
3739
from binance.spot._trade import cancel_oco_order
3840
from binance.spot._trade import get_oco_order
3941
from binance.spot._trade import get_oco_orders

binance/spot/_blvt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def user_limit_info(self, **kwargs):
9999
100100
GET /sapi/v1/blvt/userLimit
101101
102-
https://binance-docs.github.io/apidocs/spot/en/#get-blvt-user-limit-info
102+
https://binance-docs.github.io/apidocs/spot/en/#get-blvt-user-limit-info-user_data
103103
104104
Keyword Args:
105105
tokenName (str, optional): BTCDOWN, BTCUP

binance/spot/_futures.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def futures_transfer(self, asset: str, amount: float, type: int, **kwargs):
1313
1414
POST /sapi/v1/futures/transfer
1515
16-
https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-futures
16+
https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data
1717
1818
Args:
1919
asset (str): The asset being transferred, e.g. USDT

binance/spot/_gift_card.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def gift_card_create_code(self, token: str, amount: float, **kwargs):
1111
- You have a sufficient balance in your Binance funding wallet
1212
- You need Enable Withdrawals for the API Key which requests this endpoint.
1313
14-
https://binance-docs.github.io/apidocs/spot/en/#create-a-binance-code-user_data
14+
https://binance-docs.github.io/apidocs/spot/en/#create-a-single-token-gift-card-user_data
1515
1616
Args:
1717
token (str): The coin type contained in the Binance Code
@@ -36,7 +36,7 @@ def gift_card_redeem_code(self, code: str, **kwargs):
3636
3737
Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day.
3838
39-
https://binance-docs.github.io/apidocs/spot/en/#redeem-a-binance-code-user_data
39+
https://binance-docs.github.io/apidocs/spot/en/#redeem-a-binance-gift-card-user_data
4040
4141
Args:
4242
code (str): Binance Code
@@ -60,7 +60,7 @@ def gift_card_verify_code(self, referenceNo: str, **kwargs):
6060
6161
Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour.
6262
63-
https://binance-docs.github.io/apidocs/spot/en/#verify-a-binance-code-user_data
63+
https://binance-docs.github.io/apidocs/spot/en/#verify-binance-gift-card-by-gift-card-number-user_data
6464
6565
Args:
6666
referenceNo (str): reference number

binance/spot/_margin.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def margin_all_pairs(self, **kwargs):
6565
6666
GET /sapi/v1/margin/allPairs
6767
68-
https://binance-docs.github.io/apidocs/spot/en/#get-all-margin-pairs-market_data
68+
https://binance-docs.github.io/apidocs/spot/en/#get-all-cross-margin-pairs-market_data
6969
7070
Keyword Args:
7171
symbol (str, optional)
@@ -158,7 +158,7 @@ def margin_transfer_history(self, asset: str, **kwargs):
158158
159159
GET /sapi/v1/margin/transfer
160160
161-
https://binance-docs.github.io/apidocs/spot/en/#get-transfer-history-user_data
161+
https://binance-docs.github.io/apidocs/spot/en/#get-cross-margin-transfer-history-user_data
162162
163163
Args:
164164
asset (str)
@@ -246,7 +246,7 @@ def margin_account(self, **kwargs):
246246
247247
GET /sapi/v1/margin/account
248248
249-
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-details-user_data
249+
https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data
250250
251251
Keyword Args:
252252
recvWindow (int, optional): The value cannot be greater than 60000
@@ -281,7 +281,7 @@ def margin_open_orders(self, **kwargs):
281281
282282
GET /sapi/v1/margin/openOrders
283283
284-
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-order-user_data
284+
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
285285
286286
Keyword Args:
287287
symbol (str, optional)
@@ -316,7 +316,7 @@ def margin_all_orders(self, symbol: str, **kwargs):
316316
317317
GET /sapi/v1/margin/allOrders
318318
319-
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-order-user_data
319+
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data
320320
321321
Args:
322322
symbol (str)
@@ -417,7 +417,7 @@ def isolated_margin_all_pairs(self, **kwargs):
417417
418418
GET /sapi/v1/margin/isolated/allPairs
419419
420-
https://binance-docs.github.io/apidocs/spot/en/#get-all-isolated-margin-symbol-user_data
420+
https://binance-docs.github.io/apidocs/spot/en/#get-all-isolated-margin-symbol-market_data
421421
422422
Keyword Args:
423423
symbol (str, optional)

binance/spot/_portfolio_margin.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def portfolio_margin_account(self, **kwargs):
1313
1414
GET /sapi/v1/portfolio/account
1515
16-
https://binance-docs.github.io/apidocs/spot/en/#get-classic-portfolio-margin-account-info-user_data
16+
https://binance-docs.github.io/apidocs/spot/en/#get-portfolio-margin-pro-account-info-user_data
1717
1818
Keyword Args:
1919
recvWindow (int, optional): The value cannot be greater than 60000
@@ -32,7 +32,7 @@ def portfolio_margin_collateral_rate(self):
3232
3333
GET /sapi/v1/portfolio/collateralRate
3434
35-
https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-collateral-rate-market_data
35+
https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-pro-collateral-rate-market_data
3636
3737
"""
3838

@@ -49,7 +49,7 @@ def portfolio_margin_bankruptcy_loan_amount(self, **kwargs):
4949
5050
GET /sapi/v1/portfolio/pmLoan
5151
52-
https://binance-docs.github.io/apidocs/spot/en/#classic-portfolio-margin-collateral-rate-market_data
52+
https://binance-docs.github.io/apidocs/spot/en/#query-portfolio-margin-pro-bankruptcy-loan-amount-user_data
5353
5454
Keyword Args:
5555
recvWindow (int, optional): The value cannot be greater than 60000
@@ -68,7 +68,7 @@ def portfolio_margin_bankruptcy_loan_repay(self, **kwargs):
6868
6969
POST /sapi/v1/portfolio/repay
7070
71-
https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay-user_data
71+
https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-pro-bankruptcy-loan-repay
7272
7373
Keyword Args:
7474
recvWindow (int, optional): The value cannot be greater than 60000
@@ -89,7 +89,7 @@ def query_classic_portfolio_margin_negative_balance_interest_history(
8989
9090
GET /sapi/v1/portfolio/interest-history
9191
92-
https://binance-docs.github.io/apidocs/spot/en/#query-classic-portfolio-margin-negative-balance-interest-history-user_data
92+
https://binance-docs.github.io/apidocs/spot/en/#query-portfolio-margin-pro-negative-balance-interest-history-user_data
9393
9494
Args:
9595
asset (str)
@@ -136,7 +136,7 @@ def fund_auto_collection(self, **kwargs):
136136
137137
POST /sapi/v1/portfolio/auto-collection
138138
139-
https://binance-docs.github.io/apidocs/spot/en/#fund-auto-collection-usdr_data
139+
https://binance-docs.github.io/apidocs/spot/en/#fund-auto-collection-user_data
140140
141141
Keyword Args:
142142
recvWindow (int, optional): The value cannot be greater than 60000
@@ -155,7 +155,7 @@ def bnb_transfer(self, transferSide: str, amount: float, **kwargs):
155155
156156
POST /sapi/v1/portfolio/bnb-transfer
157157
158-
https://binance-docs.github.io/apidocs/spot/en/#bnb-transfer-usdr_data
158+
https://binance-docs.github.io/apidocs/spot/en/#bnb-transfer-user_data
159159
160160
Args:
161161
transferSide (str)
@@ -240,7 +240,7 @@ def fund_collection_by_asset(self, asset: str, **kwargs):
240240
241241
POST /sapi/v1/portfolio/asset-collection
242242
243-
https://binance-docs.github.io/apidocs/spot/en/#fund-collection-by-asset-usdr_data
243+
https://binance-docs.github.io/apidocs/spot/en/#fund-collection-by-asset-user_data
244244
245245
Args:
246246
asset (str)

binance/spot/_sub_account.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def sub_account_list(self, **kwargs):
3030
3131
GET /sapi/v1/sub-account/list
3232
33-
https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-list-sapi-for-master-account
33+
https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-list-for-master-account
3434
3535
Keyword Args:
3636
email (str, optional): Sub-account email
@@ -49,7 +49,7 @@ def sub_account_assets(self, email: str, **kwargs):
4949
5050
GET /sapi/v3/sub-account/assets
5151
52-
https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-assets-sapi-for-master-account
52+
https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-assets-for-master-account
5353
5454
Args:
5555
email (str)
@@ -681,7 +681,7 @@ def sub_account_update_ip_restriction(
681681
682682
POST /sapi/v2/sub-account/subAccountApi/ipRestriction
683683
684-
https://binance-docs.github.io/apidocs/spot/en/#update-ip-restriction-for-sub-account-api-key-for-master-account
684+
https://binance-docs.github.io/apidocs/spot/en/#add-ip-restriction-for-sub-account-api-key-for-master-account
685685
686686
Args:
687687
email (str): Sub-account email
@@ -861,7 +861,7 @@ def managed_sub_account_trading_trans_log(
861861
862862
GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent
863863
864-
https://binance-docs.github.io/apidocs/spot/en/#query-managed-sub-account-transfer-log-trading-team-user_data
864+
https://binance-docs.github.io/apidocs/spot/en/#query-managed-sub-account-transfer-log-for-trading-team-master-account-user_data
865865
866866
Args:
867867
email (str): email

0 commit comments

Comments
 (0)