deribit_http/model/
deposit.rs

1/******************************************************************************
2   Author: Joaquín Béjar García
3   Email: jb@taunais.com
4   Date: 15/9/25
5******************************************************************************/
6use pretty_simple_display::{DebugPretty, DisplaySimple};
7use serde::{Deserialize, Serialize};
8use serde_with::skip_serializing_none;
9
10/// Deposit information
11#[skip_serializing_none]
12#[derive(DebugPretty, DisplaySimple, Clone, Serialize, Deserialize)]
13pub struct Deposit {
14    /// Deposit address
15    pub address: String,
16    /// Deposit amount
17    pub amount: f64,
18    /// Currency of the deposit
19    pub currency: String,
20    /// Current state of the deposit
21    pub state: String,
22    /// Timestamp when deposit was received
23    pub received_timestamp: u64,
24    /// Transaction ID on the blockchain
25    pub transaction_id: Option<String>,
26    /// Timestamp when deposit was last updated
27    #[serde(skip_serializing_if = "Option::is_none")]
28    pub updated_timestamp: Option<u64>,
29}