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
use crate::MarketType;
use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};
#[derive(Clone, Serialize, Deserialize)]
pub struct Fees {
pub maker: f64,
pub taker: f64,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct Precision {
pub tick_size: f64,
pub lot_size: f64,
}
#[derive(Clone, Serialize, Deserialize, PartialEq)]
pub struct QuantityLimit {
pub min: f64,
#[serde(skip_serializing_if = "Option::is_none")]
pub max: Option<f64>,
}
#[derive(Clone, Serialize, Deserialize)]
pub struct Market {
pub exchange: String,
pub market_type: MarketType,
pub symbol: String,
pub base_id: String,
pub quote_id: String,
pub base: String,
pub quote: String,
pub active: bool,
pub margin: bool,
pub fees: Fees,
pub precision: Precision,
#[serde(skip_serializing_if = "Option::is_none")]
pub quantity_limit: Option<QuantityLimit>,
#[serde(skip_serializing_if = "Option::is_none")]
pub contract_value: Option<f64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub delivery_date: Option<u64>,
pub info: Map<String, Value>,
}