Skip to content

Commit 592c4cf

Browse files
author
github-actions
committed
Release v18.0.0
**Pay** ### Changed (1) - Modified response for `get_pay_trade_history()` (`GET /sapi/v1/pay/transactions`): - `data`.`payerInfo`: property `accountId` deleted **Wallet** ### Changed (1) - Modified response for `deposit_history()` (`GET /sapi/v1/capital/deposit/hisrec`): - item property `travelRuleStatus` added
1 parent adbeaee commit 592c4cf

File tree

7 files changed

+29
-13
lines changed

7 files changed

+29
-13
lines changed

CHANGELOG.md

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

3+
## 18.0.0 - 2025-09-15
4+
5+
**Pay**
6+
7+
### Changed (1)
8+
9+
- Modified response for `get_pay_trade_history()` (`GET /sapi/v1/pay/transactions`):
10+
- `data`.`payerInfo`: property `accountId` deleted
11+
12+
**Wallet**
13+
14+
### Changed (1)
15+
16+
- Modified response for `deposit_history()` (`GET /sapi/v1/capital/deposit/hisrec`):
17+
- item property `travelRuleStatus` added
18+
319
## 17.0.0 - 2025-09-09
420

521
**Staking**

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 = "17.0.0"
3+
version = "18.0.0"
44
authors = [ "Binance" ]
55
edition = "2024"
66
resolver = "3"

src/pay/rest_api/apis/pay_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ mod tests {
178178
);
179179
}
180180

181-
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678","accountId":"67736251"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
181+
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
182182
let dummy_response: models::GetPayTradeHistoryResponse =
183183
serde_json::from_value(resp_json.clone())
184184
.expect("should parse into models::GetPayTradeHistoryResponse");
@@ -201,7 +201,7 @@ mod tests {
201201

202202
let params = GetPayTradeHistoryParams::builder().build().unwrap();
203203

204-
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678","accountId":"67736251"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
204+
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
205205
let expected_response : models::GetPayTradeHistoryResponse = serde_json::from_value(resp_json.clone()).expect("should parse into models::GetPayTradeHistoryResponse");
206206

207207
let resp = client.get_pay_trade_history(params).await.expect("Expected a response");
@@ -218,7 +218,7 @@ mod tests {
218218

219219
let params = GetPayTradeHistoryParams::builder().start_time(1623319461670).end_time(1641782889000).limit(100).recv_window(5000).build().unwrap();
220220

221-
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678","accountId":"67736251"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
221+
let resp_json: Value = serde_json::from_str(r#"{"code":"000000","message":"success","data":[{"orderType":"C2C","transactionId":"M_P_71505104267788288","transactionTime":1610090460133,"amount":"23.72469206","currency":"BNB","walletType":1,"walletTypes":[1,2],"fundsDetail":[{"currency":"USDT","amount":"1.2","walletAssetCost":[{"1":"0.6"},{"2":"0.6"}]},{"currency":"ETH","amount":"0.0001","walletAssetCost":[{"1":"0.00005"},{"2":"0.00005"}]}],"payerInfo":{"name":"Jack","type":"USER","binanceId":"12345678"},"receiverInfo":{"name":"Alan","type":"MERCHANT","email":"[email protected]","binanceId":"34355667","accountId":"21326891","countryCode":"1","phoneNumber":"8057651210","mobileCode":"US","extend":{"institutionName":"","cardNumber":"","digitalWalletId":""}}}],"success":true}"#).unwrap();
222222
let expected_response : models::GetPayTradeHistoryResponse = serde_json::from_value(resp_json.clone()).expect("should parse into models::GetPayTradeHistoryResponse");
223223

224224
let resp = client.get_pay_trade_history(params).await.expect("Expected a response");

src/pay/rest_api/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,19 @@ impl RestApi {
101101
/// * payerInfo : binanceId
102102
/// * receiverInfo : name, binanceId/accountId/email/countryCode/phoneNumber/mobileCode (based on user input)
103103
/// * Receiver's perspective when orderType is C2C
104-
/// * payerInfo : name, accountId
104+
/// * payerInfo : name
105105
/// * receiverInfo : binanceId
106106
/// * Sender's perspective when orderType is `CRYPTO_BOX`
107107
/// * payerInfo : binanceId
108108
/// * receiverInfo : name(the value is always "Crypto Box")
109109
/// * Receiver's perspective when orderType is `CRYPTO_BOX`
110-
/// * payerInfo : name, accountId
110+
/// * payerInfo : name
111111
/// * receiverInfo : binanceId
112112
/// * Sender's perspective when orderType is PAY
113113
/// * payerInfo : binanceId
114114
/// * receiverInfo : name
115115
/// * Receiver's perspective when orderType is PAY
116-
/// * payerInfo : name, accountId
116+
/// * payerInfo : name
117117
/// * receiverInfo : binanceId, name
118118
/// * Sender's perspective when orderType is `PAY_REFUND`
119119
/// * payerInfo : binanceId, name

src/pay/rest_api/models/get_pay_trade_history_response_data_inner_payer_info.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ pub struct GetPayTradeHistoryResponseDataInnerPayerInfo {
2323
pub r#type: Option<String>,
2424
#[serde(rename = "binanceId", skip_serializing_if = "Option::is_none")]
2525
pub binance_id: Option<String>,
26-
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
27-
pub account_id: Option<String>,
2826
}
2927

3028
impl GetPayTradeHistoryResponseDataInnerPayerInfo {
@@ -34,7 +32,6 @@ impl GetPayTradeHistoryResponseDataInnerPayerInfo {
3432
name: None,
3533
r#type: None,
3634
binance_id: None,
37-
account_id: None,
3835
}
3936
}
4037
}

src/wallet/rest_api/apis/capital_api.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ mod tests {
921921
);
922922
}
923923

924-
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0}]"#).unwrap();
924+
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":1}]"#).unwrap();
925925
let dummy_response: Vec<models::DepositHistoryResponseInner> =
926926
serde_json::from_value(resp_json.clone())
927927
.expect("should parse into Vec<models::DepositHistoryResponseInner>");
@@ -1200,7 +1200,7 @@ mod tests {
12001200

12011201
let params = DepositHistoryParams::builder().build().unwrap();
12021202

1203-
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0}]"#).unwrap();
1203+
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":1}]"#).unwrap();
12041204
let expected_response : Vec<models::DepositHistoryResponseInner> = serde_json::from_value(resp_json.clone()).expect("should parse into Vec<models::DepositHistoryResponseInner>");
12051205

