deribit_http/model/
withdrawal.rs1use pretty_simple_display::{DebugPretty, DisplaySimple};
7use serde::{Deserialize, Serialize};
8
9#[derive(DebugPretty, DisplaySimple, Clone, PartialEq, Serialize, Deserialize)]
11pub struct WithdrawalPriority {
12 pub name: String,
14 pub value: f64,
16}
17
18impl WithdrawalPriority {
19 pub fn new(name: String, value: f64) -> Self {
21 Self { name, value }
22 }
23
24 pub fn very_low() -> Self {
26 Self::new("very_low".to_string(), 0.15)
27 }
28
29 pub fn low() -> Self {
31 Self::new("low".to_string(), 0.5)
32 }
33
34 pub fn medium() -> Self {
36 Self::new("medium".to_string(), 1.0)
37 }
38
39 pub fn high() -> Self {
41 Self::new("high".to_string(), 1.2)
42 }
43
44 pub fn very_high() -> Self {
46 Self::new("very_high".to_string(), 1.5)
47 }
48}