deribit_http/model/index.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/// Index data
11#[skip_serializing_none]
12#[derive(DebugPretty, DisplaySimple, Clone, Serialize, Deserialize)]
13pub struct IndexData {
14 /// BTC component (optional)
15 pub btc: Option<f64>,
16 /// ETH component (optional)
17 pub eth: Option<f64>,
18 /// USDC component (optional)
19 pub usdc: Option<f64>,
20 /// USDT component (optional)
21 pub usdt: Option<f64>,
22 /// EURR component (optional)
23 pub eurr: Option<f64>,
24 /// EDP (Estimated Delivery Price)
25 pub edp: f64,
26}
27
28/// Index price data
29#[derive(DebugPretty, DisplaySimple, Clone, Serialize, Deserialize)]
30pub struct IndexPriceData {
31 /// Current index price
32 pub index_price: f64,
33 /// Estimated delivery price
34 pub estimated_delivery_price: f64,
35}