Skip to content

Commit f7e717b

Browse files
authored
Merge pull request #474 from binance/release_clients_2025_december
2 parents 4da5726 + c22e29b commit f7e717b

File tree

272 files changed

+16296
-1061
lines changed

Some content is hidden

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

272 files changed

+16296
-1061
lines changed

clients/algo/CHANGELOG.md

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

3+
## 2.0.0 - 2025-12-22
4+
5+
### Changed (2)
6+
7+
- Updated `binance-common` library to version `3.3.0`
8+
- Add `Body` to Rest API request
9+
310
## 1.7.0 - 2025-10-10
411

512
### Changed (1)

clients/algo/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "binance-sdk-algo"
3-
version = "1.7.0"
3+
version = "2.0.0"
44
description = "Official Binance Algo SDK - A lightweight library that provides a convenient interface to Binance's Algo REST API"
55
authors = ["Binance"]
66
license = "MIT"
@@ -11,7 +11,7 @@ packages = [
1111
]
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.9,<3.14"
14+
python = ">=3.9,<3.15"
1515
requests = ">=2.31.0"
1616
pydantic = ">=2.10.0"
1717
websockets = "^15.0.1"
@@ -20,7 +20,7 @@ black = "^25.1.0"
2020
ruff = "^0.12.0"
2121
pycryptodome = "^3.17"
2222
aiohttp = "^3.9"
23-
binance-common = "3.2.0"
23+
binance-common = "3.3.0"
2424
pytest = { version = ">=6.2.5", optional = true }
2525

2626
[tool.poetry.extras]

clients/algo/src/binance_sdk_algo/rest_api/api/future_algo_api.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def cancel_algo_order_future_algo(
7171
field="algo_id", error_message="Missing required parameter 'algo_id'"
7272
)
7373

74+
body = {}
7475
payload = {"algo_id": algo_id, "recv_window": recv_window}
7576

