use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrderbookDepthResponse {
#[serde(rename = "symbol")]
pub symbol: String,
#[serde(rename = "lastUpdateId")]
pub last_update_id: i64,
#[serde(rename = "updatedAtMillis")]
pub updated_at_millis: i64,
#[serde(rename = "responseSentAtMillis")]
pub response_sent_at_millis: i64,
#[serde(rename = "bestBidPriceE9")]
pub best_bid_price_e9: String,
#[serde(rename = "bestBidQuantityE9")]
pub best_bid_quantity_e9: String,
#[serde(rename = "bestAskPriceE9")]
pub best_ask_price_e9: String,
#[serde(rename = "bestAskQuantityE9")]
pub best_ask_quantity_e9: String,
#[serde(rename = "bidsE9")]
pub bids_e9: Vec<Vec<String>>,
#[serde(rename = "asksE9")]
pub asks_e9: Vec<Vec<String>>,
}
impl OrderbookDepthResponse {
pub fn new(symbol: String, last_update_id: i64, updated_at_millis: i64, response_sent_at_millis: i64, best_bid_price_e9: String, best_bid_quantity_e9: String, best_ask_price_e9: String, best_ask_quantity_e9: String, bids_e9: Vec<Vec<String>>, asks_e9: Vec<Vec<String>>) -> OrderbookDepthResponse {
OrderbookDepthResponse {
symbol,
last_update_id,
updated_at_millis,
response_sent_at_millis,
best_bid_price_e9,
best_bid_quantity_e9,
best_ask_price_e9,
best_ask_quantity_e9,
bids_e9,
asks_e9,
}
}
}