Skip to main content

binance_sdk/spot/websocket_api/models/
depth_response_result.rs

1/*
2 * Spot WebSocket API
3 *
4 * Access market data, manage accounts, and trade on Binance Spot.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 *
9 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10 * https://openapi-generator.tech
11 * Do not edit the class manually.
12 */
13
14#![allow(unused_imports)]
15use crate::spot::websocket_api::models;
16use serde::{Deserialize, Deserializer, Serialize, de::Error};
17use serde_json::Value;
18
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct DepthResponseResult {
21    #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")]
22    pub last_update_id: Option<i64>,
23    /// Bid orders. Each entry is [price, quantity].
24    #[serde(rename = "bids", skip_serializing_if = "Option::is_none")]
25    pub bids: Option<Vec<Vec<String>>>,
26    /// Ask orders. Each entry is [price, quantity].
27    #[serde(rename = "asks", skip_serializing_if = "Option::is_none")]
28    pub asks: Option<Vec<Vec<String>>>,
29}
30
31impl DepthResponseResult {
32    #[must_use]
33    pub fn new() -> DepthResponseResult {
34        DepthResponseResult {
35            last_update_id: None,
36            bids: None,
37            asks: None,
38        }
39    }
40}