Skip to main content

binance_sdk/spot/websocket_api/models/
ticker_response1_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 TickerResponse1Result {
21    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
22    pub symbol: Option<String>,
23    /// Absolute price change
24    #[serde(rename = "priceChange", skip_serializing_if = "Option::is_none")]
25    pub price_change: Option<String>,
26    /// Relative price change in percent
27    #[serde(rename = "priceChangePercent", skip_serializing_if = "Option::is_none")]
28    pub price_change_percent: Option<String>,
29    /// `QuoteVolume` / Volume
30    #[serde(rename = "weightedAvgPrice", skip_serializing_if = "Option::is_none")]
31    pub weighted_avg_price: Option<String>,
32    #[serde(rename = "openPrice", skip_serializing_if = "Option::is_none")]
33    pub open_price: Option<String>,
34    #[serde(rename = "highPrice", skip_serializing_if = "Option::is_none")]
35    pub high_price: Option<String>,
36    #[serde(rename = "lowPrice", skip_serializing_if = "Option::is_none")]
37    pub low_price: Option<String>,
38    #[serde(rename = "lastPrice", skip_serializing_if = "Option::is_none")]
39    pub last_price: Option<String>,
40    #[serde(rename = "volume", skip_serializing_if = "Option::is_none")]
41    pub volume: Option<String>,
42    /// Sum of (price * volume) for all trades
43    #[serde(rename = "quoteVolume", skip_serializing_if = "Option::is_none")]
44    pub quote_volume: Option<String>,
45    /// Open time for ticker window
46    #[serde(rename = "openTime", skip_serializing_if = "Option::is_none")]
47    pub open_time: Option<i64>,
48    /// Close time for ticker window
49    #[serde(rename = "closeTime", skip_serializing_if = "Option::is_none")]
50    pub close_time: Option<i64>,
51    /// Trade IDs
52    #[serde(rename = "firstId", skip_serializing_if = "Option::is_none")]
53    pub first_id: Option<i64>,
54    #[serde(rename = "lastId", skip_serializing_if = "Option::is_none")]
55    pub last_id: Option<i64>,
56    /// Number of trades in the interval
57    #[serde(rename = "count", skip_serializing_if = "Option::is_none")]
58    pub count: Option<i64>,
59}
60
61impl TickerResponse1Result {
62    #[must_use]
63    pub fn new() -> TickerResponse1Result {
64        TickerResponse1Result {
65            symbol: None,
66            price_change: None,
67            price_change_percent: None,
68            weighted_avg_price: None,
69            open_price: None,
70            high_price: None,
71            low_price: None,
72            last_price: None,
73            volume: None,
74            quote_volume: None,
75            open_time: None,
76            close_time: None,
77            first_id: None,
78            last_id: None,
79            count: None,
80        }
81    }
82}