Skip to main content

binance_sdk/alpha/rest_api/models/
full_depth_response_data.rs

1/*
2 * Alpha Trading REST API
3 *
4 * APIs for Binance Alpha Trading.
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::alpha::rest_api::models;
16use serde::{Deserialize, Serialize};
17
18/// `FullDepthResponseData` : Order book data.
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct FullDepthResponseData {
21    /// Last order book update ID.
22    #[serde(rename = "lastUpdateId", skip_serializing_if = "Option::is_none")]
23    pub last_update_id: Option<i64>,
24    /// Trading pair symbol.
25    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
26    pub symbol: Option<String>,
27    /// Bid orders. Each entry is [price, quantity].
28    #[serde(rename = "bids", skip_serializing_if = "Option::is_none")]
29    pub bids: Option<Vec<Vec<String>>>,
30    /// Ask orders. Each entry is [price, quantity].
31    #[serde(rename = "asks", skip_serializing_if = "Option::is_none")]
32    pub asks: Option<Vec<Vec<String>>>,
33    /// Event time in milliseconds.
34    #[serde(rename = "E", skip_serializing_if = "Option::is_none")]
35    pub e_uppercase: Option<i64>,
36    /// Transaction time in milliseconds.
37    #[serde(rename = "T", skip_serializing_if = "Option::is_none")]
38    pub t_uppercase: Option<i64>,
39}
40
41impl FullDepthResponseData {
42    /// Order book data.
43    #[must_use]
44    pub fn new() -> FullDepthResponseData {
45        FullDepthResponseData {
46            last_update_id: None,
47            symbol: None,
48            bids: None,
49            asks: None,
50            e_uppercase: None,
51            t_uppercase: None,
52        }
53    }
54}