deriv_api_schema/tick.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/ticks/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7
8
9use chrono::{DateTime, Utc};
10
11// Import shared types from the *same* crate
12
13// It's a struct
14/// Tick by tick list of streamed data
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct Tick {
18 /// Market ask at the epoch\n
19 // Correct serde attribute construction - Use helper
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub ask: Option<DateTime<Utc>>,
22 /// Market bid at the epoch\n
23 // Correct serde attribute construction - Use helper
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub bid: Option<DateTime<Utc>>,
26 /// Epoch time of the tick\n
27 // Correct serde attribute construction - Use helper
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub epoch: Option<i64>,
30 /// A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.\n
31 // Correct serde attribute construction - Use helper
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub id: Option<String>,
34 /// Indicates the number of decimal points that the returned amounts must be displayed with\n
35 // Correct serde attribute construction - Use helper
36
37 pub pip_size: String,
38 /// Market value at the epoch\n
39 // Correct serde attribute construction - Use helper
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub quote: Option<DateTime<Utc>>,
42 /// Symbol\n
43 // Correct serde attribute construction - Use helper
44 #[serde(skip_serializing_if = "Option::is_none")]
45 pub symbol: Option<String>,
46}
47