Skip to main content

openlimits_coinbase/model/websocket/
activate.rs

1use rust_decimal::prelude::Decimal;
2use serde::Deserialize;
3use super::StopType;
4use super::shared::string_to_decimal;
5
6#[derive(Deserialize, Debug, Clone, PartialEq)]
7pub struct Activate {
8    pub product_id: String,
9    #[serde(with = "string_to_decimal")]
10    pub timestamp: Decimal,
11    pub order_id: String,
12    pub stop_type: StopType,
13    #[serde(with = "string_to_decimal")]
14    pub size: Decimal,
15    #[serde(with = "string_to_decimal")]
16    pub funds: Decimal,
17    #[serde(with = "string_to_decimal")]
18    pub taker_fee_rate: Decimal,
19    pub private: bool,
20    pub user_id: Option<String>,
21    #[serde(default)]
22    pub profile_id: Option<String>,
23}