Skip to main content

binance_sdk/spot/websocket_api/models/
reference_price_calculation_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 ReferencePriceCalculationResponseResult {
21    #[serde(rename = "symbol", skip_serializing_if = "Option::is_none")]
22    pub symbol: Option<String>,
23    #[serde(rename = "calculationType", skip_serializing_if = "Option::is_none")]
24    pub calculation_type: Option<String>,
25    /// If the reference price is being calculated by the matching engine as an arithmetic mean
26    #[serde(rename = "bucketCount", skip_serializing_if = "Option::is_none")]
27    pub bucket_count: Option<i64>,
28    /// If the reference price is being calculated by the matching engine as an arithmetic mean
29    #[serde(rename = "bucketWidthMs", skip_serializing_if = "Option::is_none")]
30    pub bucket_width_ms: Option<i64>,
31    /// If the reference price is being calculated outside the matching engine
32    #[serde(
33        rename = "externalCalculationId",
34        skip_serializing_if = "Option::is_none"
35    )]
36    pub external_calculation_id: Option<i64>,
37}
38
39impl ReferencePriceCalculationResponseResult {
40    #[must_use]
41    pub fn new() -> ReferencePriceCalculationResponseResult {
42        ReferencePriceCalculationResponseResult {
43            symbol: None,
44            calculation_type: None,
45            bucket_count: None,
46            bucket_width_ms: None,
47            external_calculation_id: None,
48        }
49    }
50}