Skip to content

Commit

Permalink
Merge pull request #18 from binance/rc-1.2.0
Browse files Browse the repository at this point in the history
Release v1.2.0
  • Loading branch information
alplabin authored Jun 26, 2024
2 parents 5bf8b72 + f35473c commit e7293ef
Show file tree
Hide file tree
Showing 34 changed files with 203 additions and 1,475 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## 1.2.0 - 2024-06-26

### Added
- Margin endpoints
- `POST /sapi/v1/margin/borrow-repay`
- `GET /sapi/v1/margin/borrow-repay`
- Implemented subscription from slice of Streams
- Added features `futures-util` and `tokio` to `enable-tokio-tungstenite`
- Enabled `binance_tokio_client` to be used within `async` context and `Tokio::Spawn` runtime

### Updated
- Upgraded following dependencies:
- `strum` to version `0.26.2`
- `base64` to version `0.22.1`
- `tungstenite` to version `0.23.0`
- `env_logger` to version `0.11.3`
- `cargo-audit` to version `0.20.0`
- Margin endpoints
- `GET /sapi/v1/margin/transfer`: add parameter `isolatedSymbol`
- `GET /sapi/v1/margin/allAssets`: add parameter `asset`
- `GET /sapi/v1/margin/allPairs`: add parameter `symbol`
- `GET /sapi/v1/margin/isolated/allPairs`: add parameter `symbol`


### Deleted
- Margin endpoints
- `POST /sapi/v1/margin/transfer`
- `POST /sapi/v1/margin/isolated/transfer`
- `POST /sapi/v1/margin/loan`
- `POST /sapi/v1/margin/repay`
- `GET /sapi/v1/margin/isolated/transfer`
- `GET /sapi/v1/margin/asset`
- `GET /sapi/v1/margin/pair`
- `GET /sapi/v1/margin/isolated/pair`
- `GET /sapi/v1/margin/loan`
- `GET /sapi/v1/margin/repay`
- `GET /sapi/v1/margin/dribblet`
- `GET /sapi/v1/margin/dust`
- `POST /sapi/v1/margin/dust`

## 1.1.0 - 2023-12-21

### Updated
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default = ["enable-ureq", "enable-tungstenite"]
enable-hyper = [ "hyper", "hyper-tls", "serde_json", "futures-util", "tokio" ]
enable-ureq = [ "ureq", "serde_json" ]
enable-tungstenite = ["tungstenite"]
enable-tokio-tungstenite = ["tokio-tungstenite"]
enable-tokio-tungstenite = ["tokio-tungstenite", "futures-util", "tokio"]
full = ["enable-hyper", "enable-tungstenite", "enable-ureq", "enable-tokio-tungstenite"]

[dependencies]
Expand All @@ -28,10 +28,10 @@ sha2 = { version = "0.10.6", default-features = false, features = ["oid"] }
url = "2.2.2"
rust_decimal = "1.24.0"
http = "0.2.7"
strum = { version = "0.24", features = ["derive"] }
strum = { version = "0.26.2", features = ["derive"] }
rand = "0.8.5"
signature = "2.2.0"
base64 = "0.13.1"
base64 = "0.22.1"
ed25519-dalek = { version = "2.1.0", features = ["serde", "zeroize", "rand_core", "digest", "pkcs8", "pem"] }

# enable-ureq
Expand All @@ -45,14 +45,14 @@ futures-util = {version = "0.3.21", optional = true }
tokio = { version = "1", features = ["time"], optional = true }

# enable-tungstenite
tungstenite = {version = "0.20.1", features = ["native-tls"], optional = true}
tungstenite = {version = "0.23.0", features = ["native-tls"], optional = true}

# enable-tokio-tungstenite
tokio-tungstenite = {version = "0.17.1", features = ["native-tls"], optional = true}
tokio-tungstenite = {version = "0.23.1", features = ["native-tls"], optional = true}

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
env_logger = "0.10.0"
env_logger = "0.11.3"
tower = "0.4.12"
rust_decimal_macros = "1.24.0"
cargo-audit = "0.17.4"
cargo-audit = "0.20.0"
46 changes: 1 addition & 45 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ binance_spot_connector_rust = { path = "..", features = ["full"]}
log = "0.4.14"
tokio = { version = "1", features = ["full"] }
futures-util = "0.3.21"
env_logger = "0.9.0"
env_logger = "0.11.3"
rust_decimal = "1.24.0"
rust_decimal_macros = "1.24.0"