12061206
let resp = client.deposit_history(params).await.expect("Expected a response");
@@ -1217,7 +1217,7 @@ mod tests {
12171217

12181218
let params = DepositHistoryParams::builder().include_source(false).coin("coin_example".to_string()).status(789).start_time(1623319461670).end_time(1641782889000).offset(0).limit(7).recv_window(5000).tx_id("1".to_string()).build().unwrap();
12191219

1220-
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0}]"#).unwrap();
1220+
let resp_json: Value = serde_json::from_str(r#"[{"id":"769800519366885376","amount":"0.001","coin":"BNB","network":"BNB","status":1,"address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23","addressTag":"101764890","txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC","insertTime":1661493146000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":0},{"id":"769754833590042625","amount":"0.50000000","coin":"IOTA","network":"IOTA","status":1,"address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW","addressTag":"","txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999","insertTime":1599620082000,"completeTime":1661493146000,"transferType":0,"confirmTimes":"1/1","unlockConfirm":0,"walletType":0,"travelRuleStatus":1}]"#).unwrap();
12211221
let expected_response : Vec<models::DepositHistoryResponseInner> = serde_json::from_value(resp_json.clone()).expect("should parse into Vec<models::DepositHistoryResponseInner>");
12221222

12231223
let resp = client.deposit_history(params).await.expect("Expected a response");

src/wallet/rest_api/models/deposit_history_response_inner.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ pub struct DepositHistoryResponseInner {
4545
pub unlock_confirm: Option<i64>,
4646
#[serde(rename = "walletType", skip_serializing_if = "Option::is_none")]
4747
pub wallet_type: Option<i64>,
48+
#[serde(rename = "travelRuleStatus", skip_serializing_if = "Option::is_none")]
49+
pub travel_rule_status: Option<i64>,
4850
}
4951

5052
impl DepositHistoryResponseInner {
@@ -65,6 +67,7 @@ impl DepositHistoryResponseInner {
6567
confirm_times: None,
6668
unlock_confirm: None,
6769
wallet_type: None,
70+
travel_rule_status: None,
6871
}
6972
}
7073
}

0 commit comments

Comments
 (0)