Skip to main content

bybit/models/
withdrawable_amount_response.rs

1use crate::prelude::*;
2
3/// Withdrawable amount response
4#[derive(Debug, Serialize, Deserialize, Clone)]
5pub struct WithdrawableAmountResponse {
6    /// The frozen amount due to risk, in USD
7    #[serde(rename = "limitAmountUsd")]
8    pub limit_amount_usd: String,
9    /// Withdrawable amount by account type
10    #[serde(rename = "withdrawableAmount")]
11    pub withdrawable_amount: WithdrawableAmountDetails,
12}
13
14/// Withdrawable amount details by account type
15#[derive(Debug, Serialize, Deserialize, Clone)]
16pub struct WithdrawableAmountDetails {
17    /// Spot wallet, it is not returned if spot wallet is removed
18    #[serde(rename = "SPOT")]
19    pub spot: Option<WalletWithdrawableAmount>,
20    /// Funding wallet
21    #[serde(rename = "FUND")]
22    pub fund: Option<WalletWithdrawableAmount>,
23    /// Unified wallet
24    #[serde(rename = "UTA")]
25    pub uta: Option<WalletWithdrawableAmount>,
26}
27
28/// Wallet withdrawable amount details
29#[derive(Debug, Serialize, Deserialize, Clone)]
30pub struct WalletWithdrawableAmount {
31    /// Coin name
32    pub coin: String,
33    /// Amount that can be withdrawn
34    #[serde(rename = "withdrawableAmount")]
35    pub withdrawable_amount: String,
36    /// Available balance
37    #[serde(rename = "availableBalance")]
38    pub available_balance: String,
39}