Skip to main content

binance_sdk/spot/rest_api/models/
ticker_response2_inner.rs

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