deriv_api_schema/
contracts_for.rs

1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/contracts_for/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize}; 
7use serde_json::Value;
8
9use chrono::{DateTime, Utc};
10
11// Import shared types from the *same* crate
12use crate::available_item::AvailableItem; 
13
14// It's a struct
15/// List of available contracts. Note: if the user is authenticated, then only contracts allowed under his account will be returned.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct ContractsFor {
19    /// Array of available contracts details\n
20    // Correct serde attribute construction - Use helper
21    
22    pub available: Vec<AvailableItem>,
23    /// Symbol's next market-close time as an epoch value\n
24    // Correct serde attribute construction - Use helper
25    #[serde(skip_serializing_if = "Option::is_none")] 
26    pub close: Option<DateTime<Utc>>,
27    /// Indicates the feed license for symbol, for example whether its realtime or delayed\n
28    // Correct serde attribute construction - Use helper
29    #[serde(skip_serializing_if = "Option::is_none")] 
30    pub feed_license: Option<String>,
31    /// Count of contracts available\n
32    // Correct serde attribute construction - Use helper
33    #[serde(skip_serializing_if = "Option::is_none")] 
34    pub hit_count: Option<f64>,
35    /// Array of non_available contracts details\n
36    // Correct serde attribute construction - Use helper
37    #[serde(skip_serializing_if = "Option::is_none")] 
38    pub non_available: Option<Vec<Value>>,
39    /// Symbol's next market-open time as an epoch value\n
40    // Correct serde attribute construction - Use helper
41    #[serde(skip_serializing_if = "Option::is_none")] 
42    pub open: Option<DateTime<Utc>>,
43    /// Current spot price for this underlying\n
44    // Correct serde attribute construction - Use helper
45    #[serde(skip_serializing_if = "Option::is_none")] 
46    pub spot: Option<String>,
47}
48