openlimits_coinbase/model/websocket/
open.rs

1use rust_decimal::prelude::Decimal;
2use serde::Deserialize;
3use super::shared::string_to_decimal;
4
5#[derive(Deserialize, Debug, Clone, PartialEq)]
6pub struct Open {
7    pub time: String,
8    pub product_id: String,
9    pub sequence: usize,
10    pub order_id: String,
11    #[serde(with = "string_to_decimal")]
12    pub price: Decimal,
13    #[serde(with = "string_to_decimal")]
14    pub remaining_size: Decimal,
15    pub side: super::OrderSide,
16    pub user_id: Option<String>,
17    #[serde(default)]
18    pub profile_id: Option<String>,
19}