7677
return send_request(
@@ -79,6 +80,7 @@ def cancel_algo_order_future_algo(
7980
method="DELETE",
8081
path="/sapi/v1/algo/futures/order",
8182
payload=payload,
83+
body=body,
8284
time_unit=self._configuration.time_unit,
8385
response_model=CancelAlgoOrderFutureAlgoResponse,
8486
is_signed=True,
@@ -112,6 +114,7 @@ def query_current_algo_open_orders_future_algo(
112114
113115
"""
114116

117+
body = {}
115118
payload = {"recv_window": recv_window}
116119

117120
return send_request(
@@ -120,6 +123,7 @@ def query_current_algo_open_orders_future_algo(
120123
method="GET",
121124
path="/sapi/v1/algo/futures/openOrders",
122125
payload=payload,
126+
body=body,
123127
time_unit=self._configuration.time_unit,
124128
response_model=QueryCurrentAlgoOpenOrdersFutureAlgoResponse,
125129
is_signed=True,
@@ -165,6 +169,7 @@ def query_historical_algo_orders_future_algo(
165169
166170
"""
167171

172+
body = {}
168173
payload = {
169174
"symbol": symbol,
170175
"side": side,
@@ -181,6 +186,7 @@ def query_historical_algo_orders_future_algo(
181186
method="GET",
182187
path="/sapi/v1/algo/futures/historicalOrders",
183188
payload=payload,
189+
body=body,
184190
time_unit=self._configuration.time_unit,
185191
response_model=QueryHistoricalAlgoOrdersFutureAlgoResponse,
186192
is_signed=True,
@@ -225,6 +231,7 @@ def query_sub_orders_future_algo(
225231
field="algo_id", error_message="Missing required parameter 'algo_id'"
226232
)
227233

234+
body = {}
228235
payload = {
229236
"algo_id": algo_id,
230237
"page": page,
@@ -238,6 +245,7 @@ def query_sub_orders_future_algo(
238245
method="GET",
239246
path="/sapi/v1/algo/futures/subOrders",
240247
payload=payload,
248+
body=body,
241249
time_unit=self._configuration.time_unit,
242250
response_model=QuerySubOrdersFutureAlgoResponse,
243251
is_signed=True,
@@ -312,6 +320,7 @@ def time_weighted_average_price_future_algo(
312320
field="duration", error_message="Missing required parameter 'duration'"
313321
)
314322

323+
body = {}
315324
payload = {
316325
"symbol": symbol,
317326
"side": side,
@@ -330,6 +339,7 @@ def time_weighted_average_price_future_algo(
330339
method="POST",
331340
path="/sapi/v1/algo/futures/newOrderTwap",
332341
payload=payload,
342+
body=body,
333343
time_unit=self._configuration.time_unit,
334344
response_model=TimeWeightedAveragePriceFutureAlgoResponse,
335345
is_signed=True,
@@ -401,6 +411,7 @@ def volume_participation_future_algo(
401411
field="urgency", error_message="Missing required parameter 'urgency'"
402412
)
403413

414+
body = {}
404415
payload = {
405416
"symbol": symbol,
406417
"side": side,
@@ -419,6 +430,7 @@ def volume_participation_future_algo(
419430
method="POST",
420431
path="/sapi/v1/algo/futures/newOrderVp",
421432
payload=payload,
433+
body=body,
422434
time_unit=self._configuration.time_unit,
423435
response_model=VolumeParticipationFutureAlgoResponse,
424436
is_signed=True,

clients/algo/src/binance_sdk_algo/rest_api/api/spot_algo_api.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def cancel_algo_order_spot_algo(
6767
field="algo_id", error_message="Missing required parameter 'algo_id'"
6868
)
6969

70+
body = {}
7071
payload = {"algo_id": algo_id, "recv_window": recv_window}
7172

7273
return send_request(
@@ -75,6 +76,7 @@ def cancel_algo_order_spot_algo(
7576
method="DELETE",
7677
path="/sapi/v1/algo/spot/order",
7778
payload=payload,
79+
body=body,
7880
time_unit=self._configuration.time_unit,
7981
response_model=CancelAlgoOrderSpotAlgoResponse,
8082
is_signed=True,
@@ -105,6 +107,7 @@ def query_current_algo_open_orders_spot_algo(
105107
106108
"""
107109

110+
body = {}
108111
payload = {"recv_window": recv_window}
109112

110113
return send_request(
@@ -113,6 +116,7 @@ def query_current_algo_open_orders_spot_algo(
113116
method="GET",
114117
path="/sapi/v1/algo/spot/openOrders",
115118
payload=payload,
119+
body=body,
116120
time_unit=self._configuration.time_unit,
117121
response_model=QueryCurrentAlgoOpenOrdersSpotAlgoResponse,
118122
is_signed=True,
@@ -155,6 +159,7 @@ def query_historical_algo_orders_spot_algo(
155159
156160
"""
157161

162+
body = {}
158163
payload = {
159164
"symbol": symbol,
160165
"side": side,
@@ -171,6 +176,7 @@ def query_historical_algo_orders_spot_algo(
171176
method="GET",
172177
path="/sapi/v1/algo/spot/historicalOrders",
173178
payload=payload,
179+
body=body,
174180
time_unit=self._configuration.time_unit,
175181
response_model=QueryHistoricalAlgoOrdersSpotAlgoResponse,
176182
is_signed=True,
@@ -212,6 +218,7 @@ def query_sub_orders_spot_algo(
212218
field="algo_id", error_message="Missing required parameter 'algo_id'"
213219
)
214220

221+
body = {}
215222
payload = {
216223
"algo_id": algo_id,
217224
"page": page,
@@ -225,6 +232,7 @@ def query_sub_orders_spot_algo(
225232
method="GET",
226233
path="/sapi/v1/algo/spot/subOrders",
227234
payload=payload,
235+
body=body,
228236
time_unit=self._configuration.time_unit,
229237
response_model=QuerySubOrdersSpotAlgoResponse,
230238
is_signed=True,
@@ -284,6 +292,7 @@ def time_weighted_average_price_spot_algo(
284292
field="duration", error_message="Missing required parameter 'duration'"
285293
)
286294

295+
body = {}
287296
payload = {
288297
"symbol": symbol,
289298
"side": side,
@@ -299,6 +308,7 @@ def time_weighted_average_price_spot_algo(
299308
method="POST",
300309
path="/sapi/v1/algo/spot/newOrderTwap",
301310
payload=payload,
311+
body=body,
302312
time_unit=self._configuration.time_unit,
303313
response_model=TimeWeightedAveragePriceSpotAlgoResponse,
304314
is_signed=True,

clients/algo/src/binance_sdk_algo/rest_api/rest_api.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,48 @@ def __init__(
5454
self._spotAlgoApi = SpotAlgoApi(self.configuration, self._session, self._signer)
5555

5656
def send_request(
57-
self, endpoint: str, method: str, params: Optional[dict] = None
57+
self,
58+
endpoint: str,
59+
method: str,
60+
query_params: Optional[dict] = None,
61+
body_params: Optional[dict] = None,
5862
) -> ApiResponse[T]:
5963
"""
6064
Sends an request to the Binance REST API.
6165
6266
Args:
6367
endpoint (str): The API endpoint path to send the request to.
6468
method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
65-
params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
69+
query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
70+
body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.
6671
6772
Returns:
6873
ApiResponse[T]: The API response, where T is the expected response type.
6974
"""
7075
return send_request[T](
71-
self._session, self.configuration, method, endpoint, params
76+
self._session,
77+
self.configuration,
78+
method,
79+
endpoint,
80+
query_params,
81+
body_params,
7282
)
7383

7484
def send_signed_request(
75-
self, endpoint: str, method: str, params: Optional[dict] = None
85+
self,
86+
endpoint: str,
87+
method: str,
88+
query_params: Optional[dict] = None,
89+
body_params: Optional[dict] = None,
7690
) -> ApiResponse[T]:
7791
"""
7892
Sends a signed request to the Binance REST API.
7993
8094
Args:
8195
endpoint (str): The API endpoint path to send the request to.
8296
method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
83-
params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
97+
query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
98+
body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.
8499
85100
Returns:
86101
ApiResponse[T]: The API response, where T is the expected response type.
@@ -90,7 +105,8 @@ def send_signed_request(
90105
self.configuration,
91106
method,
92107
endpoint,
93-
params,
108+
query_params,
109+
body_params,
94110
is_signed=True,
95111
signer=self._signer,
96112
)

clients/c2c/CHANGELOG.md

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

3+
## 3.0.0 - 2025-12-22
4+
5+
### Changed (2)
6+
7+
- Updated `binance-common` library to version `3.3.0`
8+
- Add `Body` to Rest API request
9+
310
## 2.0.0 - 2025-11-14
411

512
### Changed (6)

clients/c2c/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "binance-sdk-c2c"
3-
version = "2.0.0"
3+
version = "3.0.0"
44
description = "Official Binance C2C SDK - A lightweight library that provides a convenient interface to Binance's C2C REST API"
55
authors = ["Binance"]
66
license = "MIT"
@@ -11,7 +11,7 @@ packages = [
1111
]
1212

1313
[tool.poetry.dependencies]
14-
python = ">=3.9,<3.14"
14+
python = ">=3.9,<3.15"
1515
requests = ">=2.31.0"
1616
pydantic = ">=2.10.0"
1717
websockets = "^15.0.1"
@@ -20,7 +20,7 @@ black = "^25.1.0"
2020
ruff = "^0.12.0"
2121
pycryptodome = "^3.17"
2222
aiohttp = "^3.9"
23-
binance-common = "3.2.0"
23+
binance-common = "3.3.0"
2424
pytest = { version = ">=6.2.5", optional = true }
2525

2626
[tool.poetry.extras]

clients/c2c/src/binance_sdk_c2c/rest_api/api/c2_c_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def get_c2_c_trade_history(
6969
7070
"""
7171

72+
body = {}
7273
payload = {
7374
"trade_type": trade_type,
7475
"start_timestamp": start_timestamp,
@@ -84,6 +85,7 @@ def get_c2_c_trade_history(
8485
method="GET",
8586
path="/sapi/v1/c2c/orderMatch/listUserOrderHistory",
8687
payload=payload,
88+
body=body,
8789
time_unit=self._configuration.time_unit,
8890
response_model=GetC2CTradeHistoryResponse,
8991
is_signed=True,

clients/c2c/src/binance_sdk_c2c/rest_api/rest_api.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,48 @@ def __init__(
4040
self._c2CApi = C2CApi(self.configuration, self._session, self._signer)
4141

4242
def send_request(
43-
self, endpoint: str, method: str, params: Optional[dict] = None
43+
self,
44+
endpoint: str,
45+
method: str,
46+
query_params: Optional[dict] = None,
47+
body_params: Optional[dict] = None,
4448
) -> ApiResponse[T]:
4549
"""
4650
Sends an request to the Binance REST API.
4751
4852
Args:
4953
endpoint (str): The API endpoint path to send the request to.
5054
method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
51-
params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
55+
query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
56+
body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.
5257
5358
Returns:
5459
ApiResponse[T]: The API response, where T is the expected response type.
5560
"""
5661
return send_request[T](
57-
self._session, self.configuration, method, endpoint, params
62+
self._session,
63+
self.configuration,
64+
method,
65+
endpoint,
66+
query_params,
67+
body_params,
5868
)
5969

6070
def send_signed_request(
61-
self, endpoint: str, method: str, params: Optional[dict] = None
71+
self,
72+
endpoint: str,
73+
method: str,
74+
query_params: Optional[dict] = None,
75+
body_params: Optional[dict] = None,
6276
) -> ApiResponse[T]:
6377
"""
6478
Sends a signed request to the Binance REST API.
6579
6680
Args:
6781
endpoint (str): The API endpoint path to send the request to.
6882
method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
69-
params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
83+
query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
84+
body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.
7085
7186
Returns:
7287
ApiResponse[T]: The API response, where T is the expected response type.
@@ -76,7 +91,8 @@ def send_signed_request(
7691
self.configuration,
7792
method,
7893
endpoint,
79-
params,
94+
query_params,
95+
body_params,
8096
is_signed=True,
8197
signer=self._signer,
8298
)

0 commit comments

Comments
 (0)