Struct binance::savings::Savings [−][src]
pub struct Savings { pub client: Client, pub recv_window: u64, }
Fields
client: Client
recv_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)
pub async fn asset_detail(
&self,
asset: Option<String>
) -> Result<BTreeMap<String, AssetDetail>>
pub async fn asset_detail(
&self,
asset: Option<String>
) -> Result<BTreeMap<String, AssetDetail>>
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)
pub async fn deposit_address<S>(
&self,
coin: S,
network: Option<String>
) -> Result<DepositAddress> where
S: Into<String>,
pub async fn deposit_address<S>(
&self,
coin: S,
network: Option<String>
) -> Result<DepositAddress> where
S: Into<String>,
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
Auto Trait Implementations
impl !RefUnwindSafe for Savings
impl !UnwindSafe for Savings
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self