1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
#[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct UserInfo { pub user_id: String, pub sub_name: String, pub remarks: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct AccountId { pub id: String, } pub enum AccountType { Main, Trade, Margin, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct Accounts { pub id: String, pub currency: String, pub r#type: String, pub balance: String, pub available: String, pub holds: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct SingleAccount { pub currency: String, pub balance: String, pub available: String, pub holds: Option<String>, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct AccountInfo { pub currency: String, pub amount: String, pub fee: String, pub balance: String, pub biz_type: String, pub direction: String, pub created_at: i64, pub context: Option<String>, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct AccountHolds { pub currency: String, pub hold_amount: String, pub biz_type: String, pub order_id: String, pub created_at: i64, pub updated_at: i64, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct SubAccountBalances { pub sub_user_id: String, pub sub_name: String, pub main_accounts: Vec<SubAccountInfo>, pub trade_accounts: Vec<SubAccountInfo>, pub margin_accounts: Vec<SubAccountInfo>, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct SubAccountInfo { pub currency: String, pub balance: String, pub available: String, pub holds: String, pub base_currency: String, pub base_currency_price: String, pub base_amount: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct TransferableBalance { pub currency: String, pub balance: String, pub available: String, pub holds: String, pub transferable: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct OrderId { pub order_id: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DepositAddress { pub address: String, pub memo: String, pub chain: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DepositList { pub address: String, pub memo: String, pub amount: i32, pub fee: f32, pub currency: String, pub is_inner: bool, pub wallet_tx_id: String, pub status: String, pub remark: String, pub created_at: i64, pub updated_at: i64, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct DepositListV1 { pub currency: String, pub created_at: i64, pub amount: String, pub wallet_tx_id: String, pub is_inner: bool, pub status: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawalList { pub id: String, pub address: String, pub memo: String, pub currency: String, pub amount: f32, pub fee: f32, pub wallet_tx_id: String, pub is_inner: bool, pub status: String, pub remark: String, pub created_at: i64, pub updated_at: i64, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawalListV1 { pub currency: String, pub created_at: i64, pub amount: String, pub address: String, pub wallet_tx_id: String, pub is_inner: bool, pub status: String, } #[allow(non_snake_case)] #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawalQuotas { pub currency: String, pub limit_BTC_amount: String, pub used_BTC_amount: String, pub limit_amount: String, pub remain_amount: String, pub available_amount: String, pub withdrawal_min_fee: String, pub inner_withdraw_min_fee: String, pub withdraw_min_size: String, pub is_withdraw_enabled: String, pub precision: i32, pub chain: String, } #[derive(Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct WithdrawalId { withdrawal_id: String, }