deriv_api_schema/asset_index_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/asset_index/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::LandingCompany;
13use crate::landing_company_short::LandingCompanyShort;
14
15/// Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.
16#[derive(Debug, Clone, Serialize, Deserialize)]
17#[serde(rename_all = "snake_case")]
18pub struct AssetIndexRequest {
19 /// Must be `1`\n
20 // Correct serde attribute construction - Use helper
21
22 pub asset_index: i64,
23 /// Deprecated - replaced by landing_company_short.\n
24 // Correct serde attribute construction - Use helper
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub landing_company: Option<LandingCompany>,
27 /// [Optional] If specified, will return only the underlyings for the specified landing company.\n
28 // Correct serde attribute construction - Use helper
29 #[serde(skip_serializing_if = "Option::is_none")]
30 pub landing_company_short: Option<LandingCompanyShort>,
31 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
32 // Correct serde attribute construction - Use helper
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub loginid: Option<String>,
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}
44