openlimits_coinbase/model/
product.rs

1use serde::Deserialize;
2use serde::Serialize;
3use rust_decimal::prelude::Decimal;
4use super::shared::string_to_decimal;
5
6/// This struct represents a product
7#[derive(Debug, Serialize, Deserialize, Clone)]
8pub struct Product {
9    pub id: String,
10    pub display_name: String,
11    pub quote_currency: String,
12    pub base_currency: String,
13    #[serde(with = "string_to_decimal")]
14    pub base_increment: Decimal,
15    #[serde(with = "string_to_decimal")]
16    pub quote_increment: Decimal,
17    #[serde(with = "string_to_decimal")]
18    pub base_min_size: Decimal,
19    #[serde(with = "string_to_decimal")]
20    pub base_max_size: Decimal,
21    pub min_market_funds: String,
22    pub max_market_funds: String,
23    pub status: String,
24    pub status_message: String,
25    pub cancel_only: bool,
26    pub limit_only: bool,
27    pub post_only: bool,
28    pub trading_disabled: bool,
29}