pub struct WithdrawParams {
pub currency: String,
pub amount: Decimal,
pub address: String,
pub tag: Option<String>,
pub network: Option<String>,
pub fee: Option<Decimal>,
}Expand description
Parameters for withdrawing funds.
§Example
use ccxt_core::types::params::WithdrawParams;
use rust_decimal_macros::dec;
let params = WithdrawParams::new("USDT", dec!(100), "TAddress...")
.network("TRC20")
.tag("memo123");Fields§
§currency: StringCurrency code to withdraw.
amount: DecimalAmount to withdraw.
address: StringDestination address.
tag: Option<String>Address tag/memo (for certain chains).
network: Option<String>Specific network (e.g., “ERC20”, “TRC20”).
fee: Option<Decimal>Custom withdrawal fee.
Implementations§
Source§impl WithdrawParams
impl WithdrawParams
Sourcepub fn new(currency: &str, amount: Decimal, address: &str) -> WithdrawParams
pub fn new(currency: &str, amount: Decimal, address: &str) -> WithdrawParams
Create new withdrawal parameters.
Sourcepub fn tag(self, tag: &str) -> WithdrawParams
pub fn tag(self, tag: &str) -> WithdrawParams
Set the address tag/memo.
Sourcepub fn network(self, network: &str) -> WithdrawParams
pub fn network(self, network: &str) -> WithdrawParams
Set the network.
Sourcepub fn fee(self, fee: Decimal) -> WithdrawParams
pub fn fee(self, fee: Decimal) -> WithdrawParams
Set a custom fee.
Trait Implementations§
Source§impl Clone for WithdrawParams
impl Clone for WithdrawParams
Source§fn clone(&self) -> WithdrawParams
fn clone(&self) -> WithdrawParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WithdrawParams
impl RefUnwindSafe for WithdrawParams
impl Send for WithdrawParams
impl Sync for WithdrawParams
impl Unpin for WithdrawParams
impl UnwindSafe for WithdrawParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more