Skip to main content

sandbox_quant/exchange/binance/
orders.rs

1use crate::domain::market::Market;
2use crate::domain::order_type::OrderType;
3
4#[derive(Debug, Clone, Copy, PartialEq)]
5pub struct RawSymbolRules {
6    pub min_qty: f64,
7    pub max_qty: f64,
8    pub step_size: f64,
9}
10
11#[derive(Debug, Clone, PartialEq)]
12pub struct RawCloseOrderAck {
13    pub remote_order_id: String,
14}
15
16#[derive(Debug, Clone, PartialEq)]
17pub struct RawOpenOrder {
18    pub order_id: Option<String>,
19    pub client_order_id: String,
20    pub symbol: String,
21    pub market: Market,
22    pub side: &'static str,
23    pub orig_qty: f64,
24    pub executed_qty: f64,
25    pub reduce_only: bool,
26    pub status: String,
27}
28
29#[derive(Debug, Clone, PartialEq)]
30pub struct RawCloseOrderRequest {
31    pub symbol: String,
32    pub market: Market,
33    pub side: &'static str,
34    pub qty: String,
35    pub order_type: OrderType,
36    pub reduce_only: bool,
37}