xapi_binance/data/
order_book.rs1use crate::data::enums::price_qty::BnPriceQty;
2use serde::{Deserialize, Serialize};
3use typed_builder::TypedBuilder;
4use xapi_shared::data::crypto_symbol::CryptoSymbol;
5
6#[derive(Debug, TypedBuilder, Serialize)]
7pub struct BnGetOrderBookParams {
8 #[builder(setter(into))]
9 pub symbol: CryptoSymbol,
10
11 #[builder(default, setter(strip_option))]
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub limit: Option<u32>,
16}
17
18#[derive(Deserialize, Debug, Clone)]
19#[serde(rename_all = "camelCase")]
20pub struct BnSpotOrderBook {
21 pub last_update_id: u64,
22 pub bids: Vec<BnPriceQty>,
23 pub asks: Vec<BnPriceQty>,
24}