deriv_api_schema/transfer_between_accounts_request.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/transfer_between_accounts/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
12
13/// This call allows transfers between accounts held by a given user. Transfer funds between your fiat and cryptocurrency accounts (for a fee). Please note that account_from should be same as current authorized account.
14#[derive(Debug, Clone, Serialize, Deserialize)]
15#[serde(rename_all = "snake_case")]
16pub struct TransferBetweenAccountsRequest {
17 /// [Optional] The loginid of the account to transfer funds from.\n
18 // Correct serde attribute construction - Use helper
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub account_from: Option<String>,
21 /// [Optional] The loginid of the account to transfer funds to.\n
22 // Correct serde attribute construction - Use helper
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub account_to: Option<String>,
25 /// [Optional] To control the list of accounts returned when `account_from` or `account_to` is not provided. `brief` (default value) means that accounts with `mt5` account_type will be excluded; it will run faster. `all` means that all accounts with any account_type (including `mt5`) will be returned.\n
26 // Correct serde attribute construction - Use helper
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub accounts: Option<String>,
29 /// [Optional] The amount to transfer.\n
30 // Correct serde attribute construction - Use helper
31 #[serde(skip_serializing_if = "Option::is_none")]
32 pub amount: Option<String>,
33 /// [Optional] Currency code.\n
34 // Correct serde attribute construction - Use helper
35 #[serde(skip_serializing_if = "Option::is_none")]
36 pub currency: Option<String>,
37 /// [Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.\n
38 // Correct serde attribute construction - Use helper
39 #[serde(skip_serializing_if = "Option::is_none")]
40 pub loginid: Option<String>,
41 /// [Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.\n
42 // Correct serde attribute construction - Use helper
43 #[serde(skip_serializing_if = "Option::is_none")]
44 pub passthrough: Option<Value>,
45 /// [Optional] Used to map request to response.\n
46 // Correct serde attribute construction - Use helper
47 #[serde(skip_serializing_if = "Option::is_none")]
48 pub req_id: Option<i64>,
49 /// If `account_from` or `account_to` is not provided, it just returns the available accounts.\n
50 // Correct serde attribute construction - Use helper
51
52 pub transfer_between_accounts: i64,
53}
54