pub struct GetAccountCoinBalanceParams {
pub account_type: AccountType,
pub coin: String,
pub member_id: Option<String>,
pub to_member_id: Option<String>,
pub to_account_type: Option<AccountType>,
pub with_bonus: Option<i64>,
pub with_transfer_safe_amount: Option<i64>,
pub with_ltv_transfer_safe_amount: Option<i64>,
}Expand description
Query params for
Client::get_account_coin_balance.
Fields§
§account_type: AccountTypeAccount type.
coin: StringCoin name, uppercase only
member_id: Option<String>Master UID’s api key can query itself or its sub UIDs’ coin balance. If not passed, then by default it queries master UID’s coin balance
to_member_id: Option<String>Used together with to_account_type to query the balance safe to transfer between two
UIDs’ wallets
to_account_type: Option<AccountType>To account type. Required when querying the transferable balance between different account types.
with_bonus: Option<i64>Whether to query bonus. 0: not query, 1: query. Valid for account_type=FUND. Default: 0
with_transfer_safe_amount: Option<i64>Whether to query the available amount that is safe to withdraw or transfer. 0(default): not query, 1: query
with_ltv_transfer_safe_amount: Option<i64>Whether to query the available amount that is safe to transfer under the risk level of the OTC loan account. 0(default): not query, 1: query
Implementations§
Source§impl GetAccountCoinBalanceParams
impl GetAccountCoinBalanceParams
Sourcepub fn new(account_type: AccountType, coin: impl Into<String>) -> Self
pub fn new(account_type: AccountType, coin: impl Into<String>) -> Self
Create with the required fields; set the optional ones with the with_* methods.
Sourcepub fn with_member_id(self, v: impl Into<String>) -> Self
pub fn with_member_id(self, v: impl Into<String>) -> Self
Set member_id: master UID’s api key can query itself or its sub UIDs’ coin balance. If not passed, then by default it queries master UID’s coin balance.
Sourcepub fn with_to_member_id(self, v: impl Into<String>) -> Self
pub fn with_to_member_id(self, v: impl Into<String>) -> Self
Set to_member_id: used together with to_account_type to query the balance safe to transfer between two UIDs’ wallets.
Sourcepub fn with_to_account_type(self, v: AccountType) -> Self
pub fn with_to_account_type(self, v: AccountType) -> Self
Set to_account_type: to account type. Required when querying the transferable balance between different account types.
Sourcepub fn with_bonus(self, v: i64) -> Self
pub fn with_bonus(self, v: i64) -> Self
Set withBonus: 1 includes the bonus in the balance.
Sourcepub fn with_transfer_safe_amount(self, v: i64) -> Self
pub fn with_transfer_safe_amount(self, v: i64) -> Self
Set withTransferSafeAmount: 1 also returns the amount that can be transferred safely.
Sourcepub fn with_ltv_transfer_safe_amount(self, v: i64) -> Self
pub fn with_ltv_transfer_safe_amount(self, v: i64) -> Self
Set withLtvTransferSafeAmount: 1 also returns the safely transferable amount of an institutional loan account.