deriv_api_schema/contracts_for_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/contracts_for/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::landing_company_short::LandingCompanyShort;
13use crate::landing_company::LandingCompany;
14
15/// For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct ContractsForRequest {
19 /// Field 'contracts_for' mapped to Value due to complexity/potential issues.\n
20 // Correct serde attribute construction - Use helper
21
22 pub contracts_for: Value,
23 /// [Optional] Currency of the contract's stake and payout (obtained from `payout_currencies` call).\n
24 // Correct serde attribute construction - Use helper
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub currency: Option<String>,
27 /// Deprecated - Replaced by landing_company_short.\n
28 // Correct serde attribute construction - Use helper
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub landing_company: Option<LandingCompany>,
31 /// [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api.\n
32 // Correct serde attribute construction - Use helper
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub landing_company_short: Option<LandingCompanyShort>,
35 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
36 // Correct serde attribute construction - Use helper
37 #[serde(skip_serializing_if = "Option::is_none")]
38 pub loginid: Option<String>,
39 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
40 // Correct serde attribute construction - Use helper
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub passthrough: Option<Value>,
43 /// [Optional] If you specify this field, only contracts tradable through that contract type will be returned.\n
44 // Correct serde attribute construction - Use helper
45 #[serde(skip_serializing_if = "Option::is_none")]
46 pub product_type: Option<String>,
47 /// [Optional] Used to map request to response.\n
48 // Correct serde attribute construction - Use helper
49 #[serde(skip_serializing_if = "Option::is_none")]
50 pub req_id: Option<i64>,
51}
52