Skip to content

Commit ceb5794

Browse files
author
github-actions
committed
Release v23.0.0
**Derivatives Trading Options** ### Changed (1) #### REST API - Deleted parameter `limit` - affected methods: - `query_current_open_option_orders()` (`GET /eapi/v1/openOrders`) **Sub Account** ### Changed (1) - Modified parameter `orderArgs`: - item property `positionSide` added - item property `quantity` added - item property `symbol` added - affected methods: - `move_position_for_sub_account()` (`POST /sapi/v1/sub-account/futures/move-position`)
1 parent 118bafa commit ceb5794

File tree

8 files changed

+73
-21
lines changed

8 files changed

+73
-21
lines changed

CHANGELOG.md

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

3+
## 23.0.0 - 2025-10-06
4+
5+
**Derivatives Trading Options**
6+
7+
### Changed (1)
8+
9+
#### REST API
10+
11+
- Deleted parameter `limit`
12+
- affected methods:
13+
- `query_current_open_option_orders()` (`GET /eapi/v1/openOrders`)
14+
15+
**Sub Account**
16+
17+
### Changed (1)
18+
19+
- Modified parameter `orderArgs`:
20+
- item property `positionSide` added
21+
- item property `quantity` added
22+
- item property `symbol` added
23+
- affected methods:
24+
- `move_position_for_sub_account()` (`POST /sapi/v1/sub-account/futures/move-position`)
25+
326
## 22.0.0 - 2025-09-29
427

528
**Derivatives Trading Portfolio Margin Pro**

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "binance-sdk"
3-
version = "22.0.0"
3+
version = "23.0.0"
44
authors = [ "Binance" ]
55
edition = "2024"
66
resolver = "3"

examples/sub_account/rest_api/asset_management_api/move_position_for_sub_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async fn main() -> Result<()> {
2525
"from_user_email_example".to_string(),
2626
"to_user_email_example".to_string(),
2727
"product_type_example".to_string(),
28-
[].to_vec(),
28+
vec![],
2929
)
3030
.build()?;
3131

