Skip to content

Commit 8e44775

Browse files
author
github-actions
committed
Release v37.0.0
### Added (1) - Expose `code` on REST API response errors. **Alpha** - Initial release. **Derivatives Trading Portfolio Margin** ### Changed (1) #### REST API - Modified response for `query_current_cm_open_order()` (`GET /papi/v1/cm/openOrder`): - type `object` → `array` - property `side` deleted - property `reduceOnly` deleted - property `orderId` deleted - property `updateTime` deleted - property `status` deleted - property `avgPrice` deleted - property `clientOrderId` deleted - property `type` deleted - property `time` deleted - property `cumBase` deleted - property `executedQty` deleted - property `price` deleted - property `symbol` deleted - property `positionSide` deleted - property `origQty` deleted - property `origType` deleted - property `pair` deleted - property `timeInForce` deleted **Mining** ### Changed (2) - Deleted parameter `userName` - affected methods: - `hashrate_resale_detail()` (`GET /sapi/v1/mining/hash-transfer/profit/details`) - Modified response for `hashrate_resale_list()` (`GET /sapi/v1/mining/hash-transfer/config/details/list`): - `data`.`configDetails`.items: property `type` added - `data`.`configDetails`.items: item property `type` added **Simple Earn** ### Changed (1) - Modified response for `get_bfusd_quota_details()` (`GET /sapi/v1/bfusd/quota`): - property `subscribeEnable` deleted - property `redeemEnable` deleted **Vip Loan** ### Changed (1) - Modified response for `get_vip_loan_ongoing_orders()` (`GET /sapi/v1/loan/vip/ongoing/orders`): - `rows`.items: property `loanRate` added - `rows`.items: item property `loanRate` added **Wallet** ### Changed (4) - Added parameter `accountType` - affected methods: - `dustlog()` (`GET /sapi/v1/asset/dribblet`) - Added parameter `asset` - affected methods: - `asset_detail()` (`GET /sapi/v1/asset/assetDetail`) - Modified response for `withdraw_history_v1()` (`GET /sapi/v1/localentity/withdraw/history`): - items: property `addressTag` deleted - items: item property `addressTag` deleted - Modified response for `withdraw_history_v2()` (`GET /sapi/v2/localentity/withdraw/history`): - items: property `addressTag` deleted - items: item property `addressTag` deleted
1 parent 10d4a0f commit 8e44775

File tree

141 files changed

+6464
-2518
lines changed

Some content is hidden

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

141 files changed

+6464
-2518
lines changed

CHANGELOG.md

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

3+
## 37.0.0 - 2026-01-20
4+
5+
### Added (1)
6+
7+
- Expose `code` on REST API response errors.
8+
9+
**Alpha**
10+
11+
- Initial release.
12+
13+
**Derivatives Trading Portfolio Margin**
14+
15+
### Changed (1)
16+
17+
#### REST API
18+
19+
- Modified response for `query_current_cm_open_order()` (`GET /papi/v1/cm/openOrder`):
20+
- type `object``array`
21+
- property `side` deleted
22+
- property `reduceOnly` deleted
23+
- property `orderId` deleted
24+
- property `updateTime` deleted
25+
- property `status` deleted
26+
- property `avgPrice` deleted
27+
- property `clientOrderId` deleted
28+
- property `type` deleted
29+
- property `time` deleted
30+
- property `cumBase` deleted
31+
- property `executedQty` deleted
32+
- property `price` deleted
33+
- property `symbol` deleted
34+
- property `positionSide` deleted
35+
- property `origQty` deleted
36+
- property `origType` deleted
37+
- property `pair` deleted
38+
- property `timeInForce` deleted
39+
40+
**Mining**
41+
42+
### Changed (2)
43+
44+
- Deleted parameter `userName`
45+
- affected methods:
46+
- `hashrate_resale_detail()` (`GET /sapi/v1/mining/hash-transfer/profit/details`)
47+
- Modified response for `hashrate_resale_list()` (`GET /sapi/v1/mining/hash-transfer/config/details/list`):
48+
- `data`.`configDetails`.items: property `type` added
49+
- `data`.`configDetails`.items: item property `type` added
50+
51+
**Simple Earn**
52+
53+
### Changed (1)
54+
55+
- Modified response for `get_bfusd_quota_details()` (`GET /sapi/v1/bfusd/quota`):
56+
- property `subscribeEnable` deleted
57+
- property `redeemEnable` deleted
58+
59+
**Vip Loan**
60+
61+
### Changed (1)
62+
63+
- Modified response for `get_vip_loan_ongoing_orders()` (`GET /sapi/v1/loan/vip/ongoing/orders`):
64+
- `rows`.items: property `loanRate` added
65+
- `rows`.items: item property `loanRate` added
66+
67+
**Wallet**
68+
69+
### Changed (4)
70+
71+
- Added parameter `accountType`
72+
- affected methods:
73+
- `dustlog()` (`GET /sapi/v1/asset/dribblet`)
74+
- Added parameter `asset`
75+
- affected methods:
76+
- `asset_detail()` (`GET /sapi/v1/asset/assetDetail`)
77+
- Modified response for `withdraw_history_v1()` (`GET /sapi/v1/localentity/withdraw/history`):
78+
- items: property `addressTag` deleted
79+
- items: item property `addressTag` deleted
80+
81+
- Modified response for `withdraw_history_v2()` (`GET /sapi/v2/localentity/withdraw/history`):
82+
- items: property `addressTag` deleted
83+
- items: item property `addressTag` deleted
84+
385
## 36.0.0 - 2026-01-13
486

587
**Crypto Loan**

Cargo.toml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "binance-sdk"
3-
version = "36.0.0"
3+
version = "37.0.0"
44
authors = [ "Binance" ]
55
edition = "2024"
66
resolver = "3"
@@ -125,6 +125,7 @@ tokio-test = "0.4"
125125
[features]
126126
default = [ ]
127127
algo = [ ]
128+
alpha = [ ]
128129
c2c = [ ]
129130
convert = [ ]
130131
copy_trading = [ ]
@@ -150,6 +151,7 @@ vip_loan = [ ]
150151
wallet = [ ]
151152
all = [
152153
"algo",
154+
"alpha",
153155
"c2c",
154156
"convert",
155157
"copy_trading",
@@ -230,6 +232,31 @@ name = "algo_rest_api_spot_algo_api_time_weighted_average_price_spot_algo"
230232
path = "examples/algo/rest_api/spot_algo_api/time_weighted_average_price_spot_algo.rs"
231233
required-features = [ "algo" ]
232234

235+
[[example]]
236+
name = "alpha_rest_api_market_data_api_aggregated_trades"
237+
path = "examples/alpha/rest_api/market_data_api/aggregated_trades.rs"
238+
required-features = [ "alpha" ]
239+
240+
[[example]]
241+
name = "alpha_rest_api_market_data_api_get_exchange_info"
242+
path = "examples/alpha/rest_api/market_data_api/get_exchange_info.rs"
243+
required-features = [ "alpha" ]
244+
245+
[[example]]
246+
name = "alpha_rest_api_market_data_api_klines"
247+
path = "examples/alpha/rest_api/market_data_api/klines.rs"
248+
required-features = [ "alpha" ]
249+
250+
[[example]]
251+
name = "alpha_rest_api_market_data_api_ticker"
252+
path = "examples/alpha/rest_api/market_data_api/ticker.rs"
253+
required-features = [ "alpha" ]
254+
255+
[[example]]
256+
name = "alpha_rest_api_market_data_api_token_list"
257+
path = "examples/alpha/rest_api/market_data_api/token_list.rs"
258+
required-features = [ "alpha" ]
259+
233260
[[example]]
234261
name = "c2c_rest_api_c2_c_api_get_c2_c_trade_history"
235262
path = "examples/c2c/rest_api/c2_c_api/get_c2_c_trade_history.rs"
@@ -4294,3 +4321,4 @@ required-features = [ "wallet" ]
42944321
name = "wallet_rest_api_travel_rule_api_withdraw_travel_rule"
42954322
path = "examples/wallet/rest_api/travel_rule_api/withdraw_travel_rule.rs"
42964323
required-features = [ "wallet" ]
4324+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ rustup default 1.86.0
3232
All connectors are bundled within the single `binance-sdk` crate. Enable only the modules you need by specifying feature flags. Available features are:
3333

3434
* [`algo`](./src/algo) – Algo Trading connector
35+
* [`alpha`](./src/alpha) – Alpha connector
3536
* [`c2c`](./src/c2c) – C2C connector
3637
* [`convert`](./src/convert) – Convert connector
3738
* [`copy_trading`](./src/copy_trading) – Copy Trading connector
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
use anyhow::{Context, Result};
2+
use std::env;
3+
use tracing::info;
4+
5+
use binance_sdk::alpha::{AlphaRestApi, rest_api::AggregatedTradesParams};
6+
use binance_sdk::config::ConfigurationRestApi;
7+
use binance_sdk::logger;
8+
9+
#[tokio::main]
10+
async fn main() -> Result<()> {
11+
// Initialise logging
12+
logger::init();
13+
14+
// Load credentials from env
15+
let api_key = env::var("API_KEY").context("API_KEY must be set")?;
16+
let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?;
17+
18+
// Build REST config
19+
let rest_conf = ConfigurationRestApi::builder()
20+
.api_key(api_key)
21+
.api_secret(api_secret)
22+
.build()?;
23+
24+
// Create the Alpha REST API client
25+
let rest_client = AlphaRestApi::production(rest_conf);
26+
27+
// Setup the API parameters
28+
let params = AggregatedTradesParams::builder("symbol_example".to_string()).build()?;
29+
30+
// Make the API call
31+
let response = rest_client
32+
.aggregated_trades(params)
33+
.await
34+
.context("aggregated_trades request failed")?;
35+
36+
info!(?response.rate_limits, "aggregated_trades rate limits");
37+
let data = response.data().await?;
38+
info!(?data, "aggregated_trades data");
39+
40+
Ok(())
41+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
use anyhow::{Context, Result};
2+
use std::env;
3+
use tracing::info;
4+
5+
use binance_sdk::alpha::AlphaRestApi;
6+
use binance_sdk::config::ConfigurationRestApi;
7+
use binance_sdk::logger;
8+
9+
#[tokio::main]
10+
async fn main() -> Result<()> {
11+
// Initialise logging
12+
logger::init();
13+
14+
// Load credentials from env
15+
let api_key = env::var("API_KEY").context("API_KEY must be set")?;
16+
let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?;
17+
18+
// Build REST config
19+
let rest_conf = ConfigurationRestApi::builder()
20+
.api_key(api_key)
21+
.api_secret(api_secret)
22+
.build()?;
23+
24+
// Create the Alpha REST API client
25+
let rest_client = AlphaRestApi::production(rest_conf);
26+
27+
// Make the API call
28+
let response = rest_client
29+
.get_exchange_info()
30+
.await
31+
.context("get_exchange_info request failed")?;
32+
33+
info!(?response.rate_limits, "get_exchange_info rate limits");
34+
let data = response.data().await?;
35+
info!(?data, "get_exchange_info data");
36+
37+
Ok(())
38+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
use anyhow::{Context, Result};
2+
use std::env;
3+
use tracing::info;
4+
5+
use binance_sdk::alpha::{AlphaRestApi, rest_api::KlinesParams};
6+
use binance_sdk::config::ConfigurationRestApi;
7+
use binance_sdk::logger;
8+
9+
#[tokio::main]
10+
async fn main() -> Result<()> {
11+
// Initialise logging
12+
logger::init();
13+
14+
// Load credentials from env
15+
let api_key = env::var("API_KEY").context("API_KEY must be set")?;
16+
let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?;
17+
18+
// Build REST config
19+
let rest_conf = ConfigurationRestApi::builder()
20+
.api_key(api_key)
21+
.api_secret(api_secret)
22+
.build()?;
23+
24+
// Create the Alpha REST API client
25+
let rest_client = AlphaRestApi::production(rest_conf);
26+
27+
// Setup the API parameters
28+
let params =
29+
KlinesParams::builder("symbol_example".to_string(), "interval_example".to_string())
30+
.build()?;
31+
32+
// Make the API call
33+
let response = rest_client
34+
.klines(params)
35+
.await
36+
.context("klines request failed")?;
37+
38+
info!(?response.rate_limits, "klines rate limits");
39+
let data = response.data().await?;
40+
info!(?data, "klines data");
41+
42+
Ok(())
43+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
use anyhow::{Context, Result};
2+
use std::env;
3+
use tracing::info;
4+
5+
use binance_sdk::alpha::{AlphaRestApi, rest_api::TickerParams};
6+
use binance_sdk::config::ConfigurationRestApi;
7+
use binance_sdk::logger;
8+
9+
#[tokio::main]
10+
async fn main() -> Result<()> {
11+
// Initialise logging
12+
logger::init();
13+
14+
// Load credentials from env
15+
let api_key = env::var("API_KEY").context("API_KEY must be set")?;
16+
let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?;
17+
18+
// Build REST config
19+
let rest_conf = ConfigurationRestApi::builder()
20+
.api_key(api_key)
21+
.api_secret(api_secret)
22+
.build()?;
23+
24+
// Create the Alpha REST API client
25+
let rest_client = AlphaRestApi::production(rest_conf);
26+
27+
// Setup the API parameters
28+
let params = TickerParams::builder("symbol_example".to_string()).build()?;
29+
30+
// Make the API call
31+
let response = rest_client
32+
.ticker(params)
33+
.await
34+
.context("ticker request failed")?;
35+
36+
info!(?response.rate_limits, "ticker rate limits");
37+
let data = response.data().await?;
38+
info!(?data, "ticker data");
39+
40+
Ok(())
41+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
use anyhow::{Context, Result};
2+
use std::env;
3+
use tracing::info;
4+
5+
use binance_sdk::alpha::AlphaRestApi;
6+
use binance_sdk::config::ConfigurationRestApi;
7+
use binance_sdk::logger;
8+
9+
#[tokio::main]
10+
async fn main() -> Result<()> {
11+
// Initialise logging
12+
logger::init();
13+
14+
// Load credentials from env
15+
let api_key = env::var("API_KEY").context("API_KEY must be set")?;
16+
let api_secret = env::var("API_SECRET").context("API_SECRET must be set")?;
17+
18+
// Build REST config
19+
let rest_conf = ConfigurationRestApi::builder()
20+
.api_key(api_key)
21+
.api_secret(api_secret)
22+
.build()?;
23+
24+
// Create the Alpha REST API client
25+
let rest_client = AlphaRestApi::production(rest_conf);
26+
27+
// Make the API call
28+
let response = rest_client
29+
.token_list()
30+
.await
31+
.context("token_list request failed")?;
32+
33+
info!(?response.rate_limits, "token_list rate limits");
34+
let data = response.data().await?;
35+
info!(?data, "token_list data");
36+
37+
Ok(())
38+
}

examples/mining/rest_api/mining_api/hashrate_resale_detail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async fn main() -> Result<()> {
2525
let rest_client = MiningRestApi::production(rest_conf);
2626

2727
// Setup the API parameters
28-
let params = HashrateResaleDetailParams::builder(1, "user_name_example".to_string()).build()?;
28+
let params = HashrateResaleDetailParams::builder(1).build()?;
2929

3030
// Make the API call
3131
let response = rest_client

0 commit comments

Comments
 (0)