deriv_api_schema/ticks_history_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/ticks_history/send.json
4
5// Use direct crate names for imports
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import required types from the *same* crate
12use crate::granularity::Granularity;
13use crate::style::Style;
14
15/// Get historic tick data for a given symbol.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct TicksHistoryRequest {
19 /// [Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate.\n
20 // Correct serde attribute construction - Use helper
21 #[serde(skip_serializing_if = "Option::is_none")]
22 pub adjust_start_time: Option<i64>,
23 /// [Optional] An upper limit on ticks to receive.\n
24 // Correct serde attribute construction - Use helper
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub count: Option<i64>,
27 /// Epoch value representing the latest boundary of the returned ticks. If `latest` is specified, this will be the latest available timestamp.\n
28 // Correct serde attribute construction - Use helper
29
30 pub end: String,
31 /// [Optional] Only applicable for style: `candles`. Candle time-dimension width setting. (default: `60`).\n
32 // Correct serde attribute construction - Use helper
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub granularity: Option<Granularity>,
35 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
36 // Correct serde attribute construction - Use helper
37 #[serde(skip_serializing_if = "Option::is_none")]
38 pub passthrough: Option<Value>,
39 /// [Optional] Used to map request to response.\n
40 // Correct serde attribute construction - Use helper
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub req_id: Option<i64>,
43 /// [Optional] Epoch value representing the earliest boundary of the returned ticks.\n/// - For `"style": "ticks"`: this will default to 1 day ago.\n/// - For `"style": "candles"`: it will default to 1 day ago if count or granularity is undefined.\n
44 // Correct serde attribute construction - Use helper
45 #[serde(skip_serializing_if = "Option::is_none")]
46 pub start: Option<String>,
47 /// [Optional] The tick-output style.\n
48 // Correct serde attribute construction - Use helper
49 #[serde(skip_serializing_if = "Option::is_none")]
50 pub style: Option<Style>,
51 /// [Optional] 1 - to send updates whenever a new tick is received.\n
52 // Correct serde attribute construction - Use helper
53 #[serde(skip_serializing_if = "Option::is_none")]
54 pub subscribe: Option<i64>,
55 /// Short symbol name (obtained from the `active_symbols` call).\n
56 // Correct serde attribute construction - Use helper
57
58 pub ticks_history: String,
59}
60