openlimits_exchange/model/
order.rs

1use derive_more::Constructor;
2use rust_decimal::prelude::Decimal;
3use serde::Deserialize;
4use serde::Serialize;
5use super::OrderStatus;
6use super::OrderType;
7use super::Side;
8use super::Trade;
9
10/// This struct represents an order
11#[derive(Serialize, Deserialize, Clone, Constructor, Debug)]
12pub struct Order {
13    pub id: String,
14    pub market_pair: String,
15    pub client_order_id: Option<String>,
16    pub created_at: Option<u64>,
17    pub order_type: OrderType,
18    pub side: Side,
19    pub status: OrderStatus,
20    pub size: Decimal,
21    pub price: Option<Decimal>,
22    pub remaining: Option<Decimal>,
23    pub trades: Vec<Trade>,
24}