openlimits_coinbase/model/book_record_l3.rs
1use serde::Deserialize;
2use serde::Serialize;
3use rust_decimal::prelude::Decimal;
4use super::BookLevel;
5use super::shared::string_to_decimal;
6
7/// This struct represents a level 3 book record
8#[derive(Serialize, Deserialize, Debug, Clone)]
9pub struct BookRecordL3 {
10 #[serde(with = "string_to_decimal")]
11 pub price: Decimal,
12 #[serde(with = "string_to_decimal")]
13 pub size: Decimal,
14 pub order_id: String,
15}
16
17impl BookLevel for BookRecordL3 {
18 fn level() -> u8 {
19 3
20 }
21}