src/derivatives_trading_options/rest_api/apis/trade_api.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl OptionPositionInformationParams {
541541
#[derive(Clone, Debug, Builder)]
542542
#[builder(pattern = "owned", build_fn(error = "ParamBuildError"))]
543543
pub struct PlaceMultipleOrdersParams {
544-
/// order list. Max 5 orders
544+
/// order list. Max 10 orders
545545
///
546546
/// This field is **required.
547547
#[builder(setter(into))]
@@ -559,7 +559,7 @@ impl PlaceMultipleOrdersParams {
559559
///
560560
/// Required parameters:
561561
///
562-
/// * `orders` — order list. Max 5 orders
562+
/// * `orders` — order list. Max 10 orders
563563
///
564564
#[must_use]
565565
pub fn builder(
@@ -595,11 +595,6 @@ pub struct QueryCurrentOpenOptionOrdersParams {
595595
/// This field is **optional.
596596
#[builder(setter(into), default)]
597597
pub end_time: Option<i64>,
598-
/// Number of result sets returned Default:100 Max:1000
599-
///
600-
/// This field is **optional.
601-
#[builder(setter(into), default)]
602-
pub limit: Option<i64>,
603598
///
604599
/// The `recv_window` parameter.
605600
///
@@ -1111,7 +1106,6 @@ impl TradeApi for TradeApiClient {
11111106
order_id,
11121107
start_time,
11131108
end_time,
1114-
limit,
11151109
recv_window,
11161110
} = params;
11171111

@@ -1133,10 +1127,6 @@ impl TradeApi for TradeApiClient {
11331127
query_params.insert("endTime".to_string(), json!(rw));
11341128
}
11351129

1136-
if let Some(rw) = limit {
1137-
query_params.insert("limit".to_string(), json!(rw));
1138-
}
1139-
11401130
if let Some(rw) = recv_window {
11411131
query_params.insert("recvWindow".to_string(), json!(rw));
11421132
}
@@ -2125,7 +2115,7 @@ mod tests {
21252115
TOKIO_SHARED_RT.block_on(async {
21262116
let client = MockTradeApiClient { force_error: false };
21272117

2128-
let params = QueryCurrentOpenOptionOrdersParams::builder().symbol("symbol_example".to_string()).order_id(1).start_time(1623319461670).end_time(1641782889000).limit(100).recv_window(5000).build().unwrap();
2118+
let params = QueryCurrentOpenOptionOrdersParams::builder().symbol("symbol_example".to_string()).order_id(1).start_time(1623319461670).end_time(1641782889000).recv_window(5000).build().unwrap();
21292119

21302120
let resp_json: Value = serde_json::from_str(r#"[{"orderId":4611875134427365000,"symbol":"BTC-200730-9000-C","price":"100","quantity":"1","executedQty":"0","fee":"0","side":"BUY","type":"LIMIT","timeInForce":"GTC","reduceOnly":false,"postOnly":false,"createTime":1592465880683,"updateTime":1592465880683,"status":"ACCEPTED","avgPrice":"0","clientOrderId":"","priceScale":2,"quantityScale":2,"optionSide":"CALL","quoteAsset":"USDT","mmp":false}]"#).unwrap();
21312121
let expected_response : Vec<models::QueryCurrentOpenOptionOrdersResponseInner> = serde_json::from_value(resp_json.clone()).expect("should parse into Vec<models::QueryCurrentOpenOptionOrdersResponseInner>");

src/derivatives_trading_options/rest_api/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ impl RestApi {
15991599
///
16001600
/// Cancel all active order on a symbol.
16011601
///
1602-
/// Weight: 1
1602+
/// Weight: 5
16031603
///
16041604
/// # Arguments
16051605
///

src/sub_account/rest_api/apis/asset_management_api.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ pub struct MovePositionForSubAccountParams {
671671
///
672672
/// This field is **required.
673673
#[builder(setter(into))]
674-
pub order_args: Vec<serde_json::Value>,
674+
pub order_args: Vec<models::MovePositionForSubAccountOrderArgsParameterInner>,
675675
///
676676
/// The `recv_window` parameter.
677677
///
@@ -695,7 +695,7 @@ impl MovePositionForSubAccountParams {
695695
from_user_email: String,
696696
to_user_email: String,
697697
product_type: String,
698-
order_args: Vec<serde_json::Value>,
698+
order_args: Vec<models::MovePositionForSubAccountOrderArgsParameterInner>,
699699
) -> MovePositionForSubAccountParamsBuilder {
700700
MovePositionForSubAccountParamsBuilder::default()
701701
.from_user_email(from_user_email)
@@ -3608,7 +3608,7 @@ mod tests {
36083608
TOKIO_SHARED_RT.block_on(async {
36093609
let client = MockAssetManagementApiClient { force_error: false };
36103610

3611-
let params = MovePositionForSubAccountParams::builder("from_user_email_example".to_string(),"to_user_email_example".to_string(),"product_type_example".to_string(),[].to_vec(),).build().unwrap();
3611+
let params = MovePositionForSubAccountParams::builder("from_user_email_example".to_string(),"to_user_email_example".to_string(),"product_type_example".to_string(),vec![],).build().unwrap();
36123612

36133613
let resp_json: Value = serde_json::from_str(r#"{"movePositionOrders":[{"fromUserEmail":"[email protected]","toUserEmail":"[email protected]","productType":"UM","symbol":"BTCUSDT","priceType":"MARK_PRICE","price":"97139.00000000","quantity":"0.001","positionSide":"BOTH","side":"BUY","success":true},{"fromUserEmail":"[email protected]","toUserEmail":"[email protected]","productType":"UM","symbol":"BTCUSDT","priceType":"MARK_PRICE","price":"97139.00000000","quantity":"0.0011","positionSide":"BOTH","side":"BUY","success":true}]}"#).unwrap();
36143614
let expected_response : models::MovePositionForSubAccountResponse = serde_json::from_value(resp_json.clone()).expect("should parse into models::MovePositionForSubAccountResponse");
@@ -3625,7 +3625,7 @@ mod tests {
36253625
TOKIO_SHARED_RT.block_on(async {
36263626
let client = MockAssetManagementApiClient { force_error: false };
36273627

3628-
let params = MovePositionForSubAccountParams::builder("from_user_email_example".to_string(),"to_user_email_example".to_string(),"product_type_example".to_string(),[].to_vec(),).recv_window(5000).build().unwrap();
3628+
let params = MovePositionForSubAccountParams::builder("from_user_email_example".to_string(),"to_user_email_example".to_string(),"product_type_example".to_string(),vec![],).recv_window(5000).build().unwrap();
36293629

36303630
let resp_json: Value = serde_json::from_str(r#"{"movePositionOrders":[{"fromUserEmail":"[email protected]","toUserEmail":"[email protected]","productType":"UM","symbol":"BTCUSDT","priceType":"MARK_PRICE","price":"97139.00000000","quantity":"0.001","positionSide":"BOTH","side":"BUY","success":true},{"fromUserEmail":"[email protected]","toUserEmail":"[email protected]","productType":"UM","symbol":"BTCUSDT","priceType":"MARK_PRICE","price":"97139.00000000","quantity":"0.0011","positionSide":"BOTH","side":"BUY","success":true}]}"#).unwrap();
36313631
let expected_response : models::MovePositionForSubAccountResponse = serde_json::from_value(resp_json.clone()).expect("should parse into models::MovePositionForSubAccountResponse");
@@ -3646,7 +3646,7 @@ mod tests {
36463646
"from_user_email_example".to_string(),
36473647
"to_user_email_example".to_string(),
36483648
"product_type_example".to_string(),
3649-
[].to_vec(),
3649+
vec![],
36503650
)
36513651
.build()
36523652
.unwrap();

src/sub_account/rest_api/models/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ pub mod get_summary_of_sub_accounts_margin_account_response_sub_account_list_inn
8181
pub use self::get_summary_of_sub_accounts_margin_account_response_sub_account_list_inner::GetSummaryOfSubAccountsMarginAccountResponseSubAccountListInner;
8282
pub mod margin_transfer_for_sub_account_response;
8383
pub use self::margin_transfer_for_sub_account_response::MarginTransferForSubAccountResponse;
84+
pub mod move_position_for_sub_account_order_args_parameter_inner;
85+
pub use self::move_position_for_sub_account_order_args_parameter_inner::MovePositionForSubAccountOrderArgsParameterInner;
8486
pub mod move_position_for_sub_account_response;
8587
pub use self::move_position_for_sub_account_response::MovePositionForSubAccountResponse;
8688
pub mod move_position_for_sub_account_response_move_position_orders_inner;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Binance Sub Account REST API
3+
*
4+
* OpenAPI Specification for the Binance Sub Account REST API
5+
*
6+
* The version of the OpenAPI document: 1.0.0
7+
*
8+
*
9+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10+
* https://openapi-generator.tech
11+
* Do not edit the class manually.
12+
*/
13+
14+
#![allow(unused_imports)]
15+
use crate::sub_account::rest_api::models;
16+
use serde::{Deserialize, Serialize};
17+
18+
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19+
pub struct MovePositionForSubAccountOrderArgsParameterInner {
20+
#[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
21+
pub symbol: Option<String>,
22+
#[serde(rename = "quantity", skip_serializing_if = "Option::is_none")]
23+
pub quantity: Option<rust_decimal::Decimal>,
24+
#[serde(rename = "positionSide", skip_serializing_if = "Option::is_none")]
25+
pub position_side: Option<String>,
26+
}
27+
28+
impl MovePositionForSubAccountOrderArgsParameterInner {
29+
#[must_use]
30+
pub fn new() -> MovePositionForSubAccountOrderArgsParameterInner {
31+
MovePositionForSubAccountOrderArgsParameterInner {
32+
symbol: None,
33+
quantity: None,
34+
position_side: None,
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)