Struct binance::savings::Savings[][src]

pub struct Savings {
    pub client: Client,
    pub recv_window: u64,
}

Fields

client: Clientrecv_window: u64

Implementations

Get all coins available for deposit and withdrawal

Examples

use binance::{api::*, savings::*, config::*};
let savings: Savings = Binance::new_with_env(&Config::testnet());
let coins = tokio_test::block_on(savings.get_all_coins());
assert!(coins.is_ok(), "{:?}", coins)

Fetch details of assets supported on Binance.

Examples

use binance::{api::*, savings::*, config::*};
let savings: Savings = Binance::new_with_env(&Config::testnet());
let coins = tokio_test::block_on(savings.asset_detail(Some("CTR".to_string())));
assert!(coins.is_ok(), "{:?}", coins)

Fetch deposit address with network.

You can get the available networks using get_all_coins. If no network is specified, the address for the default network is returned.

Examples

use binance::{api::*, savings::*, config::*};
let savings: Savings = Binance::new_with_env(&Config::testnet());
let coins = tokio_test::block_on(savings.deposit_address("CTR", None));
assert!(coins.is_ok(), "{:?}", coins)

Trait Implementations

Create a binance API using environment variables for credentials BINANCE_API_KEY= BINANCE_API_SECRET_KEY= Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.