Expand Down Expand Up @@ -145,38 +145,10 @@ path="trade/my_trades.rs"
name="trade_order_limit_usage"
path="trade/order_limit_usage.rs"

[[example]]
name="margin_margin_transfer"
path="margin/margin_transfer.rs"

[[example]]
name="margin_margin_transfer_history"
path="margin/margin_transfer_history.rs"

[[example]]
name="margin_margin_borrow"
path="margin/margin_borrow.rs"

[[example]]
name="margin_margin_loan_record"
path="margin/margin_loan_record.rs"

[[example]]
name="margin_margin_repay"
path="margin/margin_repay.rs"

[[example]]
name="margin_margin_repay_record"
path="margin/margin_repay_record.rs"

[[example]]
name="margin_margin_asset"
path="margin/margin_asset.rs"

[[example]]
name="margin_margin_pair"
path="margin/margin_pair.rs"

[[example]]
name="margin_margin_all_assets"
path="margin/margin_all_assets.rs"
Expand Down Expand Up @@ -257,14 +229,6 @@ path="margin/margin_max_borrowable.rs"
name="margin_margin_max_transferable"
path="margin/margin_max_transferable.rs"

[[example]]
name="margin_isolated_margin_transfer_history"
path="margin/isolated_margin_transfer_history.rs"

[[example]]
name="margin_isolated_margin_transfer"
path="margin/isolated_margin_transfer.rs"

[[example]]
name="margin_isolated_margin_account"
path="margin/isolated_margin_account.rs"
Expand All @@ -281,10 +245,6 @@ path="margin/isolated_margin_enable_account.rs"
name="margin_isolated_margin_account_limit"
path="margin/isolated_margin_account_limit.rs"

[[example]]
name="margin_isolated_margin_symbol"
path="margin/isolated_margin_symbol.rs"

[[example]]
name="margin_isolated_margin_all_symbols"
path="margin/isolated_margin_all_symbols.rs"
Expand Down Expand Up @@ -317,10 +277,6 @@ path="margin/isolated_margin_tier_data.rs"
name="margin_margin_order_count_usage"
path="margin/margin_order_count_usage.rs"

[[example]]
name="margin_margin_dustlog"
path="margin/margin_dustlog.rs"

[[example]]
name="wallet_system_status"
path="wallet/system_status.rs"
Expand Down
21 changes: 0 additions & 21 deletions examples/margin/isolated_margin_transfer.rs

This file was deleted.

24 changes: 0 additions & 24 deletions examples/margin/isolated_margin_transfer_history.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ async fn main() -> Result<(), Error> {
.init();
let credentials = Credentials::from_hmac("api-key".to_owned(), "api-secret".to_owned());
let client = BinanceHttpClient::default().credentials(credentials);
let request = margin::margin_dustlog();
let request =
margin::margin_account_borrow_repay("BNB", "FALSE", "BNBUSDT", "1.0", "BORROW");
let data = client.send(request).await?.into_body_str().await?;
log::info!("{}", data);
Ok(())
Expand Down
19 changes: 0 additions & 19 deletions examples/margin/margin_asset.rs

This file was deleted.

20 changes: 0 additions & 20 deletions examples/margin/margin_borrow.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ async fn main() -> Result<(), Error> {
.init();
let credentials = Credentials::from_hmac("api-key".to_owned(), "api-secret".to_owned());
let client = BinanceHttpClient::default().credentials(credentials);
let request = margin::isolated_margin_symbol("BNBUSDT");
let request =
margin::margin_borrow_repay_records("BORROW");
let data = client.send(request).await?.into_body_str().await?;
log::info!("{}", data);
Ok(())
Expand Down
22 changes: 0 additions & 22 deletions examples/margin/margin_loan_record.rs

This file was deleted.

19 changes: 0 additions & 19 deletions examples/margin/margin_pair.rs

This file was deleted.

20 changes: 0 additions & 20 deletions examples/margin/margin_repay.rs

This file was deleted.

22 changes: 0 additions & 22 deletions examples/margin/margin_repay_record.rs

This file was deleted.

20 changes: 0 additions & 20 deletions examples/margin/margin_transfer.rs

This file was deleted.

Loading

0 comments on commit e7293ef

Please sign in to comment.