1use serde::{Deserialize, Serialize};
12use validator::Validate;
13pub const AUTHORIZATION: http::HeaderName = http::HeaderName::from_static("authorization");
14#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15pub struct AccessToken200Response {
16 pub is_true: Option<bool>,
18 pub oauth_token: Option<String>,
20 pub oauth_token_secret: Option<String>,
22}
23#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
24#[serde(untagged)]
25pub enum Account200Response {
26 #[default]
27 FileDetails(FileDetailsResponse),
28 ResponseFile(ResponseFileResponse),
29}
30impl Account200Response {
31 pub fn file_details() -> Self {
32 Self::FileDetails(FileDetailsResponse::default())
33 }
34 pub fn file() -> Self {
35 Self::ResponseFile(ResponseFileResponse::default())
36 }
37}
38pub type Account200Response2 = Vec<AccountAttributes>;
40#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
41#[serde(default)]
42pub struct AccountAttributes {
43 #[serde(rename = "PrepaidCrypto-P")]
45 pub prepaid_crypto_p: Option<bool>,
46 #[serde(rename = "PrepaidCrypto-Z")]
48 pub prepaid_crypto_z: Option<bool>,
49 #[serde(rename = "accountAlias")]
51 pub account_alias: Option<String>,
52 #[serde(rename = "accountId")]
54 pub account_id: Option<String>,
55 #[serde(rename = "accountStatus")]
57 pub account_status: Option<i32>,
58 #[serde(rename = "accountTitle")]
60 pub account_title: Option<String>,
61 #[serde(rename = "accountVan")]
63 pub account_van: Option<String>,
64 #[serde(rename = "acctCustType")]
66 pub acct_cust_type: Option<String>,
67 #[serde(rename = "brokerageAccess")]
69 pub brokerage_access: Option<bool>,
70 #[serde(rename = "businessType")]
72 pub business_type: Option<AccountAttributesBusinessType>,
73 pub category: Option<String>,
75 #[serde(rename = "clearingStatus")]
77 pub clearing_status: Option<AccountAttributesClearingStatus>,
78 pub covestor: Option<bool>,
80 #[default(Some("USD".to_string()))]
82 pub currency: Option<String>,
83 pub desc: Option<String>,
85 #[serde(rename = "displayName")]
87 pub display_name: Option<String>,
88 #[serde(rename = "faClient")]
90 pub fa_client: Option<bool>,
91 #[serde(rename = "ibEntity")]
93 pub ib_entity: Option<AccountAttributesIbEntity>,
94 pub id: Option<String>,
96 #[serde(rename = "noClientTrading")]
98 pub no_client_trading: Option<bool>,
99 pub parent: Option<AccountAttributesParent>,
101 #[serde(rename = "trackVirtualFXPortfolio")]
103 pub track_virtual_fxportfolio: Option<bool>,
104 #[serde(rename = "tradingType")]
106 #[default(Some("STKNOPT".to_string()))]
107 pub trading_type: Option<String>,
108 #[serde(rename = "type")]
110 #[default(Some("DEMO".to_string()))]
111 pub r#type: Option<String>,
112}
113#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
115pub enum AccountAttributesBusinessType {
116 #[serde(rename = "IB_SALES")]
117 #[default]
118 IbSales,
119 #[serde(rename = "IB_PROSERVE")]
120 IbProserve,
121}
122impl core::fmt::Display for AccountAttributesBusinessType {
123 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
124 match self {
125 Self::IbSales => write!(f, "IB_SALES"),
126 Self::IbProserve => write!(f, "IB_PROSERVE"),
127 }
128 }
129}
130#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
132pub enum AccountAttributesClearingStatus {
133 #[default]
134 O,
135 P,
136 N,
137 A,
138 R,
139 C,
140}
141impl core::fmt::Display for AccountAttributesClearingStatus {
142 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
143 match self {
144 Self::O => write!(f, "O"),
145 Self::P => write!(f, "P"),
146 Self::N => write!(f, "N"),
147 Self::A => write!(f, "A"),
148 Self::R => write!(f, "R"),
149 Self::C => write!(f, "C"),
150 }
151 }
152}
153#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
155pub enum AccountAttributesIbEntity {
156 #[serde(rename = "IBLLC-US")]
157 #[default]
158 IbllcUs,
159 #[serde(rename = "IB-CAN")]
160 IbCan,
161 #[serde(rename = "IB-UK")]
162 IbUk,
163 #[serde(rename = "IB-IE")]
164 IbIe,
165}
166impl core::fmt::Display for AccountAttributesIbEntity {
167 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
168 match self {
169 Self::IbllcUs => write!(f, "IBLLC-US"),
170 Self::IbCan => write!(f, "IB-CAN"),
171 Self::IbUk => write!(f, "IB-UK"),
172 Self::IbIe => write!(f, "IB-IE"),
173 }
174 }
175}
176#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
178pub struct AccountAttributesParent {
179 #[serde(rename = "accountId")]
181 pub account_id: Option<String>,
182 #[serde(rename = "isMChild")]
184 pub is_mchild: Option<bool>,
185 #[serde(rename = "isMParent")]
187 pub is_mparent: Option<bool>,
188 #[serde(rename = "isMultiplex")]
190 pub is_multiplex: Option<bool>,
191 pub mmc: Option<Vec<serde_json::Value>>,
193}
194#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
195pub struct AccountData {
196 #[serde(rename = "accountAlias")]
197 pub account_alias: Option<String>,
198 #[serde(rename = "accountId")]
199 pub account_id: Option<String>,
200 #[serde(rename = "accountTitle")]
201 pub account_title: Option<String>,
202 #[serde(rename = "applicantType")]
203 pub applicant_type: Option<String>,
204 #[serde(rename = "baseCurrency")]
205 pub base_currency: Option<String>,
206 #[serde(rename = "businessDescription")]
207 pub business_description: Option<String>,
208 pub capabilities: Option<std::collections::HashMap<String, Vec<String>>>,
209 pub class_action_program: Option<String>,
210 #[serde(rename = "clearingStatus")]
211 pub clearing_status: Option<String>,
212 #[serde(rename = "clearingStatusDescription")]
213 pub clearing_status_description: Option<String>,
214 #[serde(rename = "countryOfCorporation")]
215 pub country_of_corporation: Option<String>,
216 #[serde(rename = "dateApproved")]
217 pub date_approved: Option<String>,
218 #[serde(rename = "dateBegun")]
219 pub date_begun: Option<String>,
220 #[serde(rename = "dateClosed")]
221 pub date_closed: Option<String>,
222 #[serde(rename = "dateDelinked")]
223 pub date_delinked: Option<String>,
224 #[serde(rename = "dateFunded")]
225 pub date_funded: Option<String>,
226 #[serde(rename = "dateLinked")]
227 pub date_linked: Option<String>,
228 #[serde(rename = "dateOpened")]
229 pub date_opened: Option<String>,
230 #[serde(rename = "dividendReinvestment")]
231 pub dividend_reinvestment: Option<std::collections::HashMap<String, bool>>,
232 #[serde(rename = "emailAddress")]
233 pub email_address: Option<String>,
234 pub equity: Option<f64>,
235 #[serde(rename = "externalId")]
236 pub external_id: Option<String>,
237 #[serde(rename = "feeTemplate")]
238 pub fee_template: Option<std::collections::HashMap<String, String>>,
239 pub household: Option<String>,
240 #[serde(rename = "investmentObjectives")]
241 pub investment_objectives: Option<Vec<String>>,
242 #[serde(rename = "limitedOptionTrading")]
243 pub limited_option_trading: Option<String>,
244 pub mailing: Option<std::collections::HashMap<String, String>>,
245 #[serde(rename = "mainAccount")]
246 pub main_account: Option<String>,
247 pub margin: Option<String>,
248 #[serde(rename = "masterAccountId")]
249 pub master_account_id: Option<String>,
250 #[serde(rename = "mifidCategory")]
251 pub mifid_category: Option<String>,
252 #[serde(rename = "mifirStatus")]
253 pub mifir_status: Option<String>,
254 #[serde(rename = "officialTitle")]
255 pub official_title: Option<String>,
256 #[serde(rename = "optionLevel")]
257 pub option_level: Option<i32>,
258 #[serde(rename = "orgType")]
259 pub org_type: Option<String>,
260 #[serde(rename = "primaryUser")]
261 pub primary_user: Option<String>,
262 #[serde(rename = "processType")]
263 pub process_type: Option<String>,
264 #[serde(rename = "propertyProfile")]
265 pub property_profile: Option<String>,
266 #[serde(rename = "registeredAddress")]
267 pub registered_address: Option<std::collections::HashMap<String, String>>,
268 #[serde(rename = "riskScore")]
269 pub risk_score: Option<i32>,
270 pub signatures: Option<Vec<String>>,
271 #[serde(rename = "sourceAccountId")]
272 pub source_account_id: Option<String>,
273 #[serde(rename = "stateCode")]
274 pub state_code: Option<String>,
275 #[serde(rename = "stockYieldProgram")]
276 pub stock_yield_program: Option<std::collections::HashMap<String, String>>,
277 #[serde(rename = "subType")]
278 pub sub_type: Option<String>,
279 #[serde(rename = "taxIds")]
280 pub tax_ids: Option<Vec<std::collections::HashMap<String, String>>>,
281 #[serde(rename = "taxTreatyDetails")]
282 pub tax_treaty_details: Option<Vec<std::collections::HashMap<String, String>>>,
283 #[serde(rename = "tradeIntentionType")]
284 pub trade_intention_type: Option<String>,
285 #[serde(rename = "trustType")]
286 pub trust_type: Option<String>,
287 #[serde(rename = "usTaxPurposeType")]
288 pub us_tax_purpose_type: Option<String>,
289}
290#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
291pub struct AccountDetailsResponse {
292 pub account: Option<AccountData>,
293 #[serde(rename = "associatedEntities")]
294 pub associated_entities: Option<Vec<AssociatedEntity>>,
295 #[serde(rename = "associatedPersons")]
296 pub associated_persons: Option<Vec<AssociatedPerson>>,
297 pub decedents: Option<Vec<std::collections::HashMap<String, String>>>,
298 #[serde(rename = "entityIRABeneficiaries")]
299 pub entity_irabeneficiaries: Option<Vec<EntityIRABene>>,
300 pub error: Option<Box<ErrorResponse>>,
301 #[serde(rename = "errorDescription")]
302 pub error_description: Option<String>,
303 #[serde(rename = "financialInformation")]
304 pub financial_information: Option<std::collections::HashMap<String, serde_json::Value>>,
305 #[serde(rename = "hasError")]
306 pub has_error: Option<bool>,
307 #[serde(rename = "individualIRABeneficiaries")]
308 pub individual_irabeneficiaries: Option<Vec<IndividualIRABene>>,
309 #[serde(rename = "marketData")]
310 pub market_data: Option<Vec<std::collections::HashMap<String, String>>>,
311 pub restrictions: Option<Vec<RestrictionInfo>>,
312 #[serde(rename = "sourcesOfWealth")]
313 pub sources_of_wealth: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
314 #[serde(rename = "tradeBundles")]
315 pub trade_bundles: Option<Vec<String>>,
316 #[serde(rename = "withHoldingStatement")]
317 pub with_holding_statement: Option<std::collections::HashMap<String, String>>,
318}
319pub type AccountRequestBody = String;
320#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
321pub struct AccountStatusBulkResponse {
322 pub accounts: Option<Vec<AccountStatusResponse>>,
323 pub limit: Option<i32>,
324 pub offset: Option<i32>,
325 pub total: Option<i32>,
326}
327#[serde_with::skip_serializing_none]
328#[derive(
329 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
330)]
331pub struct AccountStatusRequest {
332 #[serde(rename = "endDate")]
333 pub end_date: chrono::NaiveDate,
334 #[validate(range(min = 1i32, max = 1_000i32))]
335 pub limit: Option<i32>,
336 #[validate(range(min = 0i32))]
337 pub offset: Option<i32>,
338 #[serde(rename = "startDate")]
339 pub start_date: chrono::NaiveDate,
340 pub status: Option<RequestStatus>,
341}
342#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
343pub struct AccountStatusResponse {
344 #[serde(rename = "accountId")]
345 pub account_id: Option<String>,
346 #[serde(rename = "adminAccountId")]
347 pub admin_account_id: Option<String>,
348 #[serde(rename = "dateClosed")]
349 pub date_closed: Option<chrono::DateTime<chrono::Utc>>,
350 #[serde(rename = "dateOpened")]
351 pub date_opened: Option<chrono::DateTime<chrono::Utc>>,
352 #[serde(rename = "dateStarted")]
353 pub date_started: Option<chrono::DateTime<chrono::Utc>>,
354 pub description: Option<String>,
355 #[serde(rename = "masterAccountId")]
356 pub master_account_id: Option<String>,
357 pub message: Option<String>,
358 pub state: Option<String>,
359 pub status: Option<String>,
360}
361#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
363pub struct AccountSummaryResponse {
364 #[serde(rename = "SMA")]
366 pub sma: Option<f64>,
367 #[serde(rename = "accountType")]
369 pub account_type: Option<String>,
370 #[serde(rename = "accruedInterest")]
372 pub accrued_interest: Option<f64>,
373 #[serde(rename = "availableFunds")]
375 pub available_funds: Option<f64>,
376 pub balance: Option<f64>,
378 #[serde(rename = "buyingPower")]
380 pub buying_power: Option<f64>,
381 #[serde(rename = "cashBalances")]
383 pub cash_balances: Option<Vec<AccountSummaryResponseCashBalance>>,
384 #[serde(rename = "equityWithLoanValue")]
386 pub equity_with_loan_value: Option<f64>,
387 #[serde(rename = "excessLiquidity")]
389 pub excess_liquidity: Option<f64>,
390 #[serde(rename = "initialMargin")]
392 pub initial_margin: Option<f64>,
393 #[serde(rename = "maintenanceMargin")]
395 pub maintenance_margin: Option<f64>,
396 #[serde(rename = "netLiquidationValue")]
398 pub net_liquidation_value: Option<f64>,
399 #[serde(rename = "regTLoan")]
401 pub reg_tloan: Option<f64>,
402 #[serde(rename = "regTMargin")]
404 pub reg_tmargin: Option<f64>,
405 #[serde(rename = "securitiesGVP")]
407 pub securities_gvp: Option<f64>,
408 pub status: Option<String>,
410 #[serde(rename = "totalCashValue")]
415 pub total_cash_value: Option<f64>,
416}
417#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
418pub struct AccountSummaryResponseCashBalance {
419 pub balance: Option<f64>,
421 pub currency: Option<String>,
423 #[serde(rename = "settledCash")]
425 pub settled_cash: Option<f64>,
426}
427#[serde_with::skip_serializing_none]
428#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
429pub struct AcctIdRequestBody {
430 #[serde(rename = "acctId")]
433 pub acct_id: Option<String>,
434}
435#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
436pub struct AcctIdRequestBody2 {
437 #[serde(rename = "acctId")]
440 #[validate(length(min = 1u64))]
441 pub acct_id: String,
442}
443#[serde_with::skip_serializing_none]
444#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
445pub struct AcctIdRequestBody3 {
446 #[serde(rename = "acctIds")]
448 pub acct_ids: Option<Vec<String>>,
449}
450#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
451pub struct AchInstruction {
452 #[serde(rename = "accountId")]
454 #[validate(length(min = 1u64, max = 32u64))]
455 pub account_id: String,
456 #[serde(rename = "achType")]
458 pub ach_type: AchInstructionAchType,
459 #[serde(rename = "bankInstructionCode")]
461 pub bank_instruction_code: AchInstructionBankInstructionCode,
462 #[serde(rename = "bankInstructionName")]
464 #[validate(length(min = 1u64, max = 100u64))]
465 pub bank_instruction_name: String,
466 #[serde(rename = "clientAccountInfo")]
467 #[validate(nested)]
468 pub client_account_info: AchInstructionClientAccountInfo,
469 #[serde(rename = "clientInstructionId")]
471 pub client_instruction_id: f64,
472 #[validate(length(min = 1u64, max = 3u64))]
474 pub currency: String,
475}
476#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
477pub enum AchInstructionAchType {
478 #[serde(rename = "DEBIT")]
479 #[default]
480 Debit,
481 #[serde(rename = "CREDIT")]
482 Credit,
483 #[serde(rename = "DEBIT_CREDIT")]
484 DebitCredit,
485}
486impl core::fmt::Display for AchInstructionAchType {
487 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
488 match self {
489 Self::Debit => write!(f, "DEBIT"),
490 Self::Credit => write!(f, "CREDIT"),
491 Self::DebitCredit => write!(f, "DEBIT_CREDIT"),
492 }
493 }
494}
495#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
496pub enum AchInstructionBankInstructionCode {
497 #[serde(rename = "CAACH")]
498 #[default]
499 Caach,
500 #[serde(rename = "USACH")]
501 Usach,
502}
503impl core::fmt::Display for AchInstructionBankInstructionCode {
504 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
505 match self {
506 Self::Caach => write!(f, "CAACH"),
507 Self::Usach => write!(f, "USACH"),
508 }
509 }
510}
511#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
512pub struct AchInstructionClientAccountInfo {
513 #[serde(rename = "bankAccountNumber")]
515 #[validate(length(min = 1u64, max = 32u64))]
516 pub bank_account_number: String,
517 #[serde(rename = "bankAccountTypeCode")]
519 pub bank_account_type_code: AchInstructionClientAccountInfoBankAccountTypeCode,
520 #[serde(rename = "bankName")]
522 #[validate(length(min = 1u64, max = 100u64))]
523 pub bank_name: String,
524 #[serde(rename = "bankRoutingNumber")]
526 #[validate(length(min = 1u64, max = 24u64))]
527 pub bank_routing_number: String,
528}
529#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
530pub enum AchInstructionClientAccountInfoBankAccountTypeCode {
531 #[serde(rename = "0")]
532 #[default]
533 Value0,
534 #[serde(rename = "1")]
535 Value1,
536 #[serde(rename = "2")]
537 Value2,
538}
539impl core::fmt::Display for AchInstructionClientAccountInfoBankAccountTypeCode {
540 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
541 match self {
542 Self::Value0 => write!(f, "0"),
543 Self::Value1 => write!(f, "1"),
544 Self::Value2 => write!(f, "2"),
545 }
546 }
547}
548#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
550pub struct AckServerPromptRequest {
551 pub body: NotificationRequestBody,
552}
553impl AckServerPromptRequest {
554 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<AckServerPromptResponse> {
556 let status = req.status();
557 if status == http::StatusCode::OK {
558 let data = oas3_gen_support::Diagnostics::<String>::json_with_diagnostics(req).await?;
559 return Ok(AckServerPromptResponse::Ok(data));
560 }
561 let _ = req.bytes().await?;
562 return Ok(AckServerPromptResponse::Unknown);
563 }
564}
565#[derive(Debug, Clone)]
567pub enum AckServerPromptResponse {
568 Ok(String),
570 Unknown,
572}
573#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
575pub struct ActivateAlertRequest {
576 #[validate(nested)]
577 pub path: ActivateAlertRequestPath,
578 pub body: AlertActivationRequest,
579}
580impl ActivateAlertRequest {
581 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ActivateAlertResponse> {
583 let status = req.status();
584 if status == http::StatusCode::OK {
585 let data =
586 oas3_gen_support::Diagnostics::<AlertActivationResponse>::json_with_diagnostics(
587 req,
588 )
589 .await?;
590 return Ok(ActivateAlertResponse::Ok(data));
591 }
592 if status == http::StatusCode::UNAUTHORIZED {
593 let _ = req.bytes().await?;
594 return Ok(ActivateAlertResponse::Unauthorized);
595 }
596 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
597 let _ = req.bytes().await?;
598 return Ok(ActivateAlertResponse::InternalServerError);
599 }
600 let _ = req.bytes().await?;
601 return Ok(ActivateAlertResponse::Unknown);
602 }
603}
604#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
605pub struct ActivateAlertRequestPath {
606 #[validate(length(min = 1u64))]
608 pub account_id: String,
609}
610#[derive(Debug, Clone)]
612pub enum ActivateAlertResponse {
613 Ok(AlertActivationResponse),
615 Unauthorized,
617 InternalServerError,
619 Unknown,
621}
622#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
624pub struct AdvancedOrderReject {
625 pub dismissable: Option<Vec<serde_json::Value>>,
627 #[serde(rename = "messageId")]
629 pub message_id: Option<String>,
630 pub options: Option<Vec<String>>,
632 #[serde(rename = "orderId")]
634 pub order_id: Option<i32>,
635 pub prompt: Option<bool>,
637 #[serde(rename = "reqId")]
639 pub req_id: Option<String>,
640 pub text: Option<String>,
642 #[serde(rename = "type")]
644 pub r#type: Option<String>,
645}
646#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
648pub struct Alert {
649 pub account: Option<String>,
651 pub alert_active: Option<AlertActivationRequestAlertActive>,
653 pub alert_name: Option<String>,
655 pub alert_repeatable: Option<AlertActivationRequestAlertActive>,
657 pub alert_triggered: Option<bool>,
659 pub order_id: Option<i32>,
661 pub order_time: Option<String>,
663}
664#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
665pub struct AlertActivationRequest {
666 #[serde(rename = "alertActive")]
668 pub alert_active: AlertActivationRequestAlertActive,
669 #[serde(rename = "alertId")]
671 pub alert_id: i32,
672}
673#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
675pub enum AlertActivationRequestAlertActive {
676 #[serde(rename = "1")]
677 #[default]
678 Value1,
679 #[serde(rename = "0")]
680 Value0,
681}
682impl core::fmt::Display for AlertActivationRequestAlertActive {
683 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
684 match self {
685 Self::Value1 => write!(f, "1"),
686 Self::Value0 => write!(f, "0"),
687 }
688 }
689}
690#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
691pub struct AlertActivationResponse {
692 pub failure_list: Option<String>,
694 pub order_id: Option<i32>,
696 pub request_id: Option<i32>,
697 pub success: Option<bool>,
699 pub text: Option<String>,
701}
702#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
703pub struct AlertCondition {
704 pub condition_logic_bind: Option<bool>,
706 pub condition_operator: Option<String>,
708 pub condition_time_zone: Option<String>,
710 pub condition_trigger_method: Option<i32>,
712 pub condition_type: Option<i32>,
714 pub condition_value: Option<String>,
716 pub conidex: Option<String>,
718 pub contract_description_1: Option<String>,
720}
721#[serde_with::skip_serializing_none]
722#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
723pub struct AlertCreationRequest {
724 #[serde(rename = "alertMessage")]
726 #[validate(length(min = 1u64))]
727 pub alert_message: String,
728 #[serde(rename = "alertName")]
730 #[validate(length(min = 1u64))]
731 pub alert_name: String,
732 #[serde(rename = "alertRepeatable")]
734 pub alert_repeatable: AlertActivationRequestAlertActive,
735 #[validate(nested)]
737 pub conditions: Vec<AlertCreationRequestCondition>,
738 pub email: Option<String>,
740 #[serde(rename = "expireTime")]
742 pub expire_time: Option<String>,
743 #[serde(rename = "iTWSOrdersOnly")]
745 pub i_twsorders_only: Option<i32>,
746 #[serde(rename = "orderId")]
748 pub order_id: Option<i64>,
749 #[serde(rename = "outsideRth")]
751 pub outside_rth: AlertActivationRequestAlertActive,
752 #[serde(rename = "sendMessage")]
754 pub send_message: Option<AlertActivationRequestAlertActive>,
755 #[serde(rename = "showPopup")]
757 pub show_popup: Option<i32>,
758 pub tif: AlertCreationRequestTif,
760}
761#[serde_with::skip_serializing_none]
762#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
763#[serde(default)]
764pub struct AlertCreationRequestCondition {
765 #[validate(length(min = 1u64))]
768 pub conidex: String,
769 #[serde(rename = "logicBind")]
774 #[default(Some(Default::default()))]
775 pub logic_bind: Option<AlertCreationRequestConditionLogicBind>,
776 #[validate(length(min = 1u64))]
778 pub operator: String,
779 #[serde(rename = "timeZone")]
781 pub time_zone: Option<String>,
782 #[serde(rename = "triggerMethod")]
784 #[validate(length(min = 1u64))]
785 pub trigger_method: String,
786 #[serde(rename = "type")]
796 pub r#type: AlertCreationRequestConditionType,
797 #[default(Some("*".to_string()))]
799 pub value: Option<String>,
800}
801#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
806pub enum AlertCreationRequestConditionLogicBind {
807 #[serde(rename = "a")]
808 #[default]
809 A,
810 #[serde(rename = "o")]
811 O,
812 #[serde(rename = "n")]
813 N,
814}
815impl core::fmt::Display for AlertCreationRequestConditionLogicBind {
816 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
817 match self {
818 Self::A => write!(f, "a"),
819 Self::O => write!(f, "o"),
820 Self::N => write!(f, "n"),
821 }
822 }
823}
824#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
834pub enum AlertCreationRequestConditionType {
835 #[serde(rename = "1")]
836 #[default]
837 Value1,
838 #[serde(rename = "3")]
839 Value3,
840 #[serde(rename = "4")]
841 Value4,
842 #[serde(rename = "5")]
843 Value5,
844 #[serde(rename = "6")]
845 Value6,
846 #[serde(rename = "7")]
847 Value7,
848 #[serde(rename = "8")]
849 Value8,
850 #[serde(rename = "9")]
851 Value9,
852}
853impl core::fmt::Display for AlertCreationRequestConditionType {
854 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
855 match self {
856 Self::Value1 => write!(f, "1"),
857 Self::Value3 => write!(f, "3"),
858 Self::Value4 => write!(f, "4"),
859 Self::Value5 => write!(f, "5"),
860 Self::Value6 => write!(f, "6"),
861 Self::Value7 => write!(f, "7"),
862 Self::Value8 => write!(f, "8"),
863 Self::Value9 => write!(f, "9"),
864 }
865 }
866}
867#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
869pub enum AlertCreationRequestTif {
870 #[serde(rename = "GTC")]
871 #[default]
872 Gtc,
873 #[serde(rename = "GTD")]
874 Gtd,
875}
876impl core::fmt::Display for AlertCreationRequestTif {
877 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
878 match self {
879 Self::Gtc => write!(f, "GTC"),
880 Self::Gtd => write!(f, "GTD"),
881 }
882 }
883}
884#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
885pub struct AlertCreationResponse {
886 pub order_id: Option<i32>,
888 pub order_status: Option<String>,
890 pub request_id: Option<i32>,
892 pub success: Option<bool>,
894 pub text: Option<String>,
896 pub warning_message: Option<String>,
898}
899#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
900pub struct AlertDeletionResponse {
901 pub failure_list: Option<String>,
903 pub order_id: Option<i32>,
905 pub request_id: Option<i32>,
907 pub success: Option<bool>,
909 pub text: Option<String>,
911}
912#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
914pub struct AlertDetails {
915 pub account: Option<String>,
917 #[serde(rename = "alertName")]
919 pub alert_name: Option<String>,
920 pub alert_active: Option<AlertActivationRequestAlertActive>,
922 pub alert_default_type: Option<i32>,
924 pub alert_email: Option<String>,
926 pub alert_message: Option<String>,
928 pub alert_mta_currency: Option<String>,
930 pub alert_mta_defaults: Option<String>,
932 pub alert_play_audio: Option<i32>,
934 pub alert_repeatable: Option<i32>,
936 pub alert_send_message: Option<i32>,
938 pub alert_show_popup: Option<i32>,
940 pub alert_triggered: Option<i32>,
942 pub bg_color: Option<String>,
944 pub condition_outside_rth: Option<i32>,
946 pub condition_size: Option<i32>,
948 pub conditions: Option<Vec<AlertCondition>>,
950 pub expire_time: Option<String>,
952 pub fg_color: Option<String>,
954 pub itws_orders_only: Option<i32>,
956 pub order_id: Option<i32>,
958 pub order_not_editable: Option<bool>,
960 pub order_status: Option<AlertDetailsOrderStatus>,
962 pub tif: Option<String>,
964 pub time_zone: Option<String>,
966 pub tool_id: Option<i32>,
968}
969#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
971pub enum AlertDetailsOrderStatus {
972 #[default]
973 Presubmitted,
974 Submitted,
975}
976impl core::fmt::Display for AlertDetailsOrderStatus {
977 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
978 match self {
979 Self::Presubmitted => write!(f, "Presubmitted"),
980 Self::Submitted => write!(f, "Submitted"),
981 }
982 }
983}
984pub type Alerts = Vec<Alert>;
985#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
986pub struct AlgoParam {
987 #[serde(rename = "defaultValue")]
989 pub default_value: Option<AlgoParamDefaultValue>,
990 pub description: Option<String>,
991 #[serde(rename = "guiRank")]
993 pub gui_rank: Option<i32>,
994 pub id: Option<String>,
996 #[serde(rename = "legalStrings")]
998 pub legal_strings: Option<Vec<String>>,
999 #[serde(rename = "maxValue")]
1000 pub max_value: Option<i32>,
1001 #[serde(rename = "minValue")]
1002 pub min_value: Option<f64>,
1003 pub name: Option<String>,
1005 pub required: Option<bool>,
1007 #[serde(rename = "valueClassName")]
1009 pub value_class_name: Option<AlgoParamValueClassName>,
1010}
1011#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1013#[serde(untagged)]
1014pub enum AlgoParamDefaultValue {
1015 #[default]
1016 String(String),
1017 Integer(i32),
1018 Boolean(bool),
1019 Number(f64),
1020}
1021#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
1023pub enum AlgoParamValueClassName {
1024 #[default]
1025 String,
1026 Boolean,
1027 Time,
1028 Double,
1029 Integer,
1030}
1031impl core::fmt::Display for AlgoParamValueClassName {
1032 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1033 match self {
1034 Self::String => write!(f, "String"),
1035 Self::Boolean => write!(f, "Boolean"),
1036 Self::Time => write!(f, "Time"),
1037 Self::Double => write!(f, "Double"),
1038 Self::Integer => write!(f, "Integer"),
1039 }
1040 }
1041}
1042#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1044pub struct AlgosResponse {
1045 pub algos: Option<Vec<AlgosResponseAlgo>>,
1047}
1048#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1049pub struct AlgosResponseAlgo {
1050 pub id: String,
1052 pub name: String,
1054 pub parameters: Option<Vec<AlgoParam>>,
1055}
1056#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1057#[serde(default)]
1058pub struct AllocationGroup {
1059 pub accounts: Option<Vec<AllocationGroupAccount>>,
1061 #[default(Some(Default::default()))]
1072 pub default_method: Option<AllocationMethod>,
1073 pub name: Option<String>,
1075}
1076#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1077pub struct AllocationGroupAccount {
1078 pub amount: Option<f64>,
1080 pub name: Option<String>,
1082}
1083#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1084pub struct AllocationGroups {
1085 pub data: Option<Vec<AllocationGroupsDatum>>,
1087}
1088#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1089#[serde(default)]
1090pub struct AllocationGroupsDatum {
1091 #[default(Some(Default::default()))]
1102 pub allocation_method: Option<AllocationMethod>,
1103 pub name: Option<String>,
1105 pub size: Option<i32>,
1107}
1108#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
1119pub enum AllocationMethod {
1120 #[default]
1121 A,
1122 E,
1123 N,
1124 C,
1125 P,
1126 R,
1127 S,
1128}
1129impl core::fmt::Display for AllocationMethod {
1130 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1131 match self {
1132 Self::A => write!(f, "A"),
1133 Self::E => write!(f, "E"),
1134 Self::N => write!(f, "N"),
1135 Self::C => write!(f, "C"),
1136 Self::P => write!(f, "P"),
1137 Self::R => write!(f, "R"),
1138 Self::S => write!(f, "S"),
1139 }
1140 }
1141}
1142#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1143pub struct AmRequestStatusResponse {
1144 #[serde(rename = "acctId")]
1145 pub acct_id: Option<String>,
1146 pub message: Option<String>,
1147 #[serde(rename = "requestId")]
1148 pub request_id: Option<String>,
1149 #[serde(rename = "requestType")]
1150 pub request_type: Option<String>,
1151 pub status: Option<String>,
1152}
1153#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1154pub struct AnswerResponse {
1155 pub answer: Option<String>,
1156 #[serde(rename = "answerId")]
1157 pub answer_id: Option<i64>,
1158 #[serde(rename = "dependentAnswerId")]
1159 pub dependent_answer_id: Option<i64>,
1160 #[serde(rename = "dependentQuestionId")]
1161 pub dependent_question_id: Option<i64>,
1162 #[serde(rename = "multiAnswerDetail")]
1163 pub multi_answer_detail: Option<Vec<String>>,
1164}
1165#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
1167pub struct ApplyCsvRequest {
1168 #[validate(nested)]
1169 pub header: ApplyCsvRequestHeader,
1170 pub body: RestrictionRequestBody,
1172}
1173impl ApplyCsvRequest {
1174 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ApplyCsvResponse> {
1176 let status = req.status();
1177 if status == http::StatusCode::OK {
1178 let data =
1179 oas3_gen_support::Diagnostics::<CSVResponse>::json_with_diagnostics(req).await?;
1180 return Ok(ApplyCsvResponse::Ok(data));
1181 }
1182 if status == http::StatusCode::BAD_REQUEST {
1183 let _ = req.bytes().await?;
1184 return Ok(ApplyCsvResponse::BadRequest);
1185 }
1186 if status == http::StatusCode::UNAUTHORIZED {
1187 let _ = req.bytes().await?;
1188 return Ok(ApplyCsvResponse::Unauthorized);
1189 }
1190 if status == http::StatusCode::FORBIDDEN {
1191 let _ = req.bytes().await?;
1192 return Ok(ApplyCsvResponse::Forbidden);
1193 }
1194 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
1195 let _ = req.bytes().await?;
1196 return Ok(ApplyCsvResponse::InternalServerError);
1197 }
1198 let _ = req.bytes().await?;
1199 return Ok(ApplyCsvResponse::Unknown);
1200 }
1201}
1202#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
1203pub struct ApplyCsvRequestHeader {
1204 #[validate(length(min = 1u64))]
1207 pub authorization: String,
1208}
1209impl core::convert::TryFrom<&ApplyCsvRequestHeader> for http::HeaderMap {
1210 type Error = http::header::InvalidHeaderValue;
1211 fn try_from(headers: &ApplyCsvRequestHeader) -> core::result::Result<Self, Self::Error> {
1212 let mut map = http::HeaderMap::with_capacity(1usize);
1213 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
1214 map.insert(AUTHORIZATION, header_value);
1215 Ok(map)
1216 }
1217}
1218impl core::convert::TryFrom<ApplyCsvRequestHeader> for http::HeaderMap {
1219 type Error = http::header::InvalidHeaderValue;
1220 fn try_from(headers: ApplyCsvRequestHeader) -> core::result::Result<Self, Self::Error> {
1221 http::HeaderMap::try_from(&headers)
1222 }
1223}
1224#[derive(Debug, Clone)]
1226pub enum ApplyCsvResponse {
1227 Ok(CSVResponse),
1229 BadRequest,
1231 Unauthorized,
1233 Forbidden,
1235 InternalServerError,
1237 Unknown,
1239}
1240pub type ArrayNode = serde_json::Value;
1241#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1242pub struct AssociatedEntity {
1243 #[serde(rename = "AssociatedPersons")]
1244 pub associated_persons: Option<Vec<AssociatedPerson>>,
1245 pub associations: Option<Vec<String>>,
1246 pub email: Option<String>,
1247 #[serde(rename = "entityId")]
1248 pub entity_id: Option<i32>,
1249 #[serde(rename = "externalCode")]
1250 pub external_code: Option<String>,
1251 #[serde(rename = "identityDocuments")]
1252 pub identity_documents: Option<Vec<std::collections::HashMap<String, String>>>,
1253 pub mailing: Option<std::collections::HashMap<String, String>>,
1254 pub name: Option<String>,
1255 #[serde(rename = "organizationCountry")]
1256 pub organization_country: Option<String>,
1257 pub phones: Option<std::collections::HashMap<String, String>>,
1258 pub residence: Option<std::collections::HashMap<String, String>>,
1259 #[serde(rename = "taxTreatyDetails")]
1260 pub tax_treaty_details: Option<Vec<std::collections::HashMap<String, String>>>,
1261}
1262#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1263pub struct AssociatedPerson {
1264 pub associations: Option<Vec<String>>,
1265 pub commercial: Option<String>,
1266 #[serde(rename = "countryOfBirth")]
1267 pub country_of_birth: Option<String>,
1268 #[serde(rename = "countryOfCitizenship")]
1269 pub country_of_citizenship: Option<String>,
1270 #[serde(rename = "countryOfLegalResidence")]
1271 pub country_of_legal_residence: Option<String>,
1272 #[serde(rename = "dateOfBirth")]
1273 pub date_of_birth: Option<String>,
1274 pub email: Option<String>,
1275 #[serde(rename = "employmentDetails")]
1276 pub employment_details: Option<std::collections::HashMap<String, serde_json::Value>>,
1277 #[serde(rename = "employmentType")]
1278 pub employment_type: Option<String>,
1279 #[serde(rename = "entityId")]
1280 pub entity_id: Option<i32>,
1281 #[serde(rename = "externalCode")]
1282 pub external_code: Option<String>,
1283 #[serde(rename = "firstName")]
1284 pub first_name: Option<String>,
1285 pub gender: Option<String>,
1286 #[serde(rename = "identityDocuments")]
1287 pub identity_documents: Option<Vec<std::collections::HashMap<String, String>>>,
1288 #[serde(rename = "lastLogin")]
1289 pub last_login: Option<String>,
1290 #[serde(rename = "lastName")]
1291 pub last_name: Option<String>,
1292 pub mailing: Option<std::collections::HashMap<String, String>>,
1293 #[serde(rename = "maritalStatus")]
1294 pub marital_status: Option<String>,
1295 #[serde(rename = "mdSubscriberStatus")]
1296 pub md_subscriber_status: Option<String>,
1297 #[serde(rename = "middleInitial")]
1298 pub middle_initial: Option<String>,
1299 #[serde(rename = "middleName")]
1300 pub middle_name: Option<String>,
1301 #[serde(rename = "motersMaidenName")]
1302 pub moters_maiden_name: Option<String>,
1303 #[serde(rename = "numberOfDependents")]
1304 pub number_of_dependents: Option<i32>,
1305 #[serde(rename = "passwordDate")]
1306 pub password_date: Option<String>,
1307 pub phones: Option<std::collections::HashMap<String, String>>,
1308 pub residence: Option<std::collections::HashMap<String, String>>,
1309 pub salutation: Option<String>,
1310 #[serde(rename = "securityDevice")]
1311 pub security_device: Option<String>,
1312 #[serde(rename = "stateOfLegalResidence")]
1313 pub state_of_legal_residence: Option<String>,
1314 #[serde(rename = "subscribedServices")]
1315 pub subscribed_services: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
1316 pub suffix: Option<String>,
1317 #[serde(rename = "taxTreatyDetails")]
1318 pub tax_treaty_details: Option<Vec<std::collections::HashMap<String, String>>>,
1319 #[serde(rename = "userStatus")]
1320 pub user_status: Option<String>,
1321 #[serde(rename = "userStatusTrading")]
1322 pub user_status_trading: Option<String>,
1323 pub username: Option<String>,
1324}
1325#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1326pub struct AsynchronousInstructionResponse {
1327 #[serde(rename = "instructionResult")]
1328 pub instruction_result: Option<InstructionResult>,
1329 #[serde(rename = "instructionSetId")]
1331 pub instruction_set_id: f64,
1332 pub status: f64,
1334}
1335#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1336pub struct AsynchronousInstructionSetResponse {
1337 #[serde(rename = "instructionResults")]
1338 pub instruction_results: Option<Vec<AsynchronousInstructionSetResponseInstructionResult>>,
1339 #[serde(rename = "instructionSetId")]
1341 pub instruction_set_id: f64,
1342 pub status: i32,
1344}
1345#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1346pub struct AsynchronousInstructionSetResponseInstructionResult {
1347 #[serde(rename = "instructionResult")]
1348 pub instruction_result: InstructionResult,
1349 #[serde(rename = "instructionSetId")]
1351 pub instruction_set_id: f64,
1352 pub status: i32,
1354}
1355#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1356pub struct Au10TixDetailResponse {
1357 #[serde(rename = "entityId")]
1358 pub entity_id: Option<i32>,
1359 pub error: Option<Box<ErrorResponse>>,
1360 #[serde(rename = "errorDescription")]
1361 pub error_description: Option<String>,
1362 #[serde(rename = "expiryDate")]
1363 pub expiry_date: Option<chrono::DateTime<chrono::Utc>>,
1364 #[serde(rename = "externalId")]
1365 pub external_id: Option<String>,
1366 #[serde(rename = "hasError")]
1367 pub has_error: Option<bool>,
1368 #[serde(rename = "startDate")]
1369 pub start_date: Option<chrono::DateTime<chrono::Utc>>,
1370 pub state: Option<String>,
1371 pub url: Option<String>,
1372}
1373#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1375pub struct AvailableFundsResponse {
1376 #[serde(rename = "Crypto at Paxos")]
1378 pub crypto_at_paxos: Option<Funds>,
1379 pub commodities: Option<Funds>,
1381 pub securities: Option<AvailableFundsResponseSecurities>,
1383 pub total: Option<AvailableFundsResponseTotal>,
1385}
1386#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1388pub struct AvailableFundsResponseSecurities {
1389 #[serde(rename = "Lk Ahd Avlbl Fnds")]
1391 pub lk_ahd_avlbl_fnds: Option<String>,
1392 #[serde(rename = "Lk Ahd Excss Lqdty")]
1395 pub lk_ahd_excss_lqdty: Option<String>,
1396 #[serde(rename = "Prdctd Pst-xpry Excss")]
1398 pub prdctd_pst_xpry_excss: Option<String>,
1399 #[serde(rename = "SMA")]
1400 pub sma: Option<String>,
1401 pub current_available: Option<String>,
1403 pub current_excess: Option<String>,
1405 pub leverage: Option<String>,
1407 pub overnight_available: Option<String>,
1409 pub overnight_excess: Option<String>,
1413}
1414#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1416pub struct AvailableFundsResponseTotal {
1417 #[serde(rename = "Lk Ahd Avlbl Fnds")]
1419 pub lk_ahd_avlbl_fnds: Option<String>,
1420 #[serde(rename = "Lk Ahd Excss Lqdty")]
1423 pub lk_ahd_excss_lqdty: Option<String>,
1424 #[serde(rename = "Lk Ahd Nxt Chng")]
1426 pub lk_ahd_nxt_chng: Option<String>,
1427 #[serde(rename = "Prdctd Pst-xpry Excss")]
1429 pub prdctd_pst_xpry_excss: Option<String>,
1430 pub buying_power: Option<String>,
1432 pub current_available: Option<String>,
1434 pub current_excess: Option<String>,
1436 pub day_trades_left: Option<String>,
1438 pub leverage: Option<String>,
1440 pub overnight_available: Option<String>,
1442 pub overnight_excess: Option<String>,
1446}
1447#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1448pub struct AvailableStatementDatesData {
1449 #[serde(rename = "dataType")]
1451 pub data_type: Option<String>,
1452 pub value: Option<AvailableStatementDatesDataValue>,
1453}
1454#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1455pub struct AvailableStatementDatesDataValue {
1456 pub annual: Option<Vec<String>>,
1458 pub daily: Option<AvailableStatementDatesDataValueDaily>,
1459 pub monthly: Option<Vec<String>>,
1461}
1462#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1463pub struct AvailableStatementDatesDataValueDaily {
1464 #[serde(rename = "endDate")]
1466 pub end_date: Option<String>,
1467 #[serde(rename = "startDate")]
1469 pub start_date: Option<String>,
1470}
1471#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1472pub struct AvailableTaxFormsData {
1473 #[serde(rename = "dataType")]
1475 pub data_type: Option<String>,
1476 pub value: Option<AvailableTaxFormsDataValue>,
1477}
1478#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1479pub struct AvailableTaxFormsDataValue {
1480 pub forms: Option<Vec<TaxFormType>>,
1482}
1483#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1484pub struct BNResponse {
1485 #[serde(rename = "BN")]
1487 pub bn: Option<i32>,
1488}
1489#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
1490pub enum BankInstructionMethod {
1491 #[serde(rename = "ACH")]
1492 #[default]
1493 Ach,
1494 #[serde(rename = "WIRE")]
1495 Wire,
1496 #[serde(rename = "USACH")]
1497 Usach,
1498 #[serde(rename = "CAACH")]
1499 Caach,
1500 #[serde(rename = "SEPA")]
1501 Sepa,
1502 #[serde(rename = "eDDA")]
1503 EDDA,
1504 #[serde(rename = "eGIRO")]
1505 EGIRO,
1506 #[serde(rename = "OPEN_BANKING")]
1507 OpenBanking,
1508}
1509impl core::fmt::Display for BankInstructionMethod {
1510 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1511 match self {
1512 Self::Ach => write!(f, "ACH"),
1513 Self::Wire => write!(f, "WIRE"),
1514 Self::Usach => write!(f, "USACH"),
1515 Self::Caach => write!(f, "CAACH"),
1516 Self::Sepa => write!(f, "SEPA"),
1517 Self::EDDA => write!(f, "eDDA"),
1518 Self::EGIRO => write!(f, "eGIRO"),
1519 Self::OpenBanking => write!(f, "OPEN_BANKING"),
1520 }
1521 }
1522}
1523#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1524pub struct BankInstructionsBulkRequestBody {
1525 #[serde(rename = "instructionType")]
1526 pub instruction_type: InstructionRequestBodyInstructionType,
1527 pub instructions: Vec<serde_json::Value>,
1528}
1529#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1530pub struct BondFiltersResponse {
1531 #[serde(rename = "bondFilters")]
1533 pub bond_filters: Option<Vec<BondFiltersResponseFilter>>,
1534}
1535#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1536pub struct BondFiltersResponseFilter {
1537 #[serde(rename = "columnId")]
1539 pub column_id: Option<i32>,
1540 #[serde(rename = "displayText")]
1542 pub display_text: Option<BondFiltersResponseFilterDisplayText>,
1543 pub options: Option<Vec<BondFiltersResponseFilterOption>>,
1545}
1546#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
1548pub enum BondFiltersResponseFilterDisplayText {
1549 #[serde(rename = "Maturity Date")]
1550 #[default]
1551 MaturityDate,
1552 #[serde(rename = "Issue Date")]
1553 IssueDate,
1554 Coupon,
1555 Currency,
1556}
1557impl core::fmt::Display for BondFiltersResponseFilterDisplayText {
1558 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1559 match self {
1560 Self::MaturityDate => write!(f, "Maturity Date"),
1561 Self::IssueDate => write!(f, "Issue Date"),
1562 Self::Coupon => write!(f, "Coupon"),
1563 Self::Currency => write!(f, "Currency"),
1564 }
1565 }
1566}
1567#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1568pub struct BondFiltersResponseFilterOption {
1569 pub text: Option<String>,
1571 pub value: String,
1573}
1574#[serde_with::skip_serializing_none]
1575#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1576pub struct BrokerageSessionInitRequest {
1577 pub compete: Option<bool>,
1579 pub publish: Option<bool>,
1581}
1582#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1583pub struct BrokerageSessionStatus {
1584 #[serde(rename = "MAC")]
1586 pub mac: Option<String>,
1587 pub authenticated: Option<bool>,
1589 pub competing: Option<bool>,
1591 pub connected: Option<bool>,
1593 pub established: Option<bool>,
1595 pub fail: Option<String>,
1597 pub hardware_info: Option<String>,
1599 pub message: Option<String>,
1601 #[serde(rename = "serverInfo")]
1602 pub server_info: Option<BrokerageSessionStatusServerInfo>,
1603}
1604#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1605pub struct BrokerageSessionStatusServerInfo {
1606 #[serde(rename = "serverName")]
1608 pub server_name: Option<String>,
1609 #[serde(rename = "serverVersion")]
1611 pub server_version: Option<String>,
1612}
1613#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1614pub struct BulkMultiStatusResponse {
1615 #[serde(rename = "instructionResults")]
1616 pub instruction_results: Option<Vec<serde_json::Value>>,
1617 #[serde(rename = "instructionSetId")]
1619 pub instruction_set_id: f64,
1620 pub status: i32,
1622}
1623#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1624pub struct CSVResponse {
1625 pub message: String,
1628 #[serde(rename = "requestId")]
1631 pub request_id: i32,
1632 pub success: bool,
1634}
1635#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1636#[serde(default)]
1637pub struct CancelBulkRequestBody {
1638 #[serde(rename = "instructionType")]
1639 #[default("CANCEL_INSTRUCTION".to_string())]
1640 pub instruction_type: String,
1641 pub instructions: Vec<serde_json::Value>,
1642}
1643#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
1644pub struct CancelInstruction {
1645 #[serde(rename = "clientInstructionId")]
1647 pub client_instruction_id: f64,
1648 #[serde(rename = "instructionId")]
1650 pub instruction_id: f64,
1651 #[validate(length(min = 1u64, max = 256u64))]
1653 pub reason: String,
1654}
1655#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
1657pub struct CancelOpenOrderRequest {
1658 #[validate(nested)]
1659 pub path: CancelOpenOrderRequestPath,
1660 pub query: CancelOpenOrderRequestQuery,
1661}
1662impl CancelOpenOrderRequest {
1663 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<CancelOpenOrderResponse> {
1665 let status = req.status();
1666 if status == http::StatusCode::OK {
1667 let data =
1668 oas3_gen_support::Diagnostics::<Order200Response2>::json_with_diagnostics(req)
1669 .await?;
1670 return Ok(CancelOpenOrderResponse::Ok(data));
1671 }
1672 if status == http::StatusCode::BAD_REQUEST {
1673 let _ = req.bytes().await?;
1674 return Ok(CancelOpenOrderResponse::BadRequest);
1675 }
1676 if status == http::StatusCode::UNAUTHORIZED {
1677 let _ = req.bytes().await?;
1678 return Ok(CancelOpenOrderResponse::Unauthorized);
1679 }
1680 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
1681 let _ = req.bytes().await?;
1682 return Ok(CancelOpenOrderResponse::InternalServerError);
1683 }
1684 if status == http::StatusCode::SERVICE_UNAVAILABLE {
1685 let _ = req.bytes().await?;
1686 return Ok(CancelOpenOrderResponse::ServiceUnavailable);
1687 }
1688 let _ = req.bytes().await?;
1689 return Ok(CancelOpenOrderResponse::Unknown);
1690 }
1691}
1692#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
1693pub struct CancelOpenOrderRequestPath {
1694 #[validate(length(min = 1u64))]
1697 pub account_id: String,
1698 #[validate(length(min = 1u64))]
1701 pub order_id: String,
1702}
1703#[serde_with::skip_serializing_none]
1704#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1705pub struct CancelOpenOrderRequestQuery {
1706 #[serde(rename = "extOperator")]
1708 pub ext_operator: Option<String>,
1709 #[serde(rename = "manualIndicator")]
1711 pub manual_indicator: Option<bool>,
1712 #[serde(rename = "manualCancelTime")]
1715 pub manual_cancel_time: Option<i32>,
1716}
1717#[derive(Debug, Clone)]
1719pub enum CancelOpenOrderResponse {
1720 Ok(Order200Response2),
1722 BadRequest,
1724 Unauthorized,
1726 InternalServerError,
1729 ServiceUnavailable,
1732 Unknown,
1734}
1735#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
1736#[serde(default)]
1737pub struct CancelRequestBody {
1738 #[validate(nested)]
1739 pub instruction: CancelInstruction,
1740 #[serde(rename = "instructionType")]
1741 #[default("CANCEL_INSTRUCTION".to_string())]
1742 pub instruction_type: String,
1743}
1744#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1745pub struct CategoryTreeResponse {
1746 pub categories: Option<CategoryTreeResponseCategories>,
1748}
1749#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1751pub struct CategoryTreeResponseCategories {
1752 #[serde(rename = "categoryId")]
1754 pub category_id: Option<CategoryTreeResponseCategoriesCategoryId>,
1755}
1756#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1758pub struct CategoryTreeResponseCategoriesCategoryId {
1759 pub markets: Option<Vec<serde_json::Value>>,
1761 pub name: Option<String>,
1763 pub parent_id: Option<String>,
1765}
1766#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
1768pub struct CloseAllMdStreamsRequest {}
1769impl CloseAllMdStreamsRequest {
1770 pub async fn parse_response(
1772 req: reqwest::Response,
1773 ) -> anyhow::Result<CloseAllMdStreamsResponse> {
1774 let status = req.status();
1775 if status == http::StatusCode::OK {
1776 let data =
1777 oas3_gen_support::Diagnostics::<UnsubscribedResponse>::json_with_diagnostics(req)
1778 .await?;
1779 return Ok(CloseAllMdStreamsResponse::Ok(data));
1780 }
1781 if status == http::StatusCode::UNAUTHORIZED {
1782 let _ = req.bytes().await?;
1783 return Ok(CloseAllMdStreamsResponse::Unauthorized);
1784 }
1785 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
1786 let _ = req.bytes().await?;
1787 return Ok(CloseAllMdStreamsResponse::InternalServerError);
1788 }
1789 if status == http::StatusCode::SERVICE_UNAVAILABLE {
1790 let _ = req.bytes().await?;
1791 return Ok(CloseAllMdStreamsResponse::ServiceUnavailable);
1792 }
1793 let _ = req.bytes().await?;
1794 return Ok(CloseAllMdStreamsResponse::Unknown);
1795 }
1796}
1797#[derive(Debug, Clone)]
1799pub enum CloseAllMdStreamsResponse {
1800 Ok(UnsubscribedResponse),
1802 Unauthorized,
1804 InternalServerError,
1807 ServiceUnavailable,
1810 Unknown,
1812}
1813#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
1815pub struct CloseMdStreamRequest {
1816 pub body: ConidRequestBody,
1817}
1818impl CloseMdStreamRequest {
1819 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<CloseMdStreamResponse> {
1821 let status = req.status();
1822 if status == http::StatusCode::OK {
1823 let data =
1824 oas3_gen_support::Diagnostics::<SuccessResponse3>::json_with_diagnostics(req)
1825 .await?;
1826 return Ok(CloseMdStreamResponse::Ok(data));
1827 }
1828 if status == http::StatusCode::BAD_REQUEST {
1829 let _ = req.bytes().await?;
1830 return Ok(CloseMdStreamResponse::BadRequest);
1831 }
1832 if status == http::StatusCode::UNAUTHORIZED {
1833 let _ = req.bytes().await?;
1834 return Ok(CloseMdStreamResponse::Unauthorized);
1835 }
1836 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
1837 let _ = req.bytes().await?;
1838 return Ok(CloseMdStreamResponse::InternalServerError);
1839 }
1840 if status == http::StatusCode::SERVICE_UNAVAILABLE {
1841 let _ = req.bytes().await?;
1842 return Ok(CloseMdStreamResponse::ServiceUnavailable);
1843 }
1844 let _ = req.bytes().await?;
1845 return Ok(CloseMdStreamResponse::Unknown);
1846 }
1847}
1848#[derive(Debug, Clone)]
1850pub enum CloseMdStreamResponse {
1851 Ok(SuccessResponse3),
1853 BadRequest,
1855 Unauthorized,
1857 InternalServerError,
1860 ServiceUnavailable,
1863 Unknown,
1865}
1866pub type ComboPositionResponse = Vec<ComboPositionResponseComboPositionResponse>;
1868#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1869pub struct ComboPositionResponseComboPositionResponse {
1870 pub description: Option<String>,
1872 pub legs: Option<Vec<ComboPositionResponseComboPositionResponseLeg>>,
1874 pub name: Option<String>,
1876 pub positions: Option<Vec<IndividualComboPosition>>,
1878}
1879#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
1880pub struct ComboPositionResponseComboPositionResponseLeg {
1881 pub conid: Option<String>,
1883 pub ratio: Option<i32>,
1885}
1886#[serde_with::skip_serializing_none]
1887#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
1888pub struct ComplexAssetTransferInstruction {
1889 #[serde(rename = "accountId")]
1891 #[validate(length(min = 1u64, max = 32u64))]
1892 pub account_id: String,
1893 #[serde(rename = "accountIdAtCurrentBroker")]
1895 #[validate(length(min = 1u64, max = 64u64))]
1896 pub account_id_at_current_broker: Option<String>,
1897 #[serde(rename = "clientInstructionId")]
1899 pub client_instruction_id: f64,
1900 #[serde(rename = "contraBrokerInfo")]
1901 #[validate(nested)]
1902 pub contra_broker_info: ContraBrokerInfo,
1903 pub direction: InstructionDirection,
1905 #[serde(rename = "nonDisclosedDetail")]
1906 #[validate(nested)]
1907 pub non_disclosed_detail: Option<NonDisclosedDetail>,
1908 pub quantity: f64,
1910 #[serde(rename = "tradingInstrument")]
1911 pub trading_instrument: TradingInstrument,
1912}
1913#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
1915pub struct ConfirmOrderReplyRequest {
1916 #[validate(nested)]
1917 pub path: ConfirmOrderReplyRequestPath,
1918 pub body: ConfirmedRequestBody,
1919}
1920impl ConfirmOrderReplyRequest {
1921 pub async fn parse_response(
1923 req: reqwest::Response,
1924 ) -> anyhow::Result<ConfirmOrderReplyResponse> {
1925 let status = req.status();
1926 if status == http::StatusCode::OK {
1927 let data =
1928 oas3_gen_support::Diagnostics::<Reply200Response>::json_with_diagnostics(req)
1929 .await?;
1930 return Ok(ConfirmOrderReplyResponse::Ok(data));
1931 }
1932 if status == http::StatusCode::UNAUTHORIZED {
1933 let _ = req.bytes().await?;
1934 return Ok(ConfirmOrderReplyResponse::Unauthorized);
1935 }
1936 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
1937 let _ = req.bytes().await?;
1938 return Ok(ConfirmOrderReplyResponse::InternalServerError);
1939 }
1940 if status == http::StatusCode::SERVICE_UNAVAILABLE {
1941 let _ = req.bytes().await?;
1942 return Ok(ConfirmOrderReplyResponse::ServiceUnavailable);
1943 }
1944 let _ = req.bytes().await?;
1945 return Ok(ConfirmOrderReplyResponse::Unknown);
1946 }
1947}
1948#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
1949pub struct ConfirmOrderReplyRequestPath {
1950 #[validate(length(min = 1u64))]
1953 pub reply_id: String,
1954}
1955#[derive(Debug, Clone)]
1957pub enum ConfirmOrderReplyResponse {
1958 Ok(Reply200Response),
1960 Unauthorized,
1962 InternalServerError,
1965 ServiceUnavailable,
1968 Unknown,
1970}
1971#[serde_with::skip_serializing_none]
1972#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1973pub struct ConfirmedRequestBody {
1974 pub confirmed: Option<bool>,
1976}
1977#[serde_with::skip_serializing_none]
1978#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
1979pub struct ConidRequestBody {
1980 pub conid: Option<i32>,
1983}
1984#[serde_with::skip_serializing_none]
1985#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
1986pub struct ContraBrokerInfo {
1987 #[serde(rename = "accountTitle")]
1989 #[validate(length(min = 1u64, max = 128u64))]
1990 pub account_title: Option<String>,
1991 #[serde(rename = "accountType")]
1993 #[validate(length(min = 1u64, max = 32u64))]
1994 pub account_type: String,
1995 #[serde(rename = "brokerAccountId")]
1997 #[validate(length(min = 1u64, max = 64u64))]
1998 pub broker_account_id: String,
1999 #[serde(rename = "brokerName")]
2001 #[validate(length(min = 1u64, max = 128u64))]
2002 pub broker_name: String,
2003 #[serde(rename = "contactEmail")]
2005 #[validate(length(min = 1u64, max = 64u64))]
2006 pub contact_email: String,
2007 #[serde(rename = "contactName")]
2009 #[validate(length(min = 1u64, max = 64u64))]
2010 pub contact_name: Option<String>,
2011 #[serde(rename = "contactPhone")]
2013 #[validate(length(min = 1u64, max = 16u64))]
2014 pub contact_phone: String,
2015 #[validate(length(min = 1u64, max = 64u64))]
2017 pub country: String,
2018 #[serde(rename = "depositoryId")]
2020 #[validate(length(min = 1u64, max = 64u64))]
2021 pub depository_id: String,
2022}
2023#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2024pub struct ContractInfo {
2025 pub allow_sell_long: Option<bool>,
2027 pub category: Option<String>,
2029 pub cfi_code: Option<String>,
2031 pub classifier: Option<String>,
2032 pub company_name: Option<String>,
2034 pub con_id: Option<i32>,
2036 pub contract_clarification_type: Option<String>,
2037 pub contract_month: Option<String>,
2039 pub currency: Option<String>,
2041 pub cusip: Option<String>,
2043 pub exchange: Option<String>,
2045 pub expiry_full: Option<String>,
2047 pub industry: Option<String>,
2049 pub instrument_type: Option<String>,
2051 pub is_zero_commission_security: Option<bool>,
2053 pub local_symbol: Option<String>,
2055 pub maturity_date: Option<String>,
2057 pub multiplier: Option<String>,
2059 pub r_t_h: Option<bool>,
2061 pub smart_available: Option<bool>,
2063 pub symbol: Option<String>,
2065 pub text: Option<String>,
2067 pub trading_class: Option<String>,
2069 pub underlying_con_id: Option<i32>,
2071 pub underlying_issuer: Option<String>,
2073 pub valid_exchanges: Option<String>,
2075}
2076#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2078pub struct ContractRules {
2079 #[serde(rename = "algoEligible")]
2081 pub algo_eligible: Option<bool>,
2082 #[serde(rename = "allOrNoneEligible")]
2084 pub all_or_none_eligible: Option<bool>,
2085 #[serde(rename = "canTradeAcctIds")]
2087 pub can_trade_acct_ids: Option<Vec<String>>,
2088 #[serde(rename = "cashCcy")]
2090 pub cash_ccy: Option<String>,
2091 #[serde(rename = "cashQtyIncr")]
2093 pub cash_qty_incr: Option<i32>,
2094 #[serde(rename = "cashSize")]
2096 pub cash_size: Option<f64>,
2097 #[serde(rename = "costReport")]
2099 pub cost_report: Option<bool>,
2100 #[serde(rename = "cqtTypes")]
2102 pub cqt_types: Option<Vec<ContractRulesCqtType>>,
2103 #[serde(rename = "defaultSize")]
2105 pub default_size: Option<i32>,
2106 #[serde(rename = "displaySize")]
2108 pub display_size: Option<i32>,
2109 pub error: Option<String>,
2111 #[serde(rename = "forceOrderPreview")]
2113 pub force_order_preview: Option<bool>,
2114 #[serde(rename = "fraqInt")]
2116 pub fraq_int: Option<i32>,
2117 #[serde(rename = "fraqTypes")]
2119 pub fraq_types: Option<Vec<ContractRulesCqtType>>,
2120 #[serde(rename = "hasSecondary")]
2121 pub has_secondary: Option<bool>,
2122 #[serde(rename = "ibAlgoTypes")]
2124 pub ib_algo_types: Option<Vec<ContractRulesIbAlgoType>>,
2125 pub increment: Option<f64>,
2127 #[serde(rename = "incrementDigits")]
2129 pub increment_digits: Option<i32>,
2130 #[serde(rename = "incrementRules")]
2132 pub increment_rules: Option<Vec<ContractRulesIncrementRule>>,
2133 #[serde(rename = "incrementType")]
2135 pub increment_type: Option<i32>,
2136 #[serde(rename = "limitPrice")]
2138 pub limit_price: Option<f64>,
2139 #[serde(rename = "modTypes")]
2141 pub mod_types: Option<Vec<serde_json::Value>>,
2142 #[serde(rename = "negativeCapable")]
2144 pub negative_capable: Option<bool>,
2145 #[serde(rename = "orderDefaults")]
2147 pub order_defaults: Option<ContractRulesOrderDefaults>,
2148 #[serde(rename = "orderOrigination")]
2150 pub order_origination: Option<String>,
2151 #[serde(rename = "orderTypes")]
2153 pub order_types: Option<Vec<ContractRulesOrderType>>,
2154 #[serde(rename = "orderTypesOutside")]
2156 pub order_types_outside: Option<Vec<ContractRulesOrderTypesOutside>>,
2157 pub preview: Option<bool>,
2159 #[serde(rename = "priceMagnifier")]
2161 pub price_magnifier: Option<i32>,
2162 #[serde(rename = "sizeIncrement")]
2164 pub size_increment: Option<i32>,
2165 #[serde(rename = "stopPrice")]
2167 pub stop_price: Option<f64>,
2168 #[serde(rename = "tifDefaults")]
2170 pub tif_defaults: Option<ContractRulesTifDefaults>,
2171 #[serde(rename = "tifTypes")]
2173 pub tif_types: Option<Vec<String>>,
2174}
2175#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
2176pub enum ContractRulesCqtType {
2177 #[serde(rename = "limit")]
2178 #[default]
2179 Limit,
2180 #[serde(rename = "market")]
2181 Market,
2182 #[serde(rename = "stop")]
2183 Stop,
2184 #[serde(rename = "stop_limit")]
2185 StopLimit,
2186 #[serde(rename = "mit")]
2187 Mit,
2188 #[serde(rename = "lit")]
2189 Lit,
2190 #[serde(rename = "trailing_stop")]
2191 TrailingStop,
2192 #[serde(rename = "trailing_stop_limit")]
2193 TrailingStopLimit,
2194}
2195impl core::fmt::Display for ContractRulesCqtType {
2196 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2197 match self {
2198 Self::Limit => write!(f, "limit"),
2199 Self::Market => write!(f, "market"),
2200 Self::Stop => write!(f, "stop"),
2201 Self::StopLimit => write!(f, "stop_limit"),
2202 Self::Mit => write!(f, "mit"),
2203 Self::Lit => write!(f, "lit"),
2204 Self::TrailingStop => write!(f, "trailing_stop"),
2205 Self::TrailingStopLimit => write!(f, "trailing_stop_limit"),
2206 }
2207 }
2208}
2209#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
2210pub enum ContractRulesIbAlgoType {
2211 #[serde(rename = "limit")]
2212 #[default]
2213 Limit,
2214 #[serde(rename = "stop_limit")]
2215 StopLimit,
2216 #[serde(rename = "lit")]
2217 Lit,
2218 #[serde(rename = "trailing_stop_limit")]
2219 TrailingStopLimit,
2220 #[serde(rename = "relative")]
2221 Relative,
2222 #[serde(rename = "marketonclose")]
2223 Marketonclose,
2224 #[serde(rename = "limitonclose")]
2225 Limitonclose,
2226}
2227impl core::fmt::Display for ContractRulesIbAlgoType {
2228 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2229 match self {
2230 Self::Limit => write!(f, "limit"),
2231 Self::StopLimit => write!(f, "stop_limit"),
2232 Self::Lit => write!(f, "lit"),
2233 Self::TrailingStopLimit => write!(f, "trailing_stop_limit"),
2234 Self::Relative => write!(f, "relative"),
2235 Self::Marketonclose => write!(f, "marketonclose"),
2236 Self::Limitonclose => write!(f, "limitonclose"),
2237 }
2238 }
2239}
2240#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2241pub struct ContractRulesIncrementRule {
2242 pub increment: Option<f64>,
2244 #[serde(rename = "lowerEdge")]
2246 pub lower_edge: Option<f64>,
2247}
2248#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2250pub struct ContractRulesOrderDefaults {
2251 #[serde(rename = "LMT")]
2252 pub lmt: Option<ContractRulesOrderDefaultsLmt>,
2253}
2254#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2255pub struct ContractRulesOrderDefaultsLmt {
2256 #[serde(rename = "LP")]
2258 pub lp: Option<String>,
2259}
2260#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
2261pub enum ContractRulesOrderType {
2262 #[serde(rename = "limit")]
2263 #[default]
2264 Limit,
2265 #[serde(rename = "midprice")]
2266 Midprice,
2267 #[serde(rename = "market")]
2268 Market,
2269 #[serde(rename = "stop")]
2270 Stop,
2271 #[serde(rename = "stop_limit")]
2272 StopLimit,
2273 #[serde(rename = "mit")]
2274 Mit,
2275 #[serde(rename = "lit")]
2276 Lit,
2277 #[serde(rename = "trailing_stop")]
2278 TrailingStop,
2279 #[serde(rename = "trailing_stop_limit")]
2280 TrailingStopLimit,
2281 #[serde(rename = "relative")]
2282 Relative,
2283 #[serde(rename = "marketonclose")]
2284 Marketonclose,
2285 #[serde(rename = "limitonclose")]
2286 Limitonclose,
2287}
2288impl core::fmt::Display for ContractRulesOrderType {
2289 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2290 match self {
2291 Self::Limit => write!(f, "limit"),
2292 Self::Midprice => write!(f, "midprice"),
2293 Self::Market => write!(f, "market"),
2294 Self::Stop => write!(f, "stop"),
2295 Self::StopLimit => write!(f, "stop_limit"),
2296 Self::Mit => write!(f, "mit"),
2297 Self::Lit => write!(f, "lit"),
2298 Self::TrailingStop => write!(f, "trailing_stop"),
2299 Self::TrailingStopLimit => write!(f, "trailing_stop_limit"),
2300 Self::Relative => write!(f, "relative"),
2301 Self::Marketonclose => write!(f, "marketonclose"),
2302 Self::Limitonclose => write!(f, "limitonclose"),
2303 }
2304 }
2305}
2306#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
2307pub enum ContractRulesOrderTypesOutside {
2308 #[serde(rename = "limit")]
2309 #[default]
2310 Limit,
2311 #[serde(rename = "stop_limit")]
2312 StopLimit,
2313 #[serde(rename = "lit")]
2314 Lit,
2315 #[serde(rename = "trailing_stop_limit")]
2316 TrailingStopLimit,
2317 #[serde(rename = "relative")]
2318 Relative,
2319}
2320impl core::fmt::Display for ContractRulesOrderTypesOutside {
2321 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2322 match self {
2323 Self::Limit => write!(f, "limit"),
2324 Self::StopLimit => write!(f, "stop_limit"),
2325 Self::Lit => write!(f, "lit"),
2326 Self::TrailingStopLimit => write!(f, "trailing_stop_limit"),
2327 Self::Relative => write!(f, "relative"),
2328 }
2329 }
2330}
2331#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2333pub struct ContractRulesTifDefaults {
2334 #[serde(rename = "DEFAULT_ACCT")]
2336 pub default_acct: Option<String>,
2337 #[serde(rename = "PMALGO")]
2338 pub pmalgo: Option<bool>,
2339 #[serde(rename = "SIZE")]
2341 pub size: Option<String>,
2342 #[serde(rename = "TIF")]
2344 pub tif: Option<String>,
2345}
2346#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2348pub struct CreateAlertRequest {
2349 #[validate(nested)]
2350 pub path: CreateAlertRequestPath,
2351 #[validate(nested)]
2352 pub body: AlertCreationRequest,
2353}
2354impl CreateAlertRequest {
2355 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<CreateAlertResponse> {
2357 let status = req.status();
2358 if status == http::StatusCode::OK {
2359 let data =
2360 oas3_gen_support::Diagnostics::<AlertCreationResponse>::json_with_diagnostics(req)
2361 .await?;
2362 return Ok(CreateAlertResponse::Ok(data));
2363 }
2364 if status == http::StatusCode::BAD_REQUEST {
2365 let _ = req.bytes().await?;
2366 return Ok(CreateAlertResponse::BadRequest);
2367 }
2368 if status == http::StatusCode::UNAUTHORIZED {
2369 let _ = req.bytes().await?;
2370 return Ok(CreateAlertResponse::Unauthorized);
2371 }
2372 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
2373 let _ = req.bytes().await?;
2374 return Ok(CreateAlertResponse::InternalServerError);
2375 }
2376 if status == http::StatusCode::SERVICE_UNAVAILABLE {
2377 let _ = req.bytes().await?;
2378 return Ok(CreateAlertResponse::ServiceUnavailable);
2379 }
2380 let _ = req.bytes().await?;
2381 return Ok(CreateAlertResponse::Unknown);
2382 }
2383}
2384#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
2385pub struct CreateAlertRequestPath {
2386 #[validate(length(min = 1u64))]
2388 pub account_id: String,
2389}
2390#[derive(Debug, Clone)]
2392pub enum CreateAlertResponse {
2393 Ok(AlertCreationResponse),
2395 BadRequest,
2397 Unauthorized,
2399 InternalServerError,
2402 ServiceUnavailable,
2405 Unknown,
2407}
2408#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2410pub struct CreateAllocationGroupRequest {
2411 #[validate(nested)]
2412 pub body: GroupRequestBody2,
2413}
2414impl CreateAllocationGroupRequest {
2415 pub async fn parse_response(
2417 req: reqwest::Response,
2418 ) -> anyhow::Result<CreateAllocationGroupResponse> {
2419 let status = req.status();
2420 if status == http::StatusCode::OK {
2421 let data = oas3_gen_support::Diagnostics::<SuccessResponse>::json_with_diagnostics(req)
2422 .await?;
2423 return Ok(CreateAllocationGroupResponse::Ok(data));
2424 }
2425 if status == http::StatusCode::UNAUTHORIZED {
2426 let _ = req.bytes().await?;
2427 return Ok(CreateAllocationGroupResponse::Unauthorized);
2428 }
2429 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
2430 let _ = req.bytes().await?;
2431 return Ok(CreateAllocationGroupResponse::InternalServerError);
2432 }
2433 if status == http::StatusCode::SERVICE_UNAVAILABLE {
2434 let _ = req.bytes().await?;
2435 return Ok(CreateAllocationGroupResponse::ServiceUnavailable);
2436 }
2437 let _ = req.bytes().await?;
2438 return Ok(CreateAllocationGroupResponse::Unknown);
2439 }
2440}
2441#[derive(Debug, Clone)]
2443pub enum CreateAllocationGroupResponse {
2444 Ok(SuccessResponse),
2446 Unauthorized,
2448 InternalServerError,
2451 ServiceUnavailable,
2454 Unknown,
2456}
2457#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2458pub struct CreateBrowserSessionResponse {
2459 pub active: Option<bool>,
2460 pub url: Option<String>,
2462}
2463#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2464pub struct CreateSessionResponse {
2465 pub access_token: String,
2467 pub active: Option<bool>,
2468 pub token_type: Option<String>,
2470}
2471#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2472pub struct CurrencyPairs {
2473 #[serde(flatten)]
2475 pub additional_properties: std::collections::HashMap<String, Vec<serde_json::Value>>,
2476}
2477#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2479pub struct DeleteAlertRequest {
2480 #[validate(nested)]
2481 pub path: DeleteAlertRequestPath,
2482 pub body: ArrayNode,
2483}
2484impl DeleteAlertRequest {
2485 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<DeleteAlertResponse> {
2487 let status = req.status();
2488 if status == http::StatusCode::OK {
2489 let data =
2490 oas3_gen_support::Diagnostics::<AlertDeletionResponse>::json_with_diagnostics(req)
2491 .await?;
2492 return Ok(DeleteAlertResponse::Ok(data));
2493 }
2494 if status == http::StatusCode::UNAUTHORIZED {
2495 let _ = req.bytes().await?;
2496 return Ok(DeleteAlertResponse::Unauthorized);
2497 }
2498 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
2499 let _ = req.bytes().await?;
2500 return Ok(DeleteAlertResponse::InternalServerError);
2501 }
2502 let _ = req.bytes().await?;
2503 return Ok(DeleteAlertResponse::Unknown);
2504 }
2505}
2506#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
2507pub struct DeleteAlertRequestPath {
2508 #[validate(length(min = 1u64))]
2510 pub account_id: String,
2511 #[validate(length(min = 1u64))]
2514 pub alert_id: String,
2515}
2516#[derive(Debug, Clone)]
2518pub enum DeleteAlertResponse {
2519 Ok(AlertDeletionResponse),
2521 Unauthorized,
2523 InternalServerError,
2525 Unknown,
2527}
2528#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2530pub struct DeleteAllocationGroupRequest {
2531 #[validate(nested)]
2532 pub body: NameRequestBody,
2533}
2534impl DeleteAllocationGroupRequest {
2535 pub async fn parse_response(
2537 req: reqwest::Response,
2538 ) -> anyhow::Result<CreateAllocationGroupResponse> {
2539 let status = req.status();
2540 if status == http::StatusCode::OK {
2541 let data = oas3_gen_support::Diagnostics::<SuccessResponse>::json_with_diagnostics(req)
2542 .await?;
2543 return Ok(CreateAllocationGroupResponse::Ok(data));
2544 }
2545 if status == http::StatusCode::UNAUTHORIZED {
2546 let _ = req.bytes().await?;
2547 return Ok(CreateAllocationGroupResponse::Unauthorized);
2548 }
2549 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
2550 let _ = req.bytes().await?;
2551 return Ok(CreateAllocationGroupResponse::InternalServerError);
2552 }
2553 if status == http::StatusCode::SERVICE_UNAVAILABLE {
2554 let _ = req.bytes().await?;
2555 return Ok(CreateAllocationGroupResponse::ServiceUnavailable);
2556 }
2557 let _ = req.bytes().await?;
2558 return Ok(CreateAllocationGroupResponse::Unknown);
2559 }
2560}
2561#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
2562pub struct DeleteBankInstruction {
2563 #[serde(rename = "accountId")]
2565 #[validate(length(min = 1u64, max = 32u64))]
2566 pub account_id: String,
2567 #[serde(rename = "bankInstructionMethod")]
2569 pub bank_instruction_method: DeleteBankInstructionBankInstructionMethod,
2570 #[serde(rename = "bankInstructionName")]
2572 #[validate(length(min = 1u64, max = 150u64))]
2573 pub bank_instruction_name: String,
2574 #[serde(rename = "clientInstructionId")]
2576 pub client_instruction_id: f64,
2577 #[validate(length(min = 1u64, max = 3u64))]
2579 pub currency: String,
2580}
2581#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
2582pub enum DeleteBankInstructionBankInstructionMethod {
2583 #[serde(rename = "WIRE")]
2584 #[default]
2585 Wire,
2586 #[serde(rename = "ACH")]
2587 Ach,
2588}
2589impl core::fmt::Display for DeleteBankInstructionBankInstructionMethod {
2590 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2591 match self {
2592 Self::Wire => write!(f, "WIRE"),
2593 Self::Ach => write!(f, "ACH"),
2594 }
2595 }
2596}
2597#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2599pub struct DeleteFyiDeviceRequest {
2600 pub path: DeleteFyiDeviceRequestPath,
2601}
2602impl DeleteFyiDeviceRequest {
2603 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<DeleteFyiDeviceResponse> {
2605 let status = req.status();
2606 if status == http::StatusCode::OK {
2607 let _ = req.bytes().await?;
2608 return Ok(DeleteFyiDeviceResponse::Ok);
2609 }
2610 let _ = req.bytes().await?;
2611 return Ok(DeleteFyiDeviceResponse::Unknown);
2612 }
2613}
2614#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
2615pub struct DeleteFyiDeviceRequestPath {
2616 pub device_id: serde_json::Value,
2618}
2619#[derive(Debug, Clone)]
2621pub enum DeleteFyiDeviceResponse {
2622 Ok,
2624 Unknown,
2626}
2627#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
2629pub struct DeleteWatchlistRequest {
2630 #[validate(nested)]
2631 pub query: DeleteWatchlistRequestQuery,
2632}
2633impl DeleteWatchlistRequest {
2634 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<DeleteWatchlistResponse> {
2636 let status = req.status();
2637 if status == http::StatusCode::OK {
2638 let data =
2639 oas3_gen_support::Diagnostics::<WatchlistDeleteSuccess>::json_with_diagnostics(req)
2640 .await?;
2641 return Ok(DeleteWatchlistResponse::Ok(data));
2642 }
2643 if status == http::StatusCode::BAD_REQUEST {
2644 let _ = req.bytes().await?;
2645 return Ok(DeleteWatchlistResponse::BadRequest);
2646 }
2647 if status == http::StatusCode::UNAUTHORIZED {
2648 let _ = req.bytes().await?;
2649 return Ok(DeleteWatchlistResponse::Unauthorized);
2650 }
2651 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
2652 let _ = req.bytes().await?;
2653 return Ok(DeleteWatchlistResponse::InternalServerError);
2654 }
2655 if status == http::StatusCode::SERVICE_UNAVAILABLE {
2656 let _ = req.bytes().await?;
2657 return Ok(DeleteWatchlistResponse::ServiceUnavailable);
2658 }
2659 let _ = req.bytes().await?;
2660 return Ok(DeleteWatchlistResponse::Unknown);
2661 }
2662}
2663#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
2664pub struct DeleteWatchlistRequestQuery {
2665 #[validate(length(min = 1u64))]
2668 pub id: String,
2669}
2670#[derive(Debug, Clone)]
2672pub enum DeleteWatchlistResponse {
2673 Ok(WatchlistDeleteSuccess),
2675 BadRequest,
2677 Unauthorized,
2679 InternalServerError,
2682 ServiceUnavailable,
2685 Unknown,
2687}
2688#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2689pub struct DeliveryOptions {
2690 #[serde(rename = "E")]
2692 pub e: Option<Vec<DeliveryOptionsE>>,
2693 #[serde(rename = "M")]
2695 pub m: Option<i32>,
2696}
2697#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2698pub struct DeliveryOptionsE {
2699 #[serde(rename = "A")]
2701 pub a: Option<String>,
2702 #[serde(rename = "I")]
2704 pub i: Option<String>,
2705 #[serde(rename = "NM")]
2707 pub nm: Option<String>,
2708 #[serde(rename = "UI")]
2710 pub ui: Option<String>,
2711}
2712#[serde_with::skip_serializing_none]
2713#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
2714pub struct DepositFundsInstruction {
2715 #[serde(rename = "accountId")]
2717 #[validate(length(min = 1u64, max = 32u64))]
2718 pub account_id: String,
2719 pub amount: f64,
2721 #[serde(rename = "bankInstructionMethod")]
2723 pub bank_instruction_method: DepositFundsInstructionBankInstructionMethod,
2724 #[serde(rename = "bankInstructionName")]
2726 #[validate(length(min = 0u64, max = 150u64))]
2727 pub bank_instruction_name: Option<String>,
2728 #[serde(rename = "clientInstructionId")]
2730 pub client_instruction_id: f64,
2731 #[validate(length(min = 1u64, max = 3u64))]
2733 pub currency: String,
2734 #[validate(length(min = 0u64, max = 64u64))]
2736 pub identifier: Option<String>,
2737 #[serde(rename = "iraDepositDetail")]
2738 pub ira_deposit_detail: Option<DepositFundsInstructionIraDepositDetail>,
2739 #[serde(rename = "openBanking")]
2740 #[validate(nested)]
2741 pub open_banking: Option<DepositFundsInstructionOpenBanking>,
2742 #[serde(rename = "recurringInstructionDetail")]
2743 #[validate(nested)]
2744 pub recurring_instruction_detail: Option<RecurringInstructionDetail>,
2745 #[serde(rename = "senderInstitutionName")]
2747 #[validate(length(min = 0u64, max = 128u64))]
2748 pub sender_institution_name: Option<String>,
2749 #[serde(rename = "sendingInstitution")]
2751 #[validate(length(min = 0u64, max = 128u64))]
2752 pub sending_institution: Option<String>,
2753 #[serde(rename = "specialInstruction")]
2755 #[validate(length(min = 0u64, max = 128u64))]
2756 pub special_instruction: Option<String>,
2757}
2758#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
2759pub enum DepositFundsInstructionBankInstructionMethod {
2760 #[serde(rename = "ACH")]
2761 #[default]
2762 Ach,
2763 #[serde(rename = "WIRE")]
2764 Wire,
2765 #[serde(rename = "eDDA")]
2766 EDDA,
2767 #[serde(rename = "OPEN_BANKING")]
2768 OpenBanking,
2769}
2770impl core::fmt::Display for DepositFundsInstructionBankInstructionMethod {
2771 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2772 match self {
2773 Self::Ach => write!(f, "ACH"),
2774 Self::Wire => write!(f, "WIRE"),
2775 Self::EDDA => write!(f, "eDDA"),
2776 Self::OpenBanking => write!(f, "OPEN_BANKING"),
2777 }
2778 }
2779}
2780#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
2781pub struct DepositFundsInstructionIraDepositDetail {
2782 #[serde(rename = "fromIraType")]
2784 pub from_ira_type: DepositFundsInstructionIraDepositDetailFromIraType,
2785 #[serde(rename = "iraContributionType")]
2787 pub ira_contribution_type: DepositFundsInstructionIraDepositDetailIraContributionType,
2788 #[serde(rename = "iraTaxYearType")]
2790 pub ira_tax_year_type: DepositFundsInstructionIraDepositDetailIraTaxYearType,
2791}
2792#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
2793pub enum DepositFundsInstructionIraDepositDetailFromIraType {
2794 #[serde(rename = "NONE")]
2795 #[default]
2796 None,
2797 #[serde(rename = "TRADITIONAL")]
2798 Traditional,
2799 #[serde(rename = "ROLLOVER")]
2800 Rollover,
2801 #[serde(rename = "ROTH")]
2802 Roth,
2803 #[serde(rename = "SEP")]
2804 Sep,
2805 #[serde(rename = "EDUCATION")]
2806 Education,
2807 #[serde(rename = "TRADITIONAL_INHERITED")]
2808 TraditionalInherited,
2809 #[serde(rename = "ROTH_INHERITED")]
2810 RothInherited,
2811 #[serde(rename = "SEP_INHERITED")]
2812 SepInherited,
2813 #[serde(rename = "RETIREMENT_SAVING_PLAN")]
2814 RetirementSavingPlan,
2815 #[serde(rename = "SPOUSAL_RETIREMENT_SAVING_PLAN")]
2816 SpousalRetirementSavingPlan,
2817 #[serde(rename = "TAX_FREE_SAVING_ACCOUNT")]
2818 TaxFreeSavingAccount,
2819}
2820impl core::fmt::Display for DepositFundsInstructionIraDepositDetailFromIraType {
2821 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2822 match self {
2823 Self::None => write!(f, "NONE"),
2824 Self::Traditional => write!(f, "TRADITIONAL"),
2825 Self::Rollover => write!(f, "ROLLOVER"),
2826 Self::Roth => write!(f, "ROTH"),
2827 Self::Sep => write!(f, "SEP"),
2828 Self::Education => write!(f, "EDUCATION"),
2829 Self::TraditionalInherited => write!(f, "TRADITIONAL_INHERITED"),
2830 Self::RothInherited => write!(f, "ROTH_INHERITED"),
2831 Self::SepInherited => write!(f, "SEP_INHERITED"),
2832 Self::RetirementSavingPlan => write!(f, "RETIREMENT_SAVING_PLAN"),
2833 Self::SpousalRetirementSavingPlan => {
2834 write!(f, "SPOUSAL_RETIREMENT_SAVING_PLAN")
2835 }
2836 Self::TaxFreeSavingAccount => write!(f, "TAX_FREE_SAVING_ACCOUNT"),
2837 }
2838 }
2839}
2840#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
2841pub enum DepositFundsInstructionIraDepositDetailIraContributionType {
2842 #[serde(rename = "ROLLOVER")]
2843 #[default]
2844 Rollover,
2845 #[serde(rename = "LATE_ROLLOVER")]
2846 LateRollover,
2847 #[serde(rename = "DIRECT_ROLLOVER")]
2848 DirectRollover,
2849 #[serde(rename = "CONTRIBUTION")]
2850 Contribution,
2851 #[serde(rename = "SPOUSAL_CONTRIBUTION")]
2852 SpousalContribution,
2853 #[serde(rename = "EMPLOYER_SEP_CONTRIBUTION")]
2854 EmployerSepContribution,
2855}
2856impl core::fmt::Display for DepositFundsInstructionIraDepositDetailIraContributionType {
2857 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2858 match self {
2859 Self::Rollover => write!(f, "ROLLOVER"),
2860 Self::LateRollover => write!(f, "LATE_ROLLOVER"),
2861 Self::DirectRollover => write!(f, "DIRECT_ROLLOVER"),
2862 Self::Contribution => write!(f, "CONTRIBUTION"),
2863 Self::SpousalContribution => write!(f, "SPOUSAL_CONTRIBUTION"),
2864 Self::EmployerSepContribution => write!(f, "EMPLOYER_SEP_CONTRIBUTION"),
2865 }
2866 }
2867}
2868#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
2869pub enum DepositFundsInstructionIraDepositDetailIraTaxYearType {
2870 #[serde(rename = "CURRENT")]
2871 #[default]
2872 Current,
2873 #[serde(rename = "PRIOR")]
2874 Prior,
2875}
2876impl core::fmt::Display for DepositFundsInstructionIraDepositDetailIraTaxYearType {
2877 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2878 match self {
2879 Self::Current => write!(f, "CURRENT"),
2880 Self::Prior => write!(f, "PRIOR"),
2881 }
2882 }
2883}
2884#[serde_with::skip_serializing_none]
2885#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
2886#[serde(default)]
2887pub struct DepositFundsInstructionOpenBanking {
2888 #[serde(rename = "plaidOptions")]
2889 #[validate(nested)]
2890 pub plaid_options: Option<DepositFundsInstructionOpenBankingPlaidOptions>,
2891 #[serde(rename = "serviceProvider")]
2893 #[default("PLAID".to_string())]
2894 pub service_provider: String,
2895}
2896#[serde_with::skip_serializing_none]
2897#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
2898pub struct DepositFundsInstructionOpenBankingPlaidOptions {
2899 #[serde(rename = "completionRedirectUri")]
2902 #[validate(length(min = 0u64))]
2903 pub completion_redirect_uri: Option<String>,
2904 #[serde(rename = "isMobileApp")]
2905 pub is_mobile_app: Option<bool>,
2906 #[serde(rename = "linkDisplayName")]
2909 pub link_display_name: Option<String>,
2910}
2911#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2912pub struct DepositFundsPollingResponse {
2913 #[serde(rename = "instructionResult")]
2914 pub instruction_result: Option<DepositFundsPollingResult>,
2915 #[serde(rename = "instructionSetId")]
2917 pub instruction_set_id: f64,
2918 pub status: f64,
2920}
2921#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2922pub struct DepositFundsPollingResult {
2923 #[serde(rename = "clientInstructionId")]
2925 pub client_instruction_id: f64,
2926 #[serde(rename = "depositDetails")]
2927 pub deposit_details: Option<DepositFundsPollingResultDepositDetails>,
2928 pub description: Option<String>,
2930 pub error: Option<ResultError>,
2931 #[serde(rename = "ibReferenceId")]
2933 pub ib_reference_id: Option<f64>,
2934 #[serde(rename = "instructionId")]
2936 pub instruction_id: f64,
2937 #[serde(rename = "instructionStatus")]
2939 pub instruction_status: PollingInstructionResultInstructionStatus,
2940 #[serde(rename = "instructionType")]
2942 pub instruction_type: InstructionResultInstructionType,
2943}
2944#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2945pub struct DepositFundsPollingResultDepositDetails {
2946 pub amount: Option<f64>,
2947 pub currency: Option<String>,
2948 #[serde(rename = "openBanking")]
2949 pub open_banking: Option<DepositFundsPollingResultDepositDetailsOpenBanking>,
2950 #[serde(rename = "whenAvailable")]
2951 pub when_available: Option<String>,
2952}
2953#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2954pub struct DepositFundsPollingResultDepositDetailsOpenBanking {
2955 #[serde(rename = "providerResponse")]
2956 pub provider_response: Option<serde_json::Value>,
2957 #[serde(rename = "serviceProvider")]
2958 pub service_provider: Option<String>,
2959}
2960#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2961pub struct Detail200Response {
2962 #[serde(rename = "accountInfoList")]
2964 pub account_info_list: Option<Vec<Detail200ResponseAccountInfoList>>,
2965 #[serde(rename = "baseCcyMaster")]
2967 pub base_ccy_master: Option<String>,
2968 pub model: Option<String>,
2970 #[serde(rename = "reqID")]
2972 pub req_id: Option<i32>,
2973}
2974#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
2975pub struct Detail200ResponseAccountInfoList {
2976 pub account: Option<String>,
2978 #[serde(rename = "accountImbalance")]
2980 pub account_imbalance: Option<String>,
2981 pub alias: Option<String>,
2983 #[serde(rename = "baseCcyAccount")]
2985 pub base_ccy_account: Option<String>,
2986 #[serde(rename = "costBasis")]
2988 pub cost_basis: Option<String>,
2989 #[serde(rename = "exchangeRate")]
2991 pub exchange_rate: Option<f64>,
2992 pub nlv: Option<String>,
2994 #[serde(rename = "numInstrumentsOutsideRange")]
2996 pub num_instruments_outside_range: Option<i32>,
2997 #[serde(rename = "unrealizedPnL")]
2999 pub unrealized_pn_l: Option<String>,
3000}
3001#[serde_with::skip_serializing_none]
3002#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3003pub struct DetailRequestBody {
3004 #[serde(rename = "calcPnls")]
3006 pub calc_pnls: Option<bool>,
3007 pub model: Option<String>,
3009 #[serde(rename = "reqID")]
3012 pub req_id: Option<i32>,
3013}
3014#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3015pub struct DetailedContractInformation {
3016 #[serde(rename = "currencyType")]
3018 pub currency_type: Option<String>,
3019 pub id: Option<String>,
3021 pub included: Option<Vec<String>>,
3023 pub nd: Option<i32>,
3025 pub pm: Option<String>,
3027 pub rc: Option<i32>,
3029 pub view: Option<Vec<String>>,
3031 #[serde(flatten)]
3033 pub additional_properties: std::collections::HashMap<String, serde_json::Value>,
3034}
3035#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3036pub struct DisclaimerInfo {
3037 #[serde(rename = "DT")]
3039 pub dt: Option<String>,
3040 #[serde(rename = "FC")]
3042 pub fc: Option<String>,
3043}
3044#[serde_with::skip_serializing_none]
3045#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
3046#[serde(default)]
3047pub struct DwacInstruction {
3048 #[serde(rename = "accountId")]
3050 #[validate(length(min = 1u64, max = 32u64))]
3051 pub account_id: String,
3052 #[serde(rename = "accountTitle")]
3054 #[validate(length(min = 0u64, max = 140u64))]
3055 pub account_title: Option<String>,
3056 #[serde(rename = "clientInstructionId")]
3058 pub client_instruction_id: f64,
3059 #[serde(rename = "contraBrokerAccountId")]
3061 #[validate(length(min = 1u64, max = 20u64))]
3062 pub contra_broker_account_id: String,
3063 #[serde(rename = "contraBrokerTaxId")]
3065 #[validate(length(min = 1u64, max = 25u64))]
3066 pub contra_broker_tax_id: String,
3067 #[default("IN".to_string())]
3069 pub direction: String,
3070 pub quantity: f64,
3072 #[serde(rename = "referenceId")]
3074 #[validate(length(min = 0u64, max = 20u64))]
3075 pub reference_id: Option<String>,
3076 #[serde(rename = "tradingInstrument")]
3077 pub trading_instrument: TradingInstrument,
3078}
3079#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3080pub struct DynAccountSearchResponse {
3081 #[serde(rename = "matchedAccounts")]
3083 pub matched_accounts: Option<Vec<DynAccountSearchResponseMatchedAccount>>,
3084 pub pattern: Option<String>,
3086}
3087#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3088pub struct DynAccountSearchResponseMatchedAccount {
3089 #[serde(rename = "accountId")]
3091 pub account_id: Option<String>,
3092 pub alias: Option<String>,
3094 #[serde(rename = "allocationId")]
3096 pub allocation_id: Option<String>,
3097}
3098#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3099pub struct EchoResponse {
3100 #[serde(rename = "queryParameters")]
3102 pub query_parameters: Option<serde_json::Value>,
3103 #[serde(rename = "requestMethod")]
3105 pub request_method: EchoResponseRequestMethod,
3106 #[serde(rename = "securityPolicy")]
3108 pub security_policy: EchoResponseSecurityPolicy,
3109}
3110#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
3111pub enum EchoResponseRequestMethod {
3112 #[serde(rename = "GET")]
3113 #[default]
3114 Get,
3115 #[serde(rename = "POST")]
3116 Post,
3117 #[serde(rename = "PATCH")]
3118 Patch,
3119 #[serde(rename = "PUT")]
3120 Put,
3121}
3122impl core::fmt::Display for EchoResponseRequestMethod {
3123 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3124 match self {
3125 Self::Get => write!(f, "GET"),
3126 Self::Post => write!(f, "POST"),
3127 Self::Patch => write!(f, "PATCH"),
3128 Self::Put => write!(f, "PUT"),
3129 }
3130 }
3131}
3132#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
3133pub enum EchoResponseSecurityPolicy {
3134 #[serde(rename = "HTTPS")]
3135 #[default]
3136 Https,
3137 #[serde(rename = "SIGNED_JWT")]
3138 SignedJwt,
3139 #[serde(rename = "ENCRYPTED_JWE")]
3140 EncryptedJwe,
3141}
3142impl core::fmt::Display for EchoResponseSecurityPolicy {
3143 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3144 match self {
3145 Self::Https => write!(f, "HTTPS"),
3146 Self::SignedJwt => write!(f, "SIGNED_JWT"),
3147 Self::EncryptedJwe => write!(f, "ENCRYPTED_JWE"),
3148 }
3149 }
3150}
3151#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
3152pub struct EddaInstruction {
3153 #[serde(rename = "accountId")]
3155 #[validate(length(min = 1u64, max = 32u64))]
3156 pub account_id: String,
3157 #[serde(rename = "bankAccountNumber")]
3159 #[validate(length(min = 1u64, max = 32u64))]
3160 pub bank_account_number: String,
3161 #[serde(rename = "bankBranchCode")]
3163 #[validate(length(min = 1u64, max = 3u64))]
3164 pub bank_branch_code: String,
3165 #[serde(rename = "bankClearingCode")]
3167 #[validate(length(min = 1u64, max = 3u64))]
3168 pub bank_clearing_code: String,
3169 #[serde(rename = "bankInstructionName")]
3171 #[validate(length(min = 1u64, max = 100u64))]
3172 pub bank_instruction_name: String,
3173 #[serde(rename = "clientInstructionId")]
3175 pub client_instruction_id: f64,
3176 #[validate(length(min = 1u64, max = 3u64))]
3178 pub currency: String,
3179 #[serde(rename = "debtorIdentificationDocumentType")]
3181 pub debtor_identification_document_type: EddaInstructionDebtorIdentificationDocumentType,
3182}
3183#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
3184pub enum EddaInstructionDebtorIdentificationDocumentType {
3185 #[serde(rename = "hkId")]
3186 #[default]
3187 HkId,
3188 #[serde(rename = "passport")]
3189 Passport,
3190 #[serde(rename = "chinaId")]
3191 ChinaId,
3192 #[serde(rename = "hkMacaoEntryPermit")]
3193 HkMacaoEntryPermit,
3194}
3195impl core::fmt::Display for EddaInstructionDebtorIdentificationDocumentType {
3196 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3197 match self {
3198 Self::HkId => write!(f, "hkId"),
3199 Self::Passport => write!(f, "passport"),
3200 Self::ChinaId => write!(f, "chinaId"),
3201 Self::HkMacaoEntryPermit => write!(f, "hkMacaoEntryPermit"),
3202 }
3203 }
3204}
3205#[serde_with::skip_serializing_none]
3206#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3207pub struct EnabledRequestBody {
3208 pub enabled: Option<bool>,
3210}
3211#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3212pub struct EntityIRABene {
3213 #[serde(rename = "articleOfWill")]
3214 pub article_of_will: Option<String>,
3215 #[serde(rename = "entityType")]
3216 pub entity_type: Option<String>,
3217 pub location: Option<std::collections::HashMap<String, String>>,
3218 pub name: Option<String>,
3219 #[serde(rename = "type")]
3220 pub r#type: Option<String>,
3221}
3222#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3223pub struct EnumerationResponse {
3224 #[serde(rename = "enumerationsType")]
3225 pub enumerations_type: Option<String>,
3226 #[serde(rename = "formNumber")]
3227 pub form_number: Option<String>,
3228 #[serde(rename = "jsonData")]
3229 pub json_data: Option<serde_json::Value>,
3230}
3231#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
3233pub enum EnumerationType {
3234 #[serde(rename = "exchange-bundles")]
3235 #[default]
3236 ExchangeBundles,
3237 #[serde(rename = "business-and-occupation")]
3238 BusinessAndOccupation,
3239 #[serde(rename = "employee-track")]
3240 EmployeeTrack,
3241 #[serde(rename = "fin-info-ranges")]
3242 FinInfoRanges,
3243 #[serde(rename = "acats")]
3244 Acats,
3245 #[serde(rename = "aton")]
3246 Aton,
3247 #[serde(rename = "market-data")]
3248 MarketData,
3249 #[serde(rename = "edd-avt")]
3250 EddAvt,
3251 #[serde(rename = "prohibited-country")]
3252 ProhibitedCountry,
3253 #[serde(rename = "employee-plans")]
3254 EmployeePlans,
3255 #[serde(rename = "questionnaires")]
3256 Questionnaires,
3257 #[serde(rename = "security-questions")]
3258 SecurityQuestions,
3259 #[serde(rename = "quiz-questions")]
3260 QuizQuestions,
3261 #[serde(rename = "wire-instructions")]
3262 WireInstructions,
3263 #[serde(rename = "product-country-bundles")]
3264 ProductCountryBundles,
3265}
3266impl core::fmt::Display for EnumerationType {
3267 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3268 match self {
3269 Self::ExchangeBundles => write!(f, "exchange-bundles"),
3270 Self::BusinessAndOccupation => write!(f, "business-and-occupation"),
3271 Self::EmployeeTrack => write!(f, "employee-track"),
3272 Self::FinInfoRanges => write!(f, "fin-info-ranges"),
3273 Self::Acats => write!(f, "acats"),
3274 Self::Aton => write!(f, "aton"),
3275 Self::MarketData => write!(f, "market-data"),
3276 Self::EddAvt => write!(f, "edd-avt"),
3277 Self::ProhibitedCountry => write!(f, "prohibited-country"),
3278 Self::EmployeePlans => write!(f, "employee-plans"),
3279 Self::Questionnaires => write!(f, "questionnaires"),
3280 Self::SecurityQuestions => write!(f, "security-questions"),
3281 Self::QuizQuestions => write!(f, "quiz-questions"),
3282 Self::WireInstructions => write!(f, "wire-instructions"),
3283 Self::ProductCountryBundles => write!(f, "product-country-bundles"),
3284 }
3285 }
3286}
3287#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3288pub struct ErrorResponse {
3289 pub error: Option<Box<ErrorResponse>>,
3290 #[serde(rename = "errorDescription")]
3291 pub error_description: Option<String>,
3292 #[serde(rename = "hasError")]
3293 pub has_error: Option<bool>,
3294}
3295#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3296pub struct ExternalAssetTransfersBulkRequestBody {
3297 #[serde(rename = "instructionType")]
3298 pub instruction_type: TransferRequestBody2InstructionType,
3299 pub instructions: Vec<serde_json::Value>,
3300}
3301#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3302pub struct ExternalCashTransfersBulkRequestBody {
3303 #[serde(rename = "instructionType")]
3304 pub instruction_type: TransferRequestBody3InstructionType,
3305 pub instructions: Vec<serde_json::Value>,
3306}
3307#[serde_with::skip_serializing_none]
3308#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
3309#[serde(default)]
3310pub struct ExternalPositionTransfer {
3311 #[serde(rename = "accountAtBroker")]
3313 #[validate(length(min = 1u64, max = 34u64))]
3314 pub account_at_broker: String,
3315 #[serde(rename = "accountId")]
3317 #[validate(length(min = 1u64, max = 32u64))]
3318 pub account_id: String,
3319 #[serde(rename = "brokerId")]
3321 #[validate(length(min = 1u64, max = 20u64))]
3322 pub broker_id: String,
3323 #[serde(rename = "brokerName")]
3325 #[validate(length(min = 1u64, max = 256u64))]
3326 pub broker_name: String,
3327 #[serde(rename = "clientInstructionId")]
3329 pub client_instruction_id: f64,
3330 #[validate(length(min = 1u64, max = 140u64))]
3332 pub signature: String,
3333 #[serde(rename = "sourceIRAType")]
3335 pub source_iratype: Option<ExternalPositionTransferSourceIratype>,
3336 #[serde(rename = "subType")]
3338 pub sub_type: SubType,
3339 #[serde(rename = "type")]
3341 #[default("FULL".to_string())]
3342 pub r#type: String,
3343}
3344#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
3345pub enum ExternalPositionTransferSourceIratype {
3346 #[serde(rename = "RO")]
3347 #[default]
3348 Ro,
3349 #[serde(rename = "RI")]
3350 Ri,
3351 #[serde(rename = "RT")]
3352 Rt,
3353 #[serde(rename = "SP")]
3354 Sp,
3355 #[serde(rename = "ED")]
3356 Ed,
3357 #[serde(rename = "TH")]
3358 Th,
3359 #[serde(rename = "RH")]
3360 Rh,
3361 #[serde(rename = "SH")]
3362 Sh,
3363}
3364impl core::fmt::Display for ExternalPositionTransferSourceIratype {
3365 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3366 match self {
3367 Self::Ro => write!(f, "RO"),
3368 Self::Ri => write!(f, "RI"),
3369 Self::Rt => write!(f, "RT"),
3370 Self::Sp => write!(f, "SP"),
3371 Self::Ed => write!(f, "ED"),
3372 Self::Th => write!(f, "TH"),
3373 Self::Rh => write!(f, "RH"),
3374 Self::Sh => write!(f, "SH"),
3375 }
3376 }
3377}
3378#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3379pub struct FailedTickleResponse {
3380 pub error: Option<String>,
3382}
3383#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3384pub struct Features {
3385 pub symbol: Option<Vec<FeaturesSymbol>>,
3387}
3388#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3389pub struct FeaturesSymbol {
3390 pub conid: Option<i32>,
3392 #[serde(rename = "expirationDate")]
3394 pub expiration_date: Option<i32>,
3395 #[serde(rename = "longFuturesCutOff")]
3397 pub long_futures_cut_off: Option<i32>,
3398 pub ltd: Option<i32>,
3400 #[serde(rename = "shortFuturesCutOff")]
3402 pub short_futures_cut_off: Option<i32>,
3403 pub symbol: Option<String>,
3405 #[serde(rename = "underlyingConid")]
3407 pub underlying_conid: Option<i32>,
3408}
3409#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3410pub struct FileData {
3411 pub data: Option<serde_json::Value>,
3412 pub name: Option<String>,
3413}
3414#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3415pub struct FileDetailsResponse {
3416 #[serde(rename = "accountId")]
3417 pub account_id: Option<String>,
3418 #[serde(rename = "requestFileName")]
3419 pub request_file_name: Option<String>,
3420 #[serde(rename = "responseFileName")]
3421 pub response_file_name: Option<String>,
3422}
3423#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
3424pub struct FopInstruction {
3425 #[serde(rename = "accountId")]
3427 #[validate(length(min = 1u64, max = 32u64))]
3428 pub account_id: String,
3429 #[serde(rename = "clientInstructionId")]
3431 pub client_instruction_id: f64,
3432 #[serde(rename = "contraBrokerAccountId")]
3434 #[validate(length(min = 1u64, max = 20u64))]
3435 pub contra_broker_account_id: String,
3436 #[serde(rename = "contraBrokerDtcCode")]
3438 #[validate(length(min = 1u64, max = 20u64))]
3439 pub contra_broker_dtc_code: String,
3440 pub direction: InstructionDirection,
3442 pub quantity: f64,
3444 #[serde(rename = "tradingInstrument")]
3445 pub trading_instrument: TradingInstrument,
3446}
3447#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3448pub struct ForecastDetailsResponse {
3449 pub category: Option<String>,
3451 pub conid_no: Option<i32>,
3453 pub conid_yes: Option<i32>,
3455 pub exchange: Option<String>,
3457 pub expiration: Option<String>,
3459 pub logo_category: Option<String>,
3461 pub market_name: Option<String>,
3463 pub measured_period: Option<String>,
3465 pub payout: Option<f64>,
3467 pub question: Option<String>,
3469 pub side: Option<String>,
3471 pub strike: Option<f64>,
3473 pub strike_label: Option<String>,
3475 pub symbol: Option<String>,
3477 pub underlying_conid: Option<i32>,
3479}
3480#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3481pub struct ForecastMarketResponse {
3482 pub contracts: Option<Vec<ForecastMarketResponseContract>>,
3484 pub exchange: Option<String>,
3486 pub exclude_historical_data: Option<bool>,
3488 pub logo_category: Option<String>,
3490 pub market_name: Option<String>,
3492 pub payout: Option<f64>,
3494 pub symbol: Option<String>,
3496}
3497#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3498pub struct ForecastMarketResponseContract {
3499 pub conid: Option<i32>,
3501 pub expiration: Option<String>,
3503 pub expiry_label: Option<String>,
3505 pub side: Option<String>,
3507 pub strike: Option<f64>,
3509 pub strike_label: Option<String>,
3511 pub time_specifier: Option<String>,
3513 pub underlying_conid: Option<i32>,
3515}
3516#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3517pub struct ForecastRulesResponse {
3518 pub asset_class: Option<String>,
3520 pub data_and_resolution_link: Option<String>,
3522 pub description: Option<String>,
3524 pub exchange_timezone: Option<String>,
3526 pub last_trade_time: Option<i32>,
3528 pub market_name: Option<String>,
3530 pub market_rules_link: Option<String>,
3532 pub measured_period: Option<String>,
3534 pub payout: Option<String>,
3536 pub payout_time: Option<i32>,
3538 pub price_increment: Option<String>,
3540 pub product_code: Option<String>,
3542 pub release_time: Option<i32>,
3544 pub source_agency: Option<String>,
3546 pub threshold: Option<String>,
3548}
3549#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3550pub struct ForecastSchedulesResponse {
3551 pub timezone: Option<String>,
3553 pub trading_schedules: Option<Vec<ForecastSchedulesResponseTradingSchedule>>,
3555}
3556#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3557pub struct ForecastSchedulesResponseTradingSchedule {
3558 pub day_of_week: Option<String>,
3560 pub trading_times: Option<Vec<ForecastSchedulesResponseTradingScheduleTradingTime>>,
3562}
3563#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3564pub struct ForecastSchedulesResponseTradingScheduleTradingTime {
3565 pub close: Option<String>,
3567 pub open: Option<String>,
3569}
3570#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3571pub struct FormDetails {
3572 #[serde(rename = "acceptableDocs")]
3573 pub acceptable_docs: Option<Vec<String>>,
3574 pub action: Option<String>,
3575 #[serde(rename = "apiSupportedTask")]
3576 pub api_supported_task: Option<bool>,
3577 #[serde(rename = "dateModified")]
3578 pub date_modified: Option<chrono::DateTime<chrono::Utc>>,
3579 pub error: Option<Box<ErrorResponse>>,
3580 #[serde(rename = "errorDescription")]
3581 pub error_description: Option<String>,
3582 #[serde(rename = "fileLength")]
3583 pub file_length: Option<i64>,
3584 #[serde(rename = "fileName")]
3585 pub file_name: Option<String>,
3586 #[serde(rename = "formName")]
3587 pub form_name: Option<String>,
3588 #[serde(rename = "formNumber")]
3589 pub form_number: Option<i32>,
3590 #[serde(rename = "hasError")]
3591 pub has_error: Option<bool>,
3592 pub language: Option<String>,
3593 pub payload: Option<FormPayload>,
3594 pub questionnaire: Option<Vec<QuestionnaireResponse>>,
3595 #[serde(rename = "sha1Checksum")]
3596 pub sha1checksum: Option<String>,
3597 #[serde(rename = "type")]
3598 pub r#type: Option<String>,
3599}
3600#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3601pub struct FormFileResponse {
3602 pub error: Option<Box<ErrorResponse>>,
3603 #[serde(rename = "errorDescription")]
3604 pub error_description: Option<String>,
3605 #[serde(rename = "fileData")]
3606 pub file_data: Option<FileData>,
3607 #[serde(rename = "formDetails")]
3608 pub form_details: Option<Vec<FormDetails>>,
3609 #[serde(rename = "hasError")]
3610 pub has_error: Option<bool>,
3611 pub timestamp: Option<chrono::DateTime<chrono::Utc>>,
3612}
3613#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3614pub struct FormPayload {
3615 pub data: Option<String>,
3616 #[serde(rename = "mimeType")]
3617 pub mime_type: Option<String>,
3618}
3619#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3621pub struct Funds {
3622 #[serde(rename = "Lk Ahd Avlbl Fnds")]
3624 pub lk_ahd_avlbl_fnds: Option<String>,
3625 #[serde(rename = "Prdctd Pst-xpry Excss")]
3627 pub prdctd_pst_xpry_excss: Option<String>,
3628 pub current_available: Option<String>,
3630 pub current_excess: Option<String>,
3632 pub overnight_available: Option<String>,
3634 pub overnight_excess: Option<String>,
3638}
3639#[serde_with::skip_serializing_none]
3640#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3641pub struct FyiEnableDeviceOption {
3642 #[serde(rename = "deviceId")]
3643 pub device_id: Option<String>,
3644 #[serde(rename = "deviceName")]
3645 pub device_name: Option<String>,
3646 pub enabled: Option<bool>,
3648 #[serde(rename = "uiName")]
3649 pub ui_name: Option<String>,
3650}
3651pub type FyiSettings = Vec<FyiSettingsFyiSetting>;
3652#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3653pub struct FyiSettingsFyiSetting {
3654 #[serde(rename = "A")]
3656 pub a: Option<i32>,
3657 #[serde(rename = "FC")]
3659 pub fc: Option<String>,
3660 #[serde(rename = "FD")]
3662 pub fd: Option<String>,
3663 #[serde(rename = "FN")]
3665 pub r#fn: Option<String>,
3666 #[serde(rename = "H")]
3668 pub h: Option<i32>,
3669}
3670#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
3671pub struct FyiVT {
3672 #[serde(rename = "T")]
3674 pub t: Option<i32>,
3675 #[serde(rename = "V")]
3677 pub v: Option<i32>,
3678}
3679#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3681pub struct GenerateTokenRequest {
3682 pub body: TokenRequest,
3683}
3684impl GenerateTokenRequest {
3685 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GenerateTokenResponse> {
3687 let status = req.status();
3688 if status == http::StatusCode::OK {
3689 let data =
3690 oas3_gen_support::Diagnostics::<TokenResponse>::json_with_diagnostics(req).await?;
3691 return Ok(GenerateTokenResponse::Ok(data));
3692 }
3693 if status == http::StatusCode::BAD_REQUEST {
3694 let _ = req.bytes().await?;
3695 return Ok(GenerateTokenResponse::BadRequest);
3696 }
3697 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
3698 let _ = req.bytes().await?;
3699 return Ok(GenerateTokenResponse::InternalServerError);
3700 }
3701 let _ = req.bytes().await?;
3702 return Ok(GenerateTokenResponse::Unknown);
3703 }
3704}
3705#[derive(Debug, Clone)]
3707pub enum GenerateTokenResponse {
3708 Ok(TokenResponse),
3710 BadRequest,
3712 InternalServerError,
3714 Unknown,
3716}
3717#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3719pub struct GetAccountMarketSummaryRequest {
3720 #[validate(nested)]
3721 pub path: GetAccountMarketSummaryRequestPath,
3722}
3723impl GetAccountMarketSummaryRequest {
3724 pub async fn parse_response(
3726 req: reqwest::Response,
3727 ) -> anyhow::Result<GetAccountMarketSummaryResponse> {
3728 let status = req.status();
3729 if status == http::StatusCode::OK {
3730 let data =
3731 oas3_gen_support::Diagnostics::<SummaryMarketValueResponse>::json_with_diagnostics(
3732 req,
3733 )
3734 .await?;
3735 return Ok(GetAccountMarketSummaryResponse::Ok(data));
3736 }
3737 if status == http::StatusCode::BAD_REQUEST {
3738 let _ = req.bytes().await?;
3739 return Ok(GetAccountMarketSummaryResponse::BadRequest);
3740 }
3741 if status == http::StatusCode::UNAUTHORIZED {
3742 let _ = req.bytes().await?;
3743 return Ok(GetAccountMarketSummaryResponse::Unauthorized);
3744 }
3745 if status == http::StatusCode::SERVICE_UNAVAILABLE {
3746 let _ = req.bytes().await?;
3747 return Ok(GetAccountMarketSummaryResponse::ServiceUnavailable);
3748 }
3749 let _ = req.bytes().await?;
3750 return Ok(GetAccountMarketSummaryResponse::Unknown);
3751 }
3752}
3753#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
3754pub struct GetAccountMarketSummaryRequestPath {
3755 #[validate(length(min = 1u64))]
3758 pub account_id: String,
3759}
3760#[derive(Debug, Clone)]
3762pub enum GetAccountMarketSummaryResponse {
3763 Ok(SummaryMarketValueResponse),
3765 BadRequest,
3767 Unauthorized,
3769 ServiceUnavailable,
3772 Unknown,
3774}
3775#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3777pub struct GetAccountOwnersRequest {
3778 #[validate(nested)]
3779 pub path: GetAccountOwnersRequestPath,
3780}
3781impl GetAccountOwnersRequest {
3782 pub async fn parse_response(
3784 req: reqwest::Response,
3785 ) -> anyhow::Result<GetAccountOwnersResponse> {
3786 let status = req.status();
3787 if status == http::StatusCode::OK {
3788 let data =
3789 oas3_gen_support::Diagnostics::<SignatureAndOwners>::json_with_diagnostics(req)
3790 .await?;
3791 return Ok(GetAccountOwnersResponse::Ok(data));
3792 }
3793 if status == http::StatusCode::BAD_REQUEST {
3794 let _ = req.bytes().await?;
3795 return Ok(GetAccountOwnersResponse::BadRequest);
3796 }
3797 if status == http::StatusCode::UNAUTHORIZED {
3798 let _ = req.bytes().await?;
3799 return Ok(GetAccountOwnersResponse::Unauthorized);
3800 }
3801 if status == http::StatusCode::SERVICE_UNAVAILABLE {
3802 let _ = req.bytes().await?;
3803 return Ok(GetAccountOwnersResponse::ServiceUnavailable);
3804 }
3805 let _ = req.bytes().await?;
3806 return Ok(GetAccountOwnersResponse::Unknown);
3807 }
3808}
3809#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
3810pub struct GetAccountOwnersRequestPath {
3811 #[validate(length(min = 1u64))]
3813 pub account_id: String,
3814}
3815#[derive(Debug, Clone)]
3817pub enum GetAccountOwnersResponse {
3818 Ok(SignatureAndOwners),
3820 BadRequest,
3822 Unauthorized,
3824 ServiceUnavailable,
3827 Unknown,
3829}
3830#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3832pub struct GetAccountSummaryRequest {
3833 #[validate(nested)]
3834 pub path: GetAccountSummaryRequestPath,
3835}
3836impl GetAccountSummaryRequest {
3837 pub async fn parse_response(
3839 req: reqwest::Response,
3840 ) -> anyhow::Result<GetAccountSummaryResponse> {
3841 let status = req.status();
3842 if status == http::StatusCode::OK {
3843 let data =
3844 oas3_gen_support::Diagnostics::<AccountSummaryResponse>::json_with_diagnostics(req)
3845 .await?;
3846 return Ok(GetAccountSummaryResponse::Ok(data));
3847 }
3848 if status == http::StatusCode::BAD_REQUEST {
3849 let _ = req.bytes().await?;
3850 return Ok(GetAccountSummaryResponse::BadRequest);
3851 }
3852 if status == http::StatusCode::UNAUTHORIZED {
3853 let _ = req.bytes().await?;
3854 return Ok(GetAccountSummaryResponse::Unauthorized);
3855 }
3856 if status == http::StatusCode::SERVICE_UNAVAILABLE {
3857 let _ = req.bytes().await?;
3858 return Ok(GetAccountSummaryResponse::ServiceUnavailable);
3859 }
3860 let _ = req.bytes().await?;
3861 return Ok(GetAccountSummaryResponse::Unknown);
3862 }
3863}
3864#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
3865pub struct GetAccountSummaryRequestPath {
3866 #[validate(length(min = 1u64))]
3869 pub account_id: String,
3870}
3871#[derive(Debug, Clone)]
3873pub enum GetAccountSummaryResponse {
3874 Ok(AccountSummaryResponse),
3876 BadRequest,
3878 Unauthorized,
3880 ServiceUnavailable,
3883 Unknown,
3885}
3886#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3888pub struct GetAccountsInModelRequest {
3889 pub body: DetailRequestBody,
3890}
3891impl GetAccountsInModelRequest {
3892 pub async fn parse_response(
3894 req: reqwest::Response,
3895 ) -> anyhow::Result<GetAccountsInModelResponse> {
3896 let status = req.status();
3897 if status == http::StatusCode::OK {
3898 let data =
3899 oas3_gen_support::Diagnostics::<Detail200Response>::json_with_diagnostics(req)
3900 .await?;
3901 return Ok(GetAccountsInModelResponse::Ok(data));
3902 }
3903 if status == http::StatusCode::UNAUTHORIZED {
3904 let _ = req.bytes().await?;
3905 return Ok(GetAccountsInModelResponse::Unauthorized);
3906 }
3907 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
3908 let _ = req.bytes().await?;
3909 return Ok(GetAccountsInModelResponse::InternalServerError);
3910 }
3911 if status == http::StatusCode::SERVICE_UNAVAILABLE {
3912 let _ = req.bytes().await?;
3913 return Ok(GetAccountsInModelResponse::ServiceUnavailable);
3914 }
3915 let _ = req.bytes().await?;
3916 return Ok(GetAccountsInModelResponse::Unknown);
3917 }
3918}
3919#[derive(Debug, Clone)]
3921pub enum GetAccountsInModelResponse {
3922 Ok(Detail200Response),
3924 Unauthorized,
3926 InternalServerError,
3929 ServiceUnavailable,
3932 Unknown,
3934}
3935#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
3937pub struct GetAlertDetailsRequest {
3938 pub path: GetAlertDetailsRequestPath,
3939 pub query: GetAlertDetailsRequestQuery,
3940}
3941impl GetAlertDetailsRequest {
3942 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetAlertDetailsResponse> {
3944 let status = req.status();
3945 if status == http::StatusCode::OK {
3946 let data =
3947 oas3_gen_support::Diagnostics::<AlertDetails>::json_with_diagnostics(req).await?;
3948 return Ok(GetAlertDetailsResponse::Ok(data));
3949 }
3950 if status == http::StatusCode::BAD_REQUEST {
3951 let _ = req.bytes().await?;
3952 return Ok(GetAlertDetailsResponse::BadRequest);
3953 }
3954 if status == http::StatusCode::UNAUTHORIZED {
3955 let _ = req.bytes().await?;
3956 return Ok(GetAlertDetailsResponse::Unauthorized);
3957 }
3958 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
3959 let _ = req.bytes().await?;
3960 return Ok(GetAlertDetailsResponse::InternalServerError);
3961 }
3962 if status == http::StatusCode::SERVICE_UNAVAILABLE {
3963 let _ = req.bytes().await?;
3964 return Ok(GetAlertDetailsResponse::ServiceUnavailable);
3965 }
3966 let _ = req.bytes().await?;
3967 return Ok(GetAlertDetailsResponse::Unknown);
3968 }
3969}
3970#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
3971pub struct GetAlertDetailsRequestPath {
3972 pub alert_id: i64,
3974}
3975#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
3976pub struct GetAlertDetailsRequestQuery {
3977 #[serde(rename = "type")]
3979 #[default("Q".to_string())]
3980 pub r#type: String,
3981}
3982#[derive(Debug, Clone)]
3984pub enum GetAlertDetailsResponse {
3985 Ok(AlertDetails),
3987 BadRequest,
3989 Unauthorized,
3991 InternalServerError,
3993 ServiceUnavailable,
3996 Unknown,
3998}
3999#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4001pub struct GetAlgosByInstrumentRequest {
4002 #[validate(nested)]
4003 pub path: GetAlgosByInstrumentRequestPath,
4004 pub query: GetAlgosByInstrumentRequestQuery,
4005}
4006impl GetAlgosByInstrumentRequest {
4007 pub async fn parse_response(
4009 req: reqwest::Response,
4010 ) -> anyhow::Result<GetAlgosByInstrumentResponse> {
4011 let status = req.status();
4012 if status == http::StatusCode::OK {
4013 let data =
4014 oas3_gen_support::Diagnostics::<AlgosResponse>::json_with_diagnostics(req).await?;
4015 return Ok(GetAlgosByInstrumentResponse::Ok(data));
4016 }
4017 if status == http::StatusCode::UNAUTHORIZED {
4018 let _ = req.bytes().await?;
4019 return Ok(GetAlgosByInstrumentResponse::Unauthorized);
4020 }
4021 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4022 let _ = req.bytes().await?;
4023 return Ok(GetAlgosByInstrumentResponse::InternalServerError);
4024 }
4025 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4026 let _ = req.bytes().await?;
4027 return Ok(GetAlgosByInstrumentResponse::ServiceUnavailable);
4028 }
4029 let _ = req.bytes().await?;
4030 return Ok(GetAlgosByInstrumentResponse::Unknown);
4031 }
4032}
4033#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
4034pub struct GetAlgosByInstrumentRequestPath {
4035 #[validate(length(min = 1u64))]
4037 pub conid: String,
4038}
4039#[serde_with::skip_serializing_none]
4040#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
4041pub struct GetAlgosByInstrumentRequestQuery {
4042 pub algos: Option<GetAlgosByInstrumentRequestQueryAlgos>,
4044 #[serde(rename = "addDescription")]
4046 #[default(Some(Default::default()))]
4047 pub add_description: Option<AlertActivationRequestAlertActive>,
4048 #[serde(rename = "addParams")]
4050 #[default(Some(Default::default()))]
4051 pub add_params: Option<AlertActivationRequestAlertActive>,
4052}
4053#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
4055pub enum GetAlgosByInstrumentRequestQueryAlgos {
4056 #[default]
4057 Adaptive,
4058 Vwap,
4059}
4060impl core::fmt::Display for GetAlgosByInstrumentRequestQueryAlgos {
4061 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4062 match self {
4063 Self::Adaptive => write!(f, "Adaptive"),
4064 Self::Vwap => write!(f, "Vwap"),
4065 }
4066 }
4067}
4068#[derive(Debug, Clone)]
4070pub enum GetAlgosByInstrumentResponse {
4071 Ok(AlgosResponse),
4073 Unauthorized,
4075 InternalServerError,
4078 ServiceUnavailable,
4081 Unknown,
4083}
4084#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4086pub struct GetAllAccountsForConidRequest {
4087 pub path: GetAllAccountsForConidRequestPath,
4088}
4089impl GetAllAccountsForConidRequest {
4090 pub async fn parse_response(
4092 req: reqwest::Response,
4093 ) -> anyhow::Result<GetAllAccountsForConidResponse> {
4094 let status = req.status();
4095 if status == http::StatusCode::OK {
4096 let data =
4097 oas3_gen_support::Diagnostics::<Position200Response>::json_with_diagnostics(req)
4098 .await?;
4099 return Ok(GetAllAccountsForConidResponse::Ok(data));
4100 }
4101 if status == http::StatusCode::BAD_REQUEST {
4102 let _ = req.bytes().await?;
4103 return Ok(GetAllAccountsForConidResponse::BadRequest);
4104 }
4105 if status == http::StatusCode::UNAUTHORIZED {
4106 let _ = req.bytes().await?;
4107 return Ok(GetAllAccountsForConidResponse::Unauthorized);
4108 }
4109 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4110 let _ = req.bytes().await?;
4111 return Ok(GetAllAccountsForConidResponse::InternalServerError);
4112 }
4113 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4114 let _ = req.bytes().await?;
4115 return Ok(GetAllAccountsForConidResponse::ServiceUnavailable);
4116 }
4117 let _ = req.bytes().await?;
4118 return Ok(GetAllAccountsForConidResponse::Unknown);
4119 }
4120}
4121#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
4122pub struct GetAllAccountsForConidRequestPath {
4123 pub conid: i32,
4126}
4127#[derive(Debug, Clone)]
4129pub enum GetAllAccountsForConidResponse {
4130 Ok(Position200Response),
4132 BadRequest,
4134 Unauthorized,
4136 InternalServerError,
4139 ServiceUnavailable,
4142 Unknown,
4144}
4145#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4147pub struct GetAllAccountsRequest {}
4148impl GetAllAccountsRequest {
4149 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetAllAccountsResponse> {
4151 let status = req.status();
4152 if status == http::StatusCode::OK {
4153 let data =
4154 oas3_gen_support::Diagnostics::<Account200Response2>::json_with_diagnostics(req)
4155 .await?;
4156 return Ok(GetAllAccountsResponse::Ok(data));
4157 }
4158 if status == http::StatusCode::UNAUTHORIZED {
4159 let _ = req.bytes().await?;
4160 return Ok(GetAllAccountsResponse::Unauthorized);
4161 }
4162 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4163 let _ = req.bytes().await?;
4164 return Ok(GetAllAccountsResponse::InternalServerError);
4165 }
4166 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4167 let _ = req.bytes().await?;
4168 return Ok(GetAllAccountsResponse::ServiceUnavailable);
4169 }
4170 let _ = req.bytes().await?;
4171 return Ok(GetAllAccountsResponse::Unknown);
4172 }
4173}
4174#[derive(Debug, Clone)]
4176pub enum GetAllAccountsResponse {
4177 Ok(Account200Response2),
4179 Unauthorized,
4181 InternalServerError,
4184 ServiceUnavailable,
4187 Unknown,
4189}
4190#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4192pub struct GetAllAlertsRequest {
4193 #[validate(nested)]
4194 pub path: GetAllAlertsRequestPath,
4195}
4196impl GetAllAlertsRequest {
4197 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetAllAlertsResponse> {
4199 let status = req.status();
4200 if status == http::StatusCode::OK {
4201 let data = oas3_gen_support::Diagnostics::<Alerts>::json_with_diagnostics(req).await?;
4202 return Ok(GetAllAlertsResponse::Ok(data));
4203 }
4204 if status == http::StatusCode::UNAUTHORIZED {
4205 let _ = req.bytes().await?;
4206 return Ok(GetAllAlertsResponse::Unauthorized);
4207 }
4208 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4209 let _ = req.bytes().await?;
4210 return Ok(GetAllAlertsResponse::ServiceUnavailable);
4211 }
4212 let _ = req.bytes().await?;
4213 return Ok(GetAllAlertsResponse::Unknown);
4214 }
4215}
4216#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
4217pub struct GetAllAlertsRequestPath {
4218 #[validate(length(min = 1u64))]
4221 pub account_id: String,
4222}
4223#[derive(Debug, Clone)]
4225pub enum GetAllAlertsResponse {
4226 Ok(Alerts),
4228 Unauthorized,
4230 ServiceUnavailable,
4233 Unknown,
4235}
4236#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4238pub struct GetAllFyisRequest {
4239 pub query: GetAllFyisRequestQuery,
4240}
4241impl GetAllFyisRequest {
4242 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetAllFyisResponse> {
4244 let status = req.status();
4245 if status == http::StatusCode::OK {
4246 let data =
4247 oas3_gen_support::Diagnostics::<Notifications>::json_with_diagnostics(req).await?;
4248 return Ok(GetAllFyisResponse::Ok(data));
4249 }
4250 if status == http::StatusCode::BAD_REQUEST {
4251 let _ = req.bytes().await?;
4252 return Ok(GetAllFyisResponse::BadRequest);
4253 }
4254 if status == http::StatusCode::UNAUTHORIZED {
4255 let _ = req.bytes().await?;
4256 return Ok(GetAllFyisResponse::Unauthorized);
4257 }
4258 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4259 let _ = req.bytes().await?;
4260 return Ok(GetAllFyisResponse::InternalServerError);
4261 }
4262 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4263 let _ = req.bytes().await?;
4264 return Ok(GetAllFyisResponse::ServiceUnavailable);
4265 }
4266 let _ = req.bytes().await?;
4267 return Ok(GetAllFyisResponse::Unknown);
4268 }
4269}
4270#[serde_with::skip_serializing_none]
4271#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
4272pub struct GetAllFyisRequestQuery {
4273 pub max: i32,
4276 pub include: Option<serde_json::Value>,
4278 pub exclude: Option<serde_json::Value>,
4280 pub id: Option<serde_json::Value>,
4282}
4283#[derive(Debug, Clone)]
4285pub enum GetAllFyisResponse {
4286 Ok(Notifications),
4288 BadRequest,
4290 Unauthorized,
4292 InternalServerError,
4295 ServiceUnavailable,
4298 Unknown,
4300}
4301#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4303pub struct GetAllModelPositionsRequest {
4304 pub body: PositionRequestBody2,
4305}
4306impl GetAllModelPositionsRequest {
4307 pub async fn parse_response(
4309 req: reqwest::Response,
4310 ) -> anyhow::Result<GetAllModelPositionsResponse> {
4311 let status = req.status();
4312 if status == http::StatusCode::OK {
4313 let data =
4314 oas3_gen_support::Diagnostics::<ModelPositionResponse>::json_with_diagnostics(req)
4315 .await?;
4316 return Ok(GetAllModelPositionsResponse::Ok(data));
4317 }
4318 if status == http::StatusCode::UNAUTHORIZED {
4319 let _ = req.bytes().await?;
4320 return Ok(GetAllModelPositionsResponse::Unauthorized);
4321 }
4322 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4323 let _ = req.bytes().await?;
4324 return Ok(GetAllModelPositionsResponse::InternalServerError);
4325 }
4326 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4327 let _ = req.bytes().await?;
4328 return Ok(GetAllModelPositionsResponse::ServiceUnavailable);
4329 }
4330 let _ = req.bytes().await?;
4331 return Ok(GetAllModelPositionsResponse::Unknown);
4332 }
4333}
4334#[derive(Debug, Clone)]
4336pub enum GetAllModelPositionsResponse {
4337 Ok(ModelPositionResponse),
4339 Unauthorized,
4341 InternalServerError,
4344 ServiceUnavailable,
4347 Unknown,
4349}
4350#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4352pub struct GetAllSubaccountsRequest {}
4353impl GetAllSubaccountsRequest {
4354 pub async fn parse_response(
4356 req: reqwest::Response,
4357 ) -> anyhow::Result<GetAllSubaccountsResponse> {
4358 let status = req.status();
4359 if status == http::StatusCode::OK {
4360 let data =
4361 oas3_gen_support::Diagnostics::<Subaccount200Response>::json_with_diagnostics(req)
4362 .await?;
4363 return Ok(GetAllSubaccountsResponse::Ok(data));
4364 }
4365 if status == http::StatusCode::UNAUTHORIZED {
4366 let _ = req.bytes().await?;
4367 return Ok(GetAllSubaccountsResponse::Unauthorized);
4368 }
4369 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4370 let _ = req.bytes().await?;
4371 return Ok(GetAllSubaccountsResponse::InternalServerError);
4372 }
4373 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4374 let _ = req.bytes().await?;
4375 return Ok(GetAllSubaccountsResponse::ServiceUnavailable);
4376 }
4377 let _ = req.bytes().await?;
4378 return Ok(GetAllSubaccountsResponse::Unknown);
4379 }
4380}
4381#[derive(Debug, Clone)]
4383pub enum GetAllSubaccountsResponse {
4384 Ok(Subaccount200Response),
4386 Unauthorized,
4388 InternalServerError,
4391 ServiceUnavailable,
4394 Unknown,
4396}
4397#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4399pub struct GetAllWatchlistsRequest {
4400 pub query: GetAllWatchlistsRequestQuery,
4401}
4402impl GetAllWatchlistsRequest {
4403 pub async fn parse_response(
4405 req: reqwest::Response,
4406 ) -> anyhow::Result<GetAllWatchlistsResponse> {
4407 let status = req.status();
4408 if status == http::StatusCode::OK {
4409 let data =
4410 oas3_gen_support::Diagnostics::<WatchlistsResponse>::json_with_diagnostics(req)
4411 .await?;
4412 return Ok(GetAllWatchlistsResponse::Ok(data));
4413 }
4414 if status == http::StatusCode::UNAUTHORIZED {
4415 let _ = req.bytes().await?;
4416 return Ok(GetAllWatchlistsResponse::Unauthorized);
4417 }
4418 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4419 let _ = req.bytes().await?;
4420 return Ok(GetAllWatchlistsResponse::InternalServerError);
4421 }
4422 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4423 let _ = req.bytes().await?;
4424 return Ok(GetAllWatchlistsResponse::ServiceUnavailable);
4425 }
4426 let _ = req.bytes().await?;
4427 return Ok(GetAllWatchlistsResponse::Unknown);
4428 }
4429}
4430#[serde_with::skip_serializing_none]
4431#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
4432pub struct GetAllWatchlistsRequestQuery {
4433 #[serde(rename = "SC")]
4436 #[default(Some("USER_WATCHLIST".to_string()))]
4437 pub sc: Option<String>,
4438}
4439#[derive(Debug, Clone)]
4441pub enum GetAllWatchlistsResponse {
4442 Ok(WatchlistsResponse),
4444 Unauthorized,
4446 InternalServerError,
4449 ServiceUnavailable,
4452 Unknown,
4454}
4455#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4457pub struct GetAllmodelsRequest {
4458 pub body: ReqIDRequestBody,
4459}
4460impl GetAllmodelsRequest {
4461 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetAllmodelsResponse> {
4463 let status = req.status();
4464 if status == http::StatusCode::OK {
4465 let data =
4466 oas3_gen_support::Diagnostics::<ModelListResponse>::json_with_diagnostics(req)
4467 .await?;
4468 return Ok(GetAllmodelsResponse::Ok(data));
4469 }
4470 if status == http::StatusCode::UNAUTHORIZED {
4471 let _ = req.bytes().await?;
4472 return Ok(GetAllmodelsResponse::Unauthorized);
4473 }
4474 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4475 let _ = req.bytes().await?;
4476 return Ok(GetAllmodelsResponse::InternalServerError);
4477 }
4478 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4479 let _ = req.bytes().await?;
4480 return Ok(GetAllmodelsResponse::ServiceUnavailable);
4481 }
4482 let _ = req.bytes().await?;
4483 return Ok(GetAllmodelsResponse::Unknown);
4484 }
4485}
4486#[derive(Debug, Clone)]
4488pub enum GetAllmodelsResponse {
4489 Ok(ModelListResponse),
4491 Unauthorized,
4493 InternalServerError,
4496 ServiceUnavailable,
4499 Unknown,
4501}
4502#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4504pub struct GetAllocatableSubaccountsRequest {}
4505impl GetAllocatableSubaccountsRequest {
4506 pub async fn parse_response(
4508 req: reqwest::Response,
4509 ) -> anyhow::Result<GetAllocatableSubaccountsResponse> {
4510 let status = req.status();
4511 if status == http::StatusCode::OK {
4512 let data =
4513 oas3_gen_support::Diagnostics::<SubAccounts>::json_with_diagnostics(req).await?;
4514 return Ok(GetAllocatableSubaccountsResponse::Ok(data));
4515 }
4516 if status == http::StatusCode::UNAUTHORIZED {
4517 let _ = req.bytes().await?;
4518 return Ok(GetAllocatableSubaccountsResponse::Unauthorized);
4519 }
4520 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4521 let _ = req.bytes().await?;
4522 return Ok(GetAllocatableSubaccountsResponse::InternalServerError);
4523 }
4524 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4525 let _ = req.bytes().await?;
4526 return Ok(GetAllocatableSubaccountsResponse::ServiceUnavailable);
4527 }
4528 let _ = req.bytes().await?;
4529 return Ok(GetAllocatableSubaccountsResponse::Unknown);
4530 }
4531}
4532#[derive(Debug, Clone)]
4534pub enum GetAllocatableSubaccountsResponse {
4535 Ok(SubAccounts),
4537 Unauthorized,
4539 InternalServerError,
4542 ServiceUnavailable,
4545 Unknown,
4547}
4548#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4550pub struct GetAllocationGroupsRequest {}
4551impl GetAllocationGroupsRequest {
4552 pub async fn parse_response(
4554 req: reqwest::Response,
4555 ) -> anyhow::Result<GetAllocationGroupsResponse> {
4556 let status = req.status();
4557 if status == http::StatusCode::OK {
4558 let data =
4559 oas3_gen_support::Diagnostics::<AllocationGroups>::json_with_diagnostics(req)
4560 .await?;
4561 return Ok(GetAllocationGroupsResponse::Ok(data));
4562 }
4563 if status == http::StatusCode::UNAUTHORIZED {
4564 let _ = req.bytes().await?;
4565 return Ok(GetAllocationGroupsResponse::Unauthorized);
4566 }
4567 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4568 let _ = req.bytes().await?;
4569 return Ok(GetAllocationGroupsResponse::InternalServerError);
4570 }
4571 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4572 let _ = req.bytes().await?;
4573 return Ok(GetAllocationGroupsResponse::ServiceUnavailable);
4574 }
4575 let _ = req.bytes().await?;
4576 return Ok(GetAllocationGroupsResponse::Unknown);
4577 }
4578}
4579#[derive(Debug, Clone)]
4581pub enum GetAllocationGroupsResponse {
4582 Ok(AllocationGroups),
4584 Unauthorized,
4586 InternalServerError,
4589 ServiceUnavailable,
4592 Unknown,
4594}
4595#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4597pub struct GetAllocationPresetsRequest {}
4598impl GetAllocationPresetsRequest {
4599 pub async fn parse_response(
4601 req: reqwest::Response,
4602 ) -> anyhow::Result<GetAllocationPresetsResponse> {
4603 let status = req.status();
4604 if status == http::StatusCode::OK {
4605 let data = oas3_gen_support::Diagnostics::<Presets>::json_with_diagnostics(req).await?;
4606 return Ok(GetAllocationPresetsResponse::Ok(data));
4607 }
4608 if status == http::StatusCode::UNAUTHORIZED {
4609 let _ = req.bytes().await?;
4610 return Ok(GetAllocationPresetsResponse::Unauthorized);
4611 }
4612 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4613 let _ = req.bytes().await?;
4614 return Ok(GetAllocationPresetsResponse::InternalServerError);
4615 }
4616 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4617 let _ = req.bytes().await?;
4618 return Ok(GetAllocationPresetsResponse::ServiceUnavailable);
4619 }
4620 let _ = req.bytes().await?;
4621 return Ok(GetAllocationPresetsResponse::Unknown);
4622 }
4623}
4624#[derive(Debug, Clone)]
4626pub enum GetAllocationPresetsResponse {
4627 Ok(Presets),
4629 Unauthorized,
4631 InternalServerError,
4634 ServiceUnavailable,
4637 Unknown,
4639}
4640#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4642pub struct GetAssetAllocationRequest {
4643 #[validate(nested)]
4644 pub path: GetAssetAllocationRequestPath,
4645 pub query: GetAssetAllocationRequestQuery,
4646}
4647impl GetAssetAllocationRequest {
4648 pub async fn parse_response(
4650 req: reqwest::Response,
4651 ) -> anyhow::Result<GetAssetAllocationResponse> {
4652 let status = req.status();
4653 if status == http::StatusCode::OK {
4654 let data =
4655 oas3_gen_support::Diagnostics::<PortfolioAllocations>::json_with_diagnostics(req)
4656 .await?;
4657 return Ok(GetAssetAllocationResponse::Ok(data));
4658 }
4659 if status == http::StatusCode::BAD_REQUEST {
4660 let _ = req.bytes().await?;
4661 return Ok(GetAssetAllocationResponse::BadRequest);
4662 }
4663 if status == http::StatusCode::UNAUTHORIZED {
4664 let _ = req.bytes().await?;
4665 return Ok(GetAssetAllocationResponse::Unauthorized);
4666 }
4667 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4668 let _ = req.bytes().await?;
4669 return Ok(GetAssetAllocationResponse::InternalServerError);
4670 }
4671 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4672 let _ = req.bytes().await?;
4673 return Ok(GetAssetAllocationResponse::ServiceUnavailable);
4674 }
4675 let _ = req.bytes().await?;
4676 return Ok(GetAssetAllocationResponse::Unknown);
4677 }
4678}
4679#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
4680pub struct GetAssetAllocationRequestPath {
4681 #[validate(length(min = 1u64))]
4683 pub account_id: String,
4684}
4685#[serde_with::skip_serializing_none]
4686#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
4687pub struct GetAssetAllocationRequestQuery {
4688 pub model: Option<serde_json::Value>,
4690}
4691#[derive(Debug, Clone)]
4693pub enum GetAssetAllocationResponse {
4694 Ok(PortfolioAllocations),
4696 BadRequest,
4698 Unauthorized,
4700 InternalServerError,
4703 ServiceUnavailable,
4706 Unknown,
4708}
4709#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
4710pub struct GetAvailableStmtDatesResponse {
4711 pub data: Option<AvailableStatementDatesData>,
4712}
4713#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
4714pub struct GetAvailableTaxFormsResponse {
4715 pub data: Option<AvailableTaxFormsData>,
4716}
4717#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
4718pub struct GetAvailableTradeConfirmationDatesResponse {
4719 pub data: Option<GetAvailableTradeConfirmationDatesResponseData>,
4720}
4721#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
4722pub struct GetAvailableTradeConfirmationDatesResponseData {
4723 #[serde(rename = "dataType")]
4725 pub data_type: Option<String>,
4726 pub value: Option<Vec<String>>,
4728}
4729#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4731pub struct GetBalanceSummaryRequest {
4732 #[validate(nested)]
4733 pub path: GetBalanceSummaryRequestPath,
4734}
4735impl GetBalanceSummaryRequest {
4736 pub async fn parse_response(
4738 req: reqwest::Response,
4739 ) -> anyhow::Result<GetBalanceSummaryResponse> {
4740 let status = req.status();
4741 if status == http::StatusCode::OK {
4742 let data = oas3_gen_support::Diagnostics::<
4743 SummaryOfAccountBalancesResponse,
4744 >::json_with_diagnostics(req)
4745 .await?;
4746 return Ok(GetBalanceSummaryResponse::Ok(data));
4747 }
4748 if status == http::StatusCode::BAD_REQUEST {
4749 let _ = req.bytes().await?;
4750 return Ok(GetBalanceSummaryResponse::BadRequest);
4751 }
4752 if status == http::StatusCode::UNAUTHORIZED {
4753 let _ = req.bytes().await?;
4754 return Ok(GetBalanceSummaryResponse::Unauthorized);
4755 }
4756 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4757 let _ = req.bytes().await?;
4758 return Ok(GetBalanceSummaryResponse::ServiceUnavailable);
4759 }
4760 let _ = req.bytes().await?;
4761 return Ok(GetBalanceSummaryResponse::Unknown);
4762 }
4763}
4764#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
4765pub struct GetBalanceSummaryRequestPath {
4766 #[validate(length(min = 1u64))]
4769 pub account_id: String,
4770}
4771#[derive(Debug, Clone)]
4773pub enum GetBalanceSummaryResponse {
4774 Ok(SummaryOfAccountBalancesResponse),
4776 BadRequest,
4778 Unauthorized,
4780 ServiceUnavailable,
4783 Unknown,
4785}
4786#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4788pub struct GetBondFiltersRequest {
4789 #[validate(nested)]
4790 pub query: GetBondFiltersRequestQuery,
4791}
4792impl GetBondFiltersRequest {
4793 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetBondFiltersResponse> {
4795 let status = req.status();
4796 if status == http::StatusCode::OK {
4797 let data =
4798 oas3_gen_support::Diagnostics::<BondFiltersResponse>::json_with_diagnostics(req)
4799 .await?;
4800 return Ok(GetBondFiltersResponse::Ok(data));
4801 }
4802 if status == http::StatusCode::UNAUTHORIZED {
4803 let _ = req.bytes().await?;
4804 return Ok(GetBondFiltersResponse::Unauthorized);
4805 }
4806 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4807 let _ = req.bytes().await?;
4808 return Ok(GetBondFiltersResponse::InternalServerError);
4809 }
4810 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4811 let _ = req.bytes().await?;
4812 return Ok(GetBondFiltersResponse::ServiceUnavailable);
4813 }
4814 let _ = req.bytes().await?;
4815 return Ok(GetBondFiltersResponse::Unknown);
4816 }
4817}
4818#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
4819pub struct GetBondFiltersRequestQuery {
4820 #[validate(length(min = 1u64))]
4823 pub symbol: String,
4824 #[serde(rename = "issuerId")]
4827 #[validate(length(min = 1u64))]
4828 pub issuer_id: String,
4829}
4830#[derive(Debug, Clone)]
4832pub enum GetBondFiltersResponse {
4833 Ok(BondFiltersResponse),
4835 Unauthorized,
4837 InternalServerError,
4840 ServiceUnavailable,
4843 Unknown,
4845}
4846#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
4847pub struct GetBrokerListResponse {
4848 pub brokers: Vec<String>,
4849 #[serde(rename = "instructionType")]
4851 pub instruction_type: String,
4852}
4853#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4855pub struct GetBrokerageAccountsRequest {}
4856impl GetBrokerageAccountsRequest {
4857 pub async fn parse_response(
4859 req: reqwest::Response,
4860 ) -> anyhow::Result<GetBrokerageAccountsResponse> {
4861 let status = req.status();
4862 if status == http::StatusCode::OK {
4863 let data =
4864 oas3_gen_support::Diagnostics::<UserAccountsResponse>::json_with_diagnostics(req)
4865 .await?;
4866 return Ok(GetBrokerageAccountsResponse::Ok(data));
4867 }
4868 if status == http::StatusCode::UNAUTHORIZED {
4869 let _ = req.bytes().await?;
4870 return Ok(GetBrokerageAccountsResponse::Unauthorized);
4871 }
4872 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4873 let _ = req.bytes().await?;
4874 return Ok(GetBrokerageAccountsResponse::ServiceUnavailable);
4875 }
4876 let _ = req.bytes().await?;
4877 return Ok(GetBrokerageAccountsResponse::Unknown);
4878 }
4879}
4880#[derive(Debug, Clone)]
4882pub enum GetBrokerageAccountsResponse {
4883 Ok(UserAccountsResponse),
4885 Unauthorized,
4887 ServiceUnavailable,
4890 Unknown,
4892}
4893#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4895pub struct GetBrokerageStatusRequest {}
4896impl GetBrokerageStatusRequest {
4897 pub async fn parse_response(
4899 req: reqwest::Response,
4900 ) -> anyhow::Result<GetBrokerageStatusResponse> {
4901 let status = req.status();
4902 if status == http::StatusCode::OK {
4903 let data =
4904 oas3_gen_support::Diagnostics::<BrokerageSessionStatus>::json_with_diagnostics(req)
4905 .await?;
4906 return Ok(GetBrokerageStatusResponse::Ok(data));
4907 }
4908 if status == http::StatusCode::UNAUTHORIZED {
4909 let _ = req.bytes().await?;
4910 return Ok(GetBrokerageStatusResponse::Unauthorized);
4911 }
4912 let _ = req.bytes().await?;
4913 return Ok(GetBrokerageStatusResponse::Unknown);
4914 }
4915}
4916#[derive(Debug, Clone)]
4918pub enum GetBrokerageStatusResponse {
4919 Ok(BrokerageSessionStatus),
4921 Unauthorized,
4923 Unknown,
4925}
4926#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4928pub struct GetComboPositionsRequest {
4929 #[validate(nested)]
4930 pub path: GetComboPositionsRequestPath,
4931 pub query: GetComboPositionsRequestQuery,
4932}
4933impl GetComboPositionsRequest {
4934 pub async fn parse_response(
4936 req: reqwest::Response,
4937 ) -> anyhow::Result<GetComboPositionsResponse> {
4938 let status = req.status();
4939 if status == http::StatusCode::OK {
4940 let data =
4941 oas3_gen_support::Diagnostics::<ComboPositionResponse>::json_with_diagnostics(req)
4942 .await?;
4943 return Ok(GetComboPositionsResponse::Ok(data));
4944 }
4945 if status == http::StatusCode::UNAUTHORIZED {
4946 let _ = req.bytes().await?;
4947 return Ok(GetComboPositionsResponse::Unauthorized);
4948 }
4949 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
4950 let _ = req.bytes().await?;
4951 return Ok(GetComboPositionsResponse::InternalServerError);
4952 }
4953 if status == http::StatusCode::SERVICE_UNAVAILABLE {
4954 let _ = req.bytes().await?;
4955 return Ok(GetComboPositionsResponse::ServiceUnavailable);
4956 }
4957 let _ = req.bytes().await?;
4958 return Ok(GetComboPositionsResponse::Unknown);
4959 }
4960}
4961#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
4962pub struct GetComboPositionsRequestPath {
4963 #[validate(length(min = 1u64))]
4964 pub account_id: String,
4965}
4966#[serde_with::skip_serializing_none]
4967#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
4968pub struct GetComboPositionsRequestQuery {
4969 #[default(Some(false))]
4971 pub nocache: Option<bool>,
4972}
4973#[derive(Debug, Clone)]
4975pub enum GetComboPositionsResponse {
4976 Ok(ComboPositionResponse),
4978 Unauthorized,
4980 InternalServerError,
4983 ServiceUnavailable,
4986 Unknown,
4988}
4989#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
4991pub struct GetConidsByExchangeRequest {
4992 #[validate(nested)]
4993 pub query: GetConidsByExchangeRequestQuery,
4994}
4995impl GetConidsByExchangeRequest {
4996 pub async fn parse_response(
4998 req: reqwest::Response,
4999 ) -> anyhow::Result<GetConidsByExchangeResponse> {
5000 let status = req.status();
5001 if status == http::StatusCode::OK {
5002 let data =
5003 oas3_gen_support::Diagnostics::<Vec<serde_json::Value>>::json_with_diagnostics(req)
5004 .await?;
5005 return Ok(GetConidsByExchangeResponse::Ok(data));
5006 }
5007 if status == http::StatusCode::UNAUTHORIZED {
5008 let _ = req.bytes().await?;
5009 return Ok(GetConidsByExchangeResponse::Unauthorized);
5010 }
5011 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5012 let _ = req.bytes().await?;
5013 return Ok(GetConidsByExchangeResponse::InternalServerError);
5014 }
5015 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5016 let _ = req.bytes().await?;
5017 return Ok(GetConidsByExchangeResponse::ServiceUnavailable);
5018 }
5019 let _ = req.bytes().await?;
5020 return Ok(GetConidsByExchangeResponse::Unknown);
5021 }
5022}
5023#[serde_with::skip_serializing_none]
5024#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5025pub struct GetConidsByExchangeRequestQuery {
5026 #[validate(length(min = 1u64))]
5029 pub exchange: String,
5030 #[serde(rename = "assetClass")]
5032 #[default(Some(Default::default()))]
5033 pub asset_class: Option<serde_json::Value>,
5034}
5035#[derive(Debug, Clone)]
5037pub enum GetConidsByExchangeResponse {
5038 Ok(Vec<serde_json::Value>),
5040 Unauthorized,
5042 InternalServerError,
5045 ServiceUnavailable,
5048 Unknown,
5050}
5051#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5053pub struct GetContractInfoRequest {
5054 pub query: GetContractInfoRequestQuery,
5055}
5056impl GetContractInfoRequest {
5057 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetContractInfoResponse> {
5059 let status = req.status();
5060 if status == http::StatusCode::OK {
5061 let data =
5062 oas3_gen_support::Diagnostics::<SecDefInfoResponse>::json_with_diagnostics(req)
5063 .await?;
5064 return Ok(GetContractInfoResponse::Ok(data));
5065 }
5066 if status == http::StatusCode::BAD_REQUEST {
5067 let _ = req.bytes().await?;
5068 return Ok(GetContractInfoResponse::BadRequest);
5069 }
5070 if status == http::StatusCode::UNAUTHORIZED {
5071 let _ = req.bytes().await?;
5072 return Ok(GetContractInfoResponse::Unauthorized);
5073 }
5074 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5075 let _ = req.bytes().await?;
5076 return Ok(GetContractInfoResponse::InternalServerError);
5077 }
5078 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5079 let _ = req.bytes().await?;
5080 return Ok(GetContractInfoResponse::ServiceUnavailable);
5081 }
5082 let _ = req.bytes().await?;
5083 return Ok(GetContractInfoResponse::Unknown);
5084 }
5085}
5086#[serde_with::skip_serializing_none]
5087#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
5088pub struct GetContractInfoRequestQuery {
5089 pub conid: Option<String>,
5092 pub sectype: Option<serde_json::Value>,
5094 pub month: Option<serde_json::Value>,
5096 pub exchange: Option<serde_json::Value>,
5098 pub strike: Option<serde_json::Value>,
5100 pub right: Option<IndividualPositionPutOrCall>,
5102 #[serde(rename = "issuerId")]
5105 pub issuer_id: Option<String>,
5106 pub filters: Option<serde_json::Value>,
5108}
5109#[derive(Debug, Clone)]
5111pub enum GetContractInfoResponse {
5112 Ok(SecDefInfoResponse),
5114 BadRequest,
5116 Unauthorized,
5118 InternalServerError,
5121 ServiceUnavailable,
5124 Unknown,
5126}
5127#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5129pub struct GetContractRulesRequest {
5130 pub body: RuleRequestBody,
5131}
5132impl GetContractRulesRequest {
5133 pub async fn parse_response(
5135 req: reqwest::Response,
5136 ) -> anyhow::Result<GetContractRulesResponse> {
5137 let status = req.status();
5138 if status == http::StatusCode::OK {
5139 let data =
5140 oas3_gen_support::Diagnostics::<ContractRules>::json_with_diagnostics(req).await?;
5141 return Ok(GetContractRulesResponse::Ok(data));
5142 }
5143 if status == http::StatusCode::UNAUTHORIZED {
5144 let _ = req.bytes().await?;
5145 return Ok(GetContractRulesResponse::Unauthorized);
5146 }
5147 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5148 let _ = req.bytes().await?;
5149 return Ok(GetContractRulesResponse::InternalServerError);
5150 }
5151 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5152 let _ = req.bytes().await?;
5153 return Ok(GetContractRulesResponse::ServiceUnavailable);
5154 }
5155 let _ = req.bytes().await?;
5156 return Ok(GetContractRulesResponse::Unknown);
5157 }
5158}
5159#[derive(Debug, Clone)]
5161pub enum GetContractRulesResponse {
5162 Ok(ContractRules),
5164 Unauthorized,
5166 InternalServerError,
5169 ServiceUnavailable,
5172 Unknown,
5174}
5175#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5177pub struct GetContractStrikesRequest {
5178 #[validate(nested)]
5179 pub query: GetContractStrikesRequestQuery,
5180}
5181impl GetContractStrikesRequest {
5182 pub async fn parse_response(
5184 req: reqwest::Response,
5185 ) -> anyhow::Result<GetContractStrikesResponse> {
5186 let status = req.status();
5187 if status == http::StatusCode::OK {
5188 let data =
5189 oas3_gen_support::Diagnostics::<Strike200Response>::json_with_diagnostics(req)
5190 .await?;
5191 return Ok(GetContractStrikesResponse::Ok(data));
5192 }
5193 if status == http::StatusCode::BAD_REQUEST {
5194 let _ = req.bytes().await?;
5195 return Ok(GetContractStrikesResponse::BadRequest);
5196 }
5197 if status == http::StatusCode::UNAUTHORIZED {
5198 let _ = req.bytes().await?;
5199 return Ok(GetContractStrikesResponse::Unauthorized);
5200 }
5201 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5202 let _ = req.bytes().await?;
5203 return Ok(GetContractStrikesResponse::InternalServerError);
5204 }
5205 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5206 let _ = req.bytes().await?;
5207 return Ok(GetContractStrikesResponse::ServiceUnavailable);
5208 }
5209 let _ = req.bytes().await?;
5210 return Ok(GetContractStrikesResponse::Unknown);
5211 }
5212}
5213#[serde_with::skip_serializing_none]
5214#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5215pub struct GetContractStrikesRequestQuery {
5216 #[validate(length(min = 1u64))]
5219 pub conid: String,
5220 pub sectype: GetContractStrikesRequestQuerySectype,
5225 #[validate(length(min = 1u64))]
5228 pub month: String,
5229 #[default(Some("SMART".to_string()))]
5232 pub exchange: Option<String>,
5233}
5234#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
5239pub enum GetContractStrikesRequestQuerySectype {
5240 #[serde(rename = "OPT")]
5241 #[default]
5242 Opt,
5243 #[serde(rename = "FOP")]
5244 Fop,
5245 #[serde(rename = "WAR")]
5246 War,
5247}
5248impl core::fmt::Display for GetContractStrikesRequestQuerySectype {
5249 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5250 match self {
5251 Self::Opt => write!(f, "OPT"),
5252 Self::Fop => write!(f, "FOP"),
5253 Self::War => write!(f, "WAR"),
5254 }
5255 }
5256}
5257#[derive(Debug, Clone)]
5259pub enum GetContractStrikesResponse {
5260 Ok(Strike200Response),
5262 BadRequest,
5264 Unauthorized,
5266 InternalServerError,
5269 ServiceUnavailable,
5272 Unknown,
5274}
5275#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5277pub struct GetContractSymbolsFromBodyRequest {
5278 #[validate(nested)]
5279 pub body: SearchRequestBody,
5280}
5281impl GetContractSymbolsFromBodyRequest {
5282 pub async fn parse_response(
5284 req: reqwest::Response,
5285 ) -> anyhow::Result<GetContractSymbolsResponse> {
5286 let status = req.status();
5287 if status == http::StatusCode::OK {
5288 let data =
5289 oas3_gen_support::Diagnostics::<SecdefSearchResponse>::json_with_diagnostics(req)
5290 .await?;
5291 return Ok(GetContractSymbolsResponse::Ok(data));
5292 }
5293 if status == http::StatusCode::BAD_REQUEST {
5294 let _ = req.bytes().await?;
5295 return Ok(GetContractSymbolsResponse::BadRequest);
5296 }
5297 if status == http::StatusCode::UNAUTHORIZED {
5298 let _ = req.bytes().await?;
5299 return Ok(GetContractSymbolsResponse::Unauthorized);
5300 }
5301 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5302 let _ = req.bytes().await?;
5303 return Ok(GetContractSymbolsResponse::InternalServerError);
5304 }
5305 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5306 let _ = req.bytes().await?;
5307 return Ok(GetContractSymbolsResponse::ServiceUnavailable);
5308 }
5309 let _ = req.bytes().await?;
5310 return Ok(GetContractSymbolsResponse::Unknown);
5311 }
5312}
5313#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5315pub struct GetContractSymbolsRequest {
5316 pub query: GetContractSymbolsRequestQuery,
5317}
5318impl GetContractSymbolsRequest {
5319 pub async fn parse_response(
5321 req: reqwest::Response,
5322 ) -> anyhow::Result<GetContractSymbolsResponse> {
5323 let status = req.status();
5324 if status == http::StatusCode::OK {
5325 let data =
5326 oas3_gen_support::Diagnostics::<SecdefSearchResponse>::json_with_diagnostics(req)
5327 .await?;
5328 return Ok(GetContractSymbolsResponse::Ok(data));
5329 }
5330 if status == http::StatusCode::BAD_REQUEST {
5331 let _ = req.bytes().await?;
5332 return Ok(GetContractSymbolsResponse::BadRequest);
5333 }
5334 if status == http::StatusCode::UNAUTHORIZED {
5335 let _ = req.bytes().await?;
5336 return Ok(GetContractSymbolsResponse::Unauthorized);
5337 }
5338 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5339 let _ = req.bytes().await?;
5340 return Ok(GetContractSymbolsResponse::InternalServerError);
5341 }
5342 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5343 let _ = req.bytes().await?;
5344 return Ok(GetContractSymbolsResponse::ServiceUnavailable);
5345 }
5346 let _ = req.bytes().await?;
5347 return Ok(GetContractSymbolsResponse::Unknown);
5348 }
5349}
5350#[serde_with::skip_serializing_none]
5351#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
5352pub struct GetContractSymbolsRequestQuery {
5353 pub symbol: Option<String>,
5356 #[serde(rename = "secType")]
5361 #[default(Some(Default::default()))]
5362 pub sec_type: Option<GetContractSymbolsRequestQuerySecType>,
5363 pub name: Option<bool>,
5365 pub more: Option<bool>,
5366 pub fund: Option<bool>,
5368 #[serde(rename = "fundFamilyConidEx")]
5369 pub fund_family_conid_ex: Option<String>,
5370 pub pattern: Option<bool>,
5372 pub referrer: Option<String>,
5373}
5374#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
5375pub enum GetContractSymbolsRequestQuerySecType {
5376 #[serde(rename = "STK")]
5377 #[default]
5378 Stk,
5379 #[serde(rename = "IND")]
5380 Ind,
5381 #[serde(rename = "BOND")]
5382 Bond,
5383}
5384impl core::fmt::Display for GetContractSymbolsRequestQuerySecType {
5385 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5386 match self {
5387 Self::Stk => write!(f, "STK"),
5388 Self::Ind => write!(f, "IND"),
5389 Self::Bond => write!(f, "BOND"),
5390 }
5391 }
5392}
5393#[derive(Debug, Clone)]
5395pub enum GetContractSymbolsResponse {
5396 Ok(SecdefSearchResponse),
5398 BadRequest,
5400 Unauthorized,
5402 InternalServerError,
5405 ServiceUnavailable,
5408 Unknown,
5410}
5411#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5413pub struct GetCurrencyPairsRequest {
5414 #[validate(nested)]
5415 pub query: GetCurrencyPairsRequestQuery,
5416}
5417impl GetCurrencyPairsRequest {
5418 pub async fn parse_response(
5420 req: reqwest::Response,
5421 ) -> anyhow::Result<GetCurrencyPairsResponse> {
5422 let status = req.status();
5423 if status == http::StatusCode::OK {
5424 let data =
5425 oas3_gen_support::Diagnostics::<CurrencyPairs>::json_with_diagnostics(req).await?;
5426 return Ok(GetCurrencyPairsResponse::Ok(data));
5427 }
5428 if status == http::StatusCode::BAD_REQUEST {
5429 let _ = req.bytes().await?;
5430 return Ok(GetCurrencyPairsResponse::BadRequest);
5431 }
5432 if status == http::StatusCode::UNAUTHORIZED {
5433 let _ = req.bytes().await?;
5434 return Ok(GetCurrencyPairsResponse::Unauthorized);
5435 }
5436 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5437 let _ = req.bytes().await?;
5438 return Ok(GetCurrencyPairsResponse::InternalServerError);
5439 }
5440 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5441 let _ = req.bytes().await?;
5442 return Ok(GetCurrencyPairsResponse::ServiceUnavailable);
5443 }
5444 let _ = req.bytes().await?;
5445 return Ok(GetCurrencyPairsResponse::Unknown);
5446 }
5447}
5448#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5449pub struct GetCurrencyPairsRequestQuery {
5450 #[validate(length(min = 1u64))]
5453 pub currency: String,
5454}
5455#[derive(Debug, Clone)]
5457pub enum GetCurrencyPairsResponse {
5458 Ok(CurrencyPairs),
5460 BadRequest,
5462 Unauthorized,
5464 InternalServerError,
5467 ServiceUnavailable,
5470 Unknown,
5472}
5473#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5475pub struct GetDynamicAccountsRequest {
5476 #[validate(nested)]
5477 pub path: GetDynamicAccountsRequestPath,
5478}
5479impl GetDynamicAccountsRequest {
5480 pub async fn parse_response(
5482 req: reqwest::Response,
5483 ) -> anyhow::Result<GetDynamicAccountsResponse> {
5484 let status = req.status();
5485 if status == http::StatusCode::OK {
5486 let data =
5487 oas3_gen_support::Diagnostics::<DynAccountSearchResponse>::json_with_diagnostics(
5488 req,
5489 )
5490 .await?;
5491 return Ok(GetDynamicAccountsResponse::Ok(data));
5492 }
5493 if status == http::StatusCode::UNAUTHORIZED {
5494 let _ = req.bytes().await?;
5495 return Ok(GetDynamicAccountsResponse::Unauthorized);
5496 }
5497 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5498 let _ = req.bytes().await?;
5499 return Ok(GetDynamicAccountsResponse::ServiceUnavailable);
5500 }
5501 let _ = req.bytes().await?;
5502 return Ok(GetDynamicAccountsResponse::Unknown);
5503 }
5504}
5505#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
5506pub struct GetDynamicAccountsRequestPath {
5507 #[validate(length(min = 1u64))]
5510 pub search_pattern: String,
5511}
5512#[derive(Debug, Clone)]
5514pub enum GetDynamicAccountsResponse {
5515 Ok(DynAccountSearchResponse),
5517 Unauthorized,
5519 ServiceUnavailable,
5522 Unknown,
5524}
5525#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5527pub struct GetExchangeRatesRequest {
5528 #[validate(nested)]
5529 pub query: GetExchangeRatesRequestQuery,
5530}
5531impl GetExchangeRatesRequest {
5532 pub async fn parse_response(
5534 req: reqwest::Response,
5535 ) -> anyhow::Result<GetExchangeRatesResponse> {
5536 let status = req.status();
5537 if status == http::StatusCode::OK {
5538 let data =
5539 oas3_gen_support::Diagnostics::<RateResponse>::json_with_diagnostics(req).await?;
5540 return Ok(GetExchangeRatesResponse::Ok(data));
5541 }
5542 if status == http::StatusCode::BAD_REQUEST {
5543 let _ = req.bytes().await?;
5544 return Ok(GetExchangeRatesResponse::BadRequest);
5545 }
5546 if status == http::StatusCode::UNAUTHORIZED {
5547 let _ = req.bytes().await?;
5548 return Ok(GetExchangeRatesResponse::Unauthorized);
5549 }
5550 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5551 let _ = req.bytes().await?;
5552 return Ok(GetExchangeRatesResponse::InternalServerError);
5553 }
5554 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5555 let _ = req.bytes().await?;
5556 return Ok(GetExchangeRatesResponse::ServiceUnavailable);
5557 }
5558 let _ = req.bytes().await?;
5559 return Ok(GetExchangeRatesResponse::Unknown);
5560 }
5561}
5562#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5563pub struct GetExchangeRatesRequestQuery {
5564 #[validate(length(min = 1u64))]
5567 pub target: String,
5568 #[validate(length(min = 1u64))]
5571 pub source: String,
5572}
5573#[derive(Debug, Clone)]
5575pub enum GetExchangeRatesResponse {
5576 Ok(RateResponse),
5578 BadRequest,
5580 Unauthorized,
5582 InternalServerError,
5585 ServiceUnavailable,
5588 Unknown,
5590}
5591#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5593pub struct GetForecastCategoriesRequest {}
5594impl GetForecastCategoriesRequest {
5595 pub async fn parse_response(
5597 req: reqwest::Response,
5598 ) -> anyhow::Result<GetForecastCategoriesResponse> {
5599 let status = req.status();
5600 if status == http::StatusCode::OK {
5601 let data =
5602 oas3_gen_support::Diagnostics::<CategoryTreeResponse>::json_with_diagnostics(req)
5603 .await?;
5604 return Ok(GetForecastCategoriesResponse::Ok(data));
5605 }
5606 if status == http::StatusCode::UNAUTHORIZED {
5607 let _ = req.bytes().await?;
5608 return Ok(GetForecastCategoriesResponse::Unauthorized);
5609 }
5610 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5611 let _ = req.bytes().await?;
5612 return Ok(GetForecastCategoriesResponse::InternalServerError);
5613 }
5614 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5615 let _ = req.bytes().await?;
5616 return Ok(GetForecastCategoriesResponse::ServiceUnavailable);
5617 }
5618 let _ = req.bytes().await?;
5619 return Ok(GetForecastCategoriesResponse::Unknown);
5620 }
5621}
5622#[derive(Debug, Clone)]
5624pub enum GetForecastCategoriesResponse {
5625 Ok(CategoryTreeResponse),
5627 Unauthorized,
5629 InternalServerError,
5632 ServiceUnavailable,
5635 Unknown,
5637}
5638#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5640pub struct GetForecastContractRequest {
5641 #[validate(nested)]
5642 pub query: GetForecastContractRequestQuery,
5643}
5644impl GetForecastContractRequest {
5645 pub async fn parse_response(
5647 req: reqwest::Response,
5648 ) -> anyhow::Result<GetForecastContractResponse> {
5649 let status = req.status();
5650 if status == http::StatusCode::OK {
5651 let data =
5652 oas3_gen_support::Diagnostics::<ForecastDetailsResponse>::json_with_diagnostics(
5653 req,
5654 )
5655 .await?;
5656 return Ok(GetForecastContractResponse::Ok(data));
5657 }
5658 if status == http::StatusCode::UNAUTHORIZED {
5659 let _ = req.bytes().await?;
5660 return Ok(GetForecastContractResponse::Unauthorized);
5661 }
5662 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5663 let _ = req.bytes().await?;
5664 return Ok(GetForecastContractResponse::InternalServerError);
5665 }
5666 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5667 let _ = req.bytes().await?;
5668 return Ok(GetForecastContractResponse::ServiceUnavailable);
5669 }
5670 let _ = req.bytes().await?;
5671 return Ok(GetForecastContractResponse::Unknown);
5672 }
5673}
5674#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5675pub struct GetForecastContractRequestQuery {
5676 #[validate(length(min = 1u64))]
5678 pub conid: String,
5679}
5680#[derive(Debug, Clone)]
5682pub enum GetForecastContractResponse {
5683 Ok(ForecastDetailsResponse),
5685 Unauthorized,
5687 InternalServerError,
5690 ServiceUnavailable,
5693 Unknown,
5695}
5696#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5698pub struct GetForecastMarketsRequest {
5699 #[validate(nested)]
5700 pub query: GetForecastMarketsRequestQuery,
5701}
5702impl GetForecastMarketsRequest {
5703 pub async fn parse_response(
5705 req: reqwest::Response,
5706 ) -> anyhow::Result<GetForecastMarketsResponse> {
5707 let status = req.status();
5708 if status == http::StatusCode::OK {
5709 let data =
5710 oas3_gen_support::Diagnostics::<ForecastMarketResponse>::json_with_diagnostics(req)
5711 .await?;
5712 return Ok(GetForecastMarketsResponse::Ok(data));
5713 }
5714 if status == http::StatusCode::UNAUTHORIZED {
5715 let _ = req.bytes().await?;
5716 return Ok(GetForecastMarketsResponse::Unauthorized);
5717 }
5718 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5719 let _ = req.bytes().await?;
5720 return Ok(GetForecastMarketsResponse::InternalServerError);
5721 }
5722 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5723 let _ = req.bytes().await?;
5724 return Ok(GetForecastMarketsResponse::ServiceUnavailable);
5725 }
5726 let _ = req.bytes().await?;
5727 return Ok(GetForecastMarketsResponse::Unknown);
5728 }
5729}
5730#[serde_with::skip_serializing_none]
5731#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5732pub struct GetForecastMarketsRequestQuery {
5733 #[serde(rename = "underlyingConid")]
5735 #[validate(length(min = 1u64))]
5736 pub underlying_conid: String,
5737 pub exchange: Option<String>,
5739}
5740#[derive(Debug, Clone)]
5742pub enum GetForecastMarketsResponse {
5743 Ok(ForecastMarketResponse),
5745 Unauthorized,
5747 InternalServerError,
5750 ServiceUnavailable,
5753 Unknown,
5755}
5756#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5758pub struct GetForecastRulesRequest {
5759 #[validate(nested)]
5760 pub query: GetForecastRulesRequestQuery,
5761}
5762impl GetForecastRulesRequest {
5763 pub async fn parse_response(
5765 req: reqwest::Response,
5766 ) -> anyhow::Result<GetForecastRulesResponse> {
5767 let status = req.status();
5768 if status == http::StatusCode::OK {
5769 let data =
5770 oas3_gen_support::Diagnostics::<ForecastRulesResponse>::json_with_diagnostics(req)
5771 .await?;
5772 return Ok(GetForecastRulesResponse::Ok(data));
5773 }
5774 if status == http::StatusCode::UNAUTHORIZED {
5775 let _ = req.bytes().await?;
5776 return Ok(GetForecastRulesResponse::Unauthorized);
5777 }
5778 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5779 let _ = req.bytes().await?;
5780 return Ok(GetForecastRulesResponse::InternalServerError);
5781 }
5782 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5783 let _ = req.bytes().await?;
5784 return Ok(GetForecastRulesResponse::ServiceUnavailable);
5785 }
5786 let _ = req.bytes().await?;
5787 return Ok(GetForecastRulesResponse::Unknown);
5788 }
5789}
5790#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5791pub struct GetForecastRulesRequestQuery {
5792 #[validate(length(min = 1u64))]
5794 pub conid: String,
5795}
5796#[derive(Debug, Clone)]
5798pub enum GetForecastRulesResponse {
5799 Ok(ForecastRulesResponse),
5801 Unauthorized,
5803 InternalServerError,
5806 ServiceUnavailable,
5809 Unknown,
5811}
5812#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5814pub struct GetForecastScheduleRequest {
5815 #[validate(nested)]
5816 pub query: GetForecastScheduleRequestQuery,
5817}
5818impl GetForecastScheduleRequest {
5819 pub async fn parse_response(
5821 req: reqwest::Response,
5822 ) -> anyhow::Result<GetForecastScheduleResponse> {
5823 let status = req.status();
5824 if status == http::StatusCode::OK {
5825 let data =
5826 oas3_gen_support::Diagnostics::<ForecastSchedulesResponse>::json_with_diagnostics(
5827 req,
5828 )
5829 .await?;
5830 return Ok(GetForecastScheduleResponse::Ok(data));
5831 }
5832 if status == http::StatusCode::UNAUTHORIZED {
5833 let _ = req.bytes().await?;
5834 return Ok(GetForecastScheduleResponse::Unauthorized);
5835 }
5836 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5837 let _ = req.bytes().await?;
5838 return Ok(GetForecastScheduleResponse::InternalServerError);
5839 }
5840 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5841 let _ = req.bytes().await?;
5842 return Ok(GetForecastScheduleResponse::ServiceUnavailable);
5843 }
5844 let _ = req.bytes().await?;
5845 return Ok(GetForecastScheduleResponse::Unknown);
5846 }
5847}
5848#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5849pub struct GetForecastScheduleRequestQuery {
5850 #[validate(length(min = 1u64))]
5852 pub conid: String,
5853}
5854#[derive(Debug, Clone)]
5856pub enum GetForecastScheduleResponse {
5857 Ok(ForecastSchedulesResponse),
5859 Unauthorized,
5861 InternalServerError,
5864 ServiceUnavailable,
5867 Unknown,
5869}
5870#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5872pub struct GetFundSummaryRequest {
5873 #[validate(nested)]
5874 pub path: GetFundSummaryRequestPath,
5875}
5876impl GetFundSummaryRequest {
5877 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetFundSummaryResponse> {
5879 let status = req.status();
5880 if status == http::StatusCode::OK {
5881 let data =
5882 oas3_gen_support::Diagnostics::<AvailableFundsResponse>::json_with_diagnostics(req)
5883 .await?;
5884 return Ok(GetFundSummaryResponse::Ok(data));
5885 }
5886 if status == http::StatusCode::BAD_REQUEST {
5887 let _ = req.bytes().await?;
5888 return Ok(GetFundSummaryResponse::BadRequest);
5889 }
5890 if status == http::StatusCode::UNAUTHORIZED {
5891 let _ = req.bytes().await?;
5892 return Ok(GetFundSummaryResponse::Unauthorized);
5893 }
5894 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5895 let _ = req.bytes().await?;
5896 return Ok(GetFundSummaryResponse::ServiceUnavailable);
5897 }
5898 let _ = req.bytes().await?;
5899 return Ok(GetFundSummaryResponse::Unknown);
5900 }
5901}
5902#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
5903pub struct GetFundSummaryRequestPath {
5904 #[validate(length(min = 1u64))]
5907 pub account_id: String,
5908}
5909#[derive(Debug, Clone)]
5911pub enum GetFundSummaryResponse {
5912 Ok(AvailableFundsResponse),
5914 BadRequest,
5916 Unauthorized,
5918 ServiceUnavailable,
5921 Unknown,
5923}
5924#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5926pub struct GetFutureBySymbolRequest {
5927 #[validate(nested)]
5928 pub query: GetFutureBySymbolRequestQuery,
5929}
5930impl GetFutureBySymbolRequest {
5931 pub async fn parse_response(
5933 req: reqwest::Response,
5934 ) -> anyhow::Result<GetFutureBySymbolResponse> {
5935 let status = req.status();
5936 if status == http::StatusCode::OK {
5937 let data =
5938 oas3_gen_support::Diagnostics::<Features>::json_with_diagnostics(req).await?;
5939 return Ok(GetFutureBySymbolResponse::Ok(data));
5940 }
5941 if status == http::StatusCode::UNAUTHORIZED {
5942 let _ = req.bytes().await?;
5943 return Ok(GetFutureBySymbolResponse::Unauthorized);
5944 }
5945 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
5946 let _ = req.bytes().await?;
5947 return Ok(GetFutureBySymbolResponse::InternalServerError);
5948 }
5949 if status == http::StatusCode::SERVICE_UNAVAILABLE {
5950 let _ = req.bytes().await?;
5951 return Ok(GetFutureBySymbolResponse::ServiceUnavailable);
5952 }
5953 let _ = req.bytes().await?;
5954 return Ok(GetFutureBySymbolResponse::Unknown);
5955 }
5956}
5957#[serde_with::skip_serializing_none]
5958#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
5959pub struct GetFutureBySymbolRequestQuery {
5960 #[validate(length(min = 1u64))]
5963 pub symbols: String,
5964 pub exchange: Option<String>,
5967}
5968#[derive(Debug, Clone)]
5970pub enum GetFutureBySymbolResponse {
5971 Ok(Features),
5973 Unauthorized,
5975 InternalServerError,
5978 ServiceUnavailable,
5981 Unknown,
5983}
5984#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
5986pub struct GetFyiDeliveryRequest {}
5987impl GetFyiDeliveryRequest {
5988 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetFyiDeliveryResponse> {
5990 let status = req.status();
5991 if status == http::StatusCode::OK {
5992 let data = oas3_gen_support::Diagnostics::<DeliveryOptions>::json_with_diagnostics(req)
5993 .await?;
5994 return Ok(GetFyiDeliveryResponse::Ok(data));
5995 }
5996 if status == http::StatusCode::UNAUTHORIZED {
5997 let _ = req.bytes().await?;
5998 return Ok(GetFyiDeliveryResponse::Unauthorized);
5999 }
6000 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6001 let _ = req.bytes().await?;
6002 return Ok(GetFyiDeliveryResponse::InternalServerError);
6003 }
6004 if status == http::StatusCode::SERVICE_UNAVAILABLE {
6005 let _ = req.bytes().await?;
6006 return Ok(GetFyiDeliveryResponse::ServiceUnavailable);
6007 }
6008 let _ = req.bytes().await?;
6009 return Ok(GetFyiDeliveryResponse::Unknown);
6010 }
6011}
6012#[derive(Debug, Clone)]
6014pub enum GetFyiDeliveryResponse {
6015 Ok(DeliveryOptions),
6017 Unauthorized,
6019 InternalServerError,
6022 ServiceUnavailable,
6025 Unknown,
6027}
6028#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6030pub struct GetFyiDisclaimerssRequest {
6031 pub path: GetFyiDisclaimerssRequestPath,
6032}
6033impl GetFyiDisclaimerssRequest {
6034 pub async fn parse_response(
6036 req: reqwest::Response,
6037 ) -> anyhow::Result<GetFyiDisclaimerssResponse> {
6038 let status = req.status();
6039 if status == http::StatusCode::OK {
6040 let data =
6041 oas3_gen_support::Diagnostics::<DisclaimerInfo>::json_with_diagnostics(req).await?;
6042 return Ok(GetFyiDisclaimerssResponse::Ok(data));
6043 }
6044 if status == http::StatusCode::UNAUTHORIZED {
6045 let _ = req.bytes().await?;
6046 return Ok(GetFyiDisclaimerssResponse::Unauthorized);
6047 }
6048 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6049 let _ = req.bytes().await?;
6050 return Ok(GetFyiDisclaimerssResponse::InternalServerError);
6051 }
6052 if status == http::StatusCode::SERVICE_UNAVAILABLE {
6053 let _ = req.bytes().await?;
6054 return Ok(GetFyiDisclaimerssResponse::ServiceUnavailable);
6055 }
6056 let _ = req.bytes().await?;
6057 return Ok(GetFyiDisclaimerssResponse::Unknown);
6058 }
6059}
6060#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
6061pub struct GetFyiDisclaimerssRequestPath {
6062 pub typecode: Typecodes,
6087}
6088#[derive(Debug, Clone)]
6090pub enum GetFyiDisclaimerssResponse {
6091 Ok(DisclaimerInfo),
6093 Unauthorized,
6095 InternalServerError,
6098 ServiceUnavailable,
6101 Unknown,
6103}
6104#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6106pub struct GetFyiSettingsRequest {}
6107impl GetFyiSettingsRequest {
6108 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetFyiSettingsResponse> {
6110 let status = req.status();
6111 if status == http::StatusCode::OK {
6112 let data =
6113 oas3_gen_support::Diagnostics::<FyiSettings>::json_with_diagnostics(req).await?;
6114 return Ok(GetFyiSettingsResponse::Ok(data));
6115 }
6116 if status == http::StatusCode::UNAUTHORIZED {
6117 let _ = req.bytes().await?;
6118 return Ok(GetFyiSettingsResponse::Unauthorized);
6119 }
6120 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6121 let _ = req.bytes().await?;
6122 return Ok(GetFyiSettingsResponse::InternalServerError);
6123 }
6124 if status == http::StatusCode::SERVICE_UNAVAILABLE {
6125 let _ = req.bytes().await?;
6126 return Ok(GetFyiSettingsResponse::ServiceUnavailable);
6127 }
6128 let _ = req.bytes().await?;
6129 return Ok(GetFyiSettingsResponse::Unknown);
6130 }
6131}
6132#[derive(Debug, Clone)]
6134pub enum GetFyiSettingsResponse {
6135 Ok(FyiSettings),
6137 Unauthorized,
6139 InternalServerError,
6142 ServiceUnavailable,
6145 Unknown,
6147}
6148#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6150pub struct GetGwApiV1AccountsAccountidDetailsRequest {
6151 #[validate(nested)]
6152 pub path: GetGwApiV1AccountsAccountidDetailsRequestPath,
6153}
6154impl GetGwApiV1AccountsAccountidDetailsRequest {
6155 pub async fn parse_response(
6157 req: reqwest::Response,
6158 ) -> anyhow::Result<GetGwApiV1AccountsAccountidDetailsResponse> {
6159 let status = req.status();
6160 if status == http::StatusCode::OK {
6161 let data =
6162 oas3_gen_support::Diagnostics::<AccountDetailsResponse>::json_with_diagnostics(req)
6163 .await?;
6164 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::Ok(data));
6165 }
6166 if status == http::StatusCode::BAD_REQUEST {
6167 let _ = req.bytes().await?;
6168 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::BadRequest);
6169 }
6170 if status == http::StatusCode::UNAUTHORIZED {
6171 let _ = req.bytes().await?;
6172 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::Unauthorized);
6173 }
6174 if status == http::StatusCode::FORBIDDEN {
6175 let _ = req.bytes().await?;
6176 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::Forbidden);
6177 }
6178 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6179 let _ = req.bytes().await?;
6180 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::UnsupportedMediaType);
6181 }
6182 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6183 let _ = req.bytes().await?;
6184 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::InternalServerError);
6185 }
6186 let _ = req.bytes().await?;
6187 return Ok(GetGwApiV1AccountsAccountidDetailsResponse::Unknown);
6188 }
6189}
6190#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6191pub struct GetGwApiV1AccountsAccountidDetailsRequestPath {
6192 #[validate(length(min = 1u64))]
6193 pub account_id: String,
6194}
6195#[derive(Debug, Clone)]
6197pub enum GetGwApiV1AccountsAccountidDetailsResponse {
6198 Ok(AccountDetailsResponse),
6200 BadRequest,
6202 Unauthorized,
6204 Forbidden,
6206 UnsupportedMediaType,
6208 InternalServerError,
6210 Unknown,
6212}
6213#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6215pub struct GetGwApiV1AccountsAccountidKycRequest {
6216 #[validate(nested)]
6217 pub path: GetGwApiV1AccountsAccountidKycRequestPath,
6218}
6219impl GetGwApiV1AccountsAccountidKycRequest {
6220 pub async fn parse_response(
6222 req: reqwest::Response,
6223 ) -> anyhow::Result<GetGwApiV1AccountsAccountidKycResponse> {
6224 let status = req.status();
6225 if status == http::StatusCode::OK {
6226 let data =
6227 oas3_gen_support::Diagnostics::<Au10TixDetailResponse>::json_with_diagnostics(req)
6228 .await?;
6229 return Ok(GetGwApiV1AccountsAccountidKycResponse::Ok(data));
6230 }
6231 if status == http::StatusCode::BAD_REQUEST {
6232 let _ = req.bytes().await?;
6233 return Ok(GetGwApiV1AccountsAccountidKycResponse::BadRequest);
6234 }
6235 if status == http::StatusCode::UNAUTHORIZED {
6236 let _ = req.bytes().await?;
6237 return Ok(GetGwApiV1AccountsAccountidKycResponse::Unauthorized);
6238 }
6239 if status == http::StatusCode::FORBIDDEN {
6240 let _ = req.bytes().await?;
6241 return Ok(GetGwApiV1AccountsAccountidKycResponse::Forbidden);
6242 }
6243 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6244 let _ = req.bytes().await?;
6245 return Ok(GetGwApiV1AccountsAccountidKycResponse::UnsupportedMediaType);
6246 }
6247 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6248 let _ = req.bytes().await?;
6249 return Ok(GetGwApiV1AccountsAccountidKycResponse::InternalServerError);
6250 }
6251 let _ = req.bytes().await?;
6252 return Ok(GetGwApiV1AccountsAccountidKycResponse::Unknown);
6253 }
6254}
6255#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6256pub struct GetGwApiV1AccountsAccountidKycRequestPath {
6257 #[validate(length(min = 1u64))]
6258 pub account_id: String,
6259}
6260#[derive(Debug, Clone)]
6262pub enum GetGwApiV1AccountsAccountidKycResponse {
6263 Ok(Au10TixDetailResponse),
6265 BadRequest,
6267 Unauthorized,
6269 Forbidden,
6271 UnsupportedMediaType,
6273 InternalServerError,
6275 Unknown,
6277}
6278#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6280pub struct GetGwApiV1AccountsAccountidLoginMessagesRequest {
6281 #[validate(nested)]
6282 pub path: GetGwApiV1AccountsAccountidLoginMessagesRequestPath,
6283 pub query: GetGwApiV1AccountsAccountidLoginMessagesRequestQuery,
6284}
6285impl GetGwApiV1AccountsAccountidLoginMessagesRequest {
6286 pub async fn parse_response(
6288 req: reqwest::Response,
6289 ) -> anyhow::Result<GetGwApiV1AccountsLoginMessagesResponse> {
6290 let status = req.status();
6291 if status == http::StatusCode::OK {
6292 let data =
6293 oas3_gen_support::Diagnostics::<LoginMessageResponse>::json_with_diagnostics(req)
6294 .await?;
6295 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Ok(data));
6296 }
6297 if status == http::StatusCode::BAD_REQUEST {
6298 let _ = req.bytes().await?;
6299 return Ok(GetGwApiV1AccountsLoginMessagesResponse::BadRequest);
6300 }
6301 if status == http::StatusCode::UNAUTHORIZED {
6302 let _ = req.bytes().await?;
6303 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Unauthorized);
6304 }
6305 if status == http::StatusCode::FORBIDDEN {
6306 let _ = req.bytes().await?;
6307 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Forbidden);
6308 }
6309 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6310 let _ = req.bytes().await?;
6311 return Ok(GetGwApiV1AccountsLoginMessagesResponse::UnsupportedMediaType);
6312 }
6313 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6314 let _ = req.bytes().await?;
6315 return Ok(GetGwApiV1AccountsLoginMessagesResponse::InternalServerError);
6316 }
6317 let _ = req.bytes().await?;
6318 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Unknown);
6319 }
6320}
6321#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6322pub struct GetGwApiV1AccountsAccountidLoginMessagesRequestPath {
6323 #[validate(length(min = 1u64))]
6324 pub account_id: String,
6325}
6326#[serde_with::skip_serializing_none]
6327#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6328pub struct GetGwApiV1AccountsAccountidLoginMessagesRequestQuery {
6329 #[serde(rename = "type")]
6330 pub r#type: Option<String>,
6331}
6332#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6334pub struct GetGwApiV1AccountsAccountidStatusRequest {
6335 #[validate(nested)]
6336 pub path: GetGwApiV1AccountsAccountidStatusRequestPath,
6337}
6338impl GetGwApiV1AccountsAccountidStatusRequest {
6339 pub async fn parse_response(
6341 req: reqwest::Response,
6342 ) -> anyhow::Result<GetGwApiV1AccountsAccountidStatusResponse> {
6343 let status = req.status();
6344 if status == http::StatusCode::OK {
6345 let data =
6346 oas3_gen_support::Diagnostics::<AccountStatusResponse>::json_with_diagnostics(req)
6347 .await?;
6348 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Ok(data));
6349 }
6350 if status == http::StatusCode::BAD_REQUEST {
6351 let _ = req.bytes().await?;
6352 return Ok(GetGwApiV1AccountsAccountidStatusResponse::BadRequest);
6353 }
6354 if status == http::StatusCode::UNAUTHORIZED {
6355 let _ = req.bytes().await?;
6356 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Unauthorized);
6357 }
6358 if status == http::StatusCode::FORBIDDEN {
6359 let _ = req.bytes().await?;
6360 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Forbidden);
6361 }
6362 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6363 let _ = req.bytes().await?;
6364 return Ok(GetGwApiV1AccountsAccountidStatusResponse::UnsupportedMediaType);
6365 }
6366 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6367 let _ = req.bytes().await?;
6368 return Ok(GetGwApiV1AccountsAccountidStatusResponse::InternalServerError);
6369 }
6370 let _ = req.bytes().await?;
6371 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Unknown);
6372 }
6373}
6374#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6375pub struct GetGwApiV1AccountsAccountidStatusRequestPath {
6376 #[validate(length(min = 1u64))]
6377 pub account_id: String,
6378}
6379#[derive(Debug, Clone)]
6381pub enum GetGwApiV1AccountsAccountidStatusResponse {
6382 Ok(AccountStatusResponse),
6384 BadRequest,
6386 Unauthorized,
6388 Forbidden,
6390 UnsupportedMediaType,
6392 InternalServerError,
6394 Unknown,
6396}
6397#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6399pub struct GetGwApiV1AccountsAccountidTasksRequest {
6400 #[validate(nested)]
6401 pub path: GetGwApiV1AccountsAccountidTasksRequestPath,
6402 pub query: GetGwApiV1AccountsAccountidTasksRequestQuery,
6403}
6404impl GetGwApiV1AccountsAccountidTasksRequest {
6405 pub async fn parse_response(
6407 req: reqwest::Response,
6408 ) -> anyhow::Result<GetGwApiV1AccountsAccountidTasksResponse> {
6409 let status = req.status();
6410 if status == http::StatusCode::OK {
6411 let data = oas3_gen_support::Diagnostics::<Task200Response>::json_with_diagnostics(req)
6412 .await?;
6413 return Ok(GetGwApiV1AccountsAccountidTasksResponse::Ok(data));
6414 }
6415 if status == http::StatusCode::BAD_REQUEST {
6416 let _ = req.bytes().await?;
6417 return Ok(GetGwApiV1AccountsAccountidTasksResponse::BadRequest);
6418 }
6419 if status == http::StatusCode::UNAUTHORIZED {
6420 let _ = req.bytes().await?;
6421 return Ok(GetGwApiV1AccountsAccountidTasksResponse::Unauthorized);
6422 }
6423 if status == http::StatusCode::FORBIDDEN {
6424 let _ = req.bytes().await?;
6425 return Ok(GetGwApiV1AccountsAccountidTasksResponse::Forbidden);
6426 }
6427 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6428 let _ = req.bytes().await?;
6429 return Ok(GetGwApiV1AccountsAccountidTasksResponse::UnsupportedMediaType);
6430 }
6431 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6432 let _ = req.bytes().await?;
6433 return Ok(GetGwApiV1AccountsAccountidTasksResponse::InternalServerError);
6434 }
6435 let _ = req.bytes().await?;
6436 return Ok(GetGwApiV1AccountsAccountidTasksResponse::Unknown);
6437 }
6438}
6439#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6440pub struct GetGwApiV1AccountsAccountidTasksRequestPath {
6441 #[validate(length(min = 1u64))]
6442 pub account_id: String,
6443}
6444#[serde_with::skip_serializing_none]
6445#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6446pub struct GetGwApiV1AccountsAccountidTasksRequestQuery {
6447 #[serde(rename = "type")]
6448 #[default(Some(Default::default()))]
6449 pub r#type: Option<GetGwApiV1AccountsAccountidTasksRequestQueryType>,
6450}
6451#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
6452pub enum GetGwApiV1AccountsAccountidTasksRequestQueryType {
6453 #[serde(rename = "pending")]
6454 #[default]
6455 Pending,
6456 #[serde(rename = "registration")]
6457 Registration,
6458}
6459impl core::fmt::Display for GetGwApiV1AccountsAccountidTasksRequestQueryType {
6460 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6461 match self {
6462 Self::Pending => write!(f, "pending"),
6463 Self::Registration => write!(f, "registration"),
6464 }
6465 }
6466}
6467#[derive(Debug, Clone)]
6469pub enum GetGwApiV1AccountsAccountidTasksResponse {
6470 Ok(Task200Response),
6472 BadRequest,
6474 Unauthorized,
6476 Forbidden,
6478 UnsupportedMediaType,
6480 InternalServerError,
6482 Unknown,
6484}
6485#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6487pub struct GetGwApiV1AccountsLoginMessagesRequest {
6488 pub query: GetGwApiV1AccountsLoginMessagesRequestQuery,
6489}
6490impl GetGwApiV1AccountsLoginMessagesRequest {
6491 pub async fn parse_response(
6493 req: reqwest::Response,
6494 ) -> anyhow::Result<GetGwApiV1AccountsLoginMessagesResponse> {
6495 let status = req.status();
6496 if status == http::StatusCode::OK {
6497 let data =
6498 oas3_gen_support::Diagnostics::<LoginMessageResponse>::json_with_diagnostics(req)
6499 .await?;
6500 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Ok(data));
6501 }
6502 if status == http::StatusCode::BAD_REQUEST {
6503 let _ = req.bytes().await?;
6504 return Ok(GetGwApiV1AccountsLoginMessagesResponse::BadRequest);
6505 }
6506 if status == http::StatusCode::UNAUTHORIZED {
6507 let _ = req.bytes().await?;
6508 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Unauthorized);
6509 }
6510 if status == http::StatusCode::FORBIDDEN {
6511 let _ = req.bytes().await?;
6512 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Forbidden);
6513 }
6514 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6515 let _ = req.bytes().await?;
6516 return Ok(GetGwApiV1AccountsLoginMessagesResponse::UnsupportedMediaType);
6517 }
6518 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6519 let _ = req.bytes().await?;
6520 return Ok(GetGwApiV1AccountsLoginMessagesResponse::InternalServerError);
6521 }
6522 let _ = req.bytes().await?;
6523 return Ok(GetGwApiV1AccountsLoginMessagesResponse::Unknown);
6524 }
6525}
6526#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6527pub struct GetGwApiV1AccountsLoginMessagesRequestQuery {
6528 #[serde(rename = "loginMessageRequest")]
6529 pub login_message_request: serde_json::Value,
6530}
6531#[derive(Debug, Clone)]
6533pub enum GetGwApiV1AccountsLoginMessagesResponse {
6534 Ok(LoginMessageResponse),
6536 BadRequest,
6538 Unauthorized,
6540 Forbidden,
6542 UnsupportedMediaType,
6544 InternalServerError,
6546 Unknown,
6548}
6549#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6551pub struct GetGwApiV1AccountsRequest {
6552 pub query: GetGwApiV1AccountsRequestQuery,
6553}
6554impl GetGwApiV1AccountsRequest {
6555 pub async fn parse_response(
6557 req: reqwest::Response,
6558 ) -> anyhow::Result<GetGwApiV1AccountsResponse> {
6559 let status = req.status();
6560 if status == http::StatusCode::OK {
6561 let data =
6562 oas3_gen_support::Diagnostics::<Account200Response>::json_with_diagnostics(req)
6563 .await?;
6564 return Ok(GetGwApiV1AccountsResponse::Ok(data));
6565 }
6566 if status == http::StatusCode::BAD_REQUEST {
6567 let _ = req.bytes().await?;
6568 return Ok(GetGwApiV1AccountsResponse::BadRequest);
6569 }
6570 if status == http::StatusCode::UNAUTHORIZED {
6571 let _ = req.bytes().await?;
6572 return Ok(GetGwApiV1AccountsResponse::Unauthorized);
6573 }
6574 if status == http::StatusCode::FORBIDDEN {
6575 let _ = req.bytes().await?;
6576 return Ok(GetGwApiV1AccountsResponse::Forbidden);
6577 }
6578 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6579 let _ = req.bytes().await?;
6580 return Ok(GetGwApiV1AccountsResponse::UnsupportedMediaType);
6581 }
6582 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6583 let _ = req.bytes().await?;
6584 return Ok(GetGwApiV1AccountsResponse::InternalServerError);
6585 }
6586 let _ = req.bytes().await?;
6587 return Ok(GetGwApiV1AccountsResponse::Unknown);
6588 }
6589}
6590#[serde_with::skip_serializing_none]
6591#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6592pub struct GetGwApiV1AccountsRequestQuery {
6593 #[serde(rename = "accountId")]
6594 pub account_id: Option<String>,
6595 #[serde(rename = "externalId")]
6596 pub external_id: Option<String>,
6597}
6598#[derive(Debug, Clone)]
6600pub enum GetGwApiV1AccountsResponse {
6601 Ok(Account200Response),
6603 BadRequest,
6605 Unauthorized,
6607 Forbidden,
6609 UnsupportedMediaType,
6611 InternalServerError,
6613 Unknown,
6615}
6616#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6618pub struct GetGwApiV1AccountsStatusRequest {
6619 pub query: GetGwApiV1AccountsStatusRequestQuery,
6620}
6621impl GetGwApiV1AccountsStatusRequest {
6622 pub async fn parse_response(
6624 req: reqwest::Response,
6625 ) -> anyhow::Result<GetGwApiV1AccountsStatusResponse> {
6626 let status = req.status();
6627 if status == http::StatusCode::OK {
6628 let data =
6629 oas3_gen_support::Diagnostics::<AccountStatusBulkResponse>::json_with_diagnostics(
6630 req,
6631 )
6632 .await?;
6633 return Ok(GetGwApiV1AccountsStatusResponse::Ok(data));
6634 }
6635 if status == http::StatusCode::BAD_REQUEST {
6636 let _ = req.bytes().await?;
6637 return Ok(GetGwApiV1AccountsStatusResponse::BadRequest);
6638 }
6639 if status == http::StatusCode::UNAUTHORIZED {
6640 let _ = req.bytes().await?;
6641 return Ok(GetGwApiV1AccountsStatusResponse::Unauthorized);
6642 }
6643 if status == http::StatusCode::FORBIDDEN {
6644 let _ = req.bytes().await?;
6645 return Ok(GetGwApiV1AccountsStatusResponse::Forbidden);
6646 }
6647 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6648 let _ = req.bytes().await?;
6649 return Ok(GetGwApiV1AccountsStatusResponse::UnsupportedMediaType);
6650 }
6651 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6652 let _ = req.bytes().await?;
6653 return Ok(GetGwApiV1AccountsStatusResponse::InternalServerError);
6654 }
6655 let _ = req.bytes().await?;
6656 return Ok(GetGwApiV1AccountsStatusResponse::Unknown);
6657 }
6658}
6659#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6660pub struct GetGwApiV1AccountsStatusRequestQuery {
6661 #[serde(rename = "accountStatusRequest")]
6662 pub account_status_request: serde_json::Value,
6663}
6664#[derive(Debug, Clone)]
6666pub enum GetGwApiV1AccountsStatusResponse {
6667 Ok(AccountStatusBulkResponse),
6669 BadRequest,
6671 Unauthorized,
6673 Forbidden,
6675 UnsupportedMediaType,
6677 InternalServerError,
6679 Unknown,
6681}
6682#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6684pub struct GetGwApiV1ClientInstructionsClientinstructionidRequest {
6685 pub path: GetGwApiV1ClientInstructionsClientinstructionidRequestPath,
6686 pub query: GetGwApiV1ClientInstructionsClientinstructionidRequestQuery,
6687}
6688impl GetGwApiV1ClientInstructionsClientinstructionidRequest {
6689 pub async fn parse_response(
6691 req: reqwest::Response,
6692 ) -> anyhow::Result<GetGwApiV1InstructionsInstructionidResponse> {
6693 let status = req.status();
6694 if status == http::StatusCode::OK {
6695 let data =
6696 oas3_gen_support::Diagnostics::<Instruction200Response>::json_with_diagnostics(req)
6697 .await?;
6698 return Ok(GetGwApiV1InstructionsInstructionidResponse::Ok(data));
6699 }
6700 if status == http::StatusCode::NOT_FOUND {
6701 let _ = req.bytes().await?;
6702 return Ok(GetGwApiV1InstructionsInstructionidResponse::NotFound);
6703 }
6704 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6705 let _ = req.bytes().await?;
6706 return Ok(GetGwApiV1InstructionsInstructionidResponse::InternalServerError);
6707 }
6708 let _ = req.bytes().await?;
6709 return Ok(GetGwApiV1InstructionsInstructionidResponse::Unknown);
6710 }
6711}
6712#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
6713pub struct GetGwApiV1ClientInstructionsClientinstructionidRequestPath {
6714 pub client_instruction_id: i32,
6717}
6718#[serde_with::skip_serializing_none]
6719#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6720pub struct GetGwApiV1ClientInstructionsClientinstructionidRequestQuery {
6721 #[serde(rename = "client-id")]
6724 pub client_id: Option<String>,
6725}
6726#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6728pub struct GetGwApiV1EchoHttpsRequest {}
6729impl GetGwApiV1EchoHttpsRequest {
6730 pub async fn parse_response(
6732 req: reqwest::Response,
6733 ) -> anyhow::Result<GetGwApiV1EchoHttpsResponse> {
6734 let status = req.status();
6735 if status == http::StatusCode::OK {
6736 let data =
6737 oas3_gen_support::Diagnostics::<EchoResponse>::json_with_diagnostics(req).await?;
6738 return Ok(GetGwApiV1EchoHttpsResponse::Ok(data));
6739 }
6740 if status == http::StatusCode::UNAUTHORIZED {
6741 let _ = req.bytes().await?;
6742 return Ok(GetGwApiV1EchoHttpsResponse::Unauthorized);
6743 }
6744 if status == http::StatusCode::FORBIDDEN {
6745 let _ = req.bytes().await?;
6746 return Ok(GetGwApiV1EchoHttpsResponse::Forbidden);
6747 }
6748 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6749 let _ = req.bytes().await?;
6750 return Ok(GetGwApiV1EchoHttpsResponse::InternalServerError);
6751 }
6752 let _ = req.bytes().await?;
6753 return Ok(GetGwApiV1EchoHttpsResponse::Unknown);
6754 }
6755}
6756#[derive(Debug, Clone)]
6758pub enum GetGwApiV1EchoHttpsResponse {
6759 Ok(EchoResponse),
6761 Unauthorized,
6763 Forbidden,
6765 InternalServerError,
6767 Unknown,
6769}
6770#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6772pub struct GetGwApiV1EnumerationsComplexAssetTransferRequest {
6773 #[validate(nested)]
6774 pub query: GetGwApiV1EnumerationsComplexAssetTransferRequestQuery,
6775}
6776impl GetGwApiV1EnumerationsComplexAssetTransferRequest {
6777 pub async fn parse_response(
6779 req: reqwest::Response,
6780 ) -> anyhow::Result<GetGwApiV1EnumerationsComplexAssetTransferResponse> {
6781 let status = req.status();
6782 if status == http::StatusCode::OK {
6783 let data =
6784 oas3_gen_support::Diagnostics::<GetBrokerListResponse>::json_with_diagnostics(req)
6785 .await?;
6786 return Ok(GetGwApiV1EnumerationsComplexAssetTransferResponse::Ok(data));
6787 }
6788 if status == http::StatusCode::BAD_REQUEST {
6789 let _ = req.bytes().await?;
6790 return Ok(GetGwApiV1EnumerationsComplexAssetTransferResponse::BadRequest);
6791 }
6792 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6793 let _ = req.bytes().await?;
6794 return Ok(GetGwApiV1EnumerationsComplexAssetTransferResponse::InternalServerError);
6795 }
6796 let _ = req.bytes().await?;
6797 return Ok(GetGwApiV1EnumerationsComplexAssetTransferResponse::Unknown);
6798 }
6799}
6800#[serde_with::skip_serializing_none]
6801#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
6802pub struct GetGwApiV1EnumerationsComplexAssetTransferRequestQuery {
6803 #[serde(rename = "client-id")]
6806 pub client_id: Option<String>,
6807 #[serde(rename = "instructionType")]
6809 #[validate(length(min = 1u64))]
6810 pub instruction_type: String,
6811}
6812#[derive(Debug, Clone)]
6814pub enum GetGwApiV1EnumerationsComplexAssetTransferResponse {
6815 Ok(GetBrokerListResponse),
6817 BadRequest,
6819 InternalServerError,
6821 Unknown,
6823}
6824#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6826pub struct GetGwApiV1EnumerationsEnumerationtypeRequest {
6827 #[validate(nested)]
6828 pub path: GetGwApiV1EnumerationsEnumerationtypeRequestPath,
6829 pub query: GetGwApiV1EnumerationsEnumerationtypeRequestQuery,
6830}
6831impl GetGwApiV1EnumerationsEnumerationtypeRequest {
6832 pub async fn parse_response(
6834 req: reqwest::Response,
6835 ) -> anyhow::Result<GetGwApiV1EnumerationsEnumerationtypeResponse> {
6836 let status = req.status();
6837 if status == http::StatusCode::OK {
6838 let data =
6839 oas3_gen_support::Diagnostics::<EnumerationResponse>::json_with_diagnostics(req)
6840 .await?;
6841 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::Ok(data));
6842 }
6843 if status == http::StatusCode::BAD_REQUEST {
6844 let _ = req.bytes().await?;
6845 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::BadRequest);
6846 }
6847 if status == http::StatusCode::UNAUTHORIZED {
6848 let _ = req.bytes().await?;
6849 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::Unauthorized);
6850 }
6851 if status == http::StatusCode::FORBIDDEN {
6852 let _ = req.bytes().await?;
6853 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::Forbidden);
6854 }
6855 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6856 let _ = req.bytes().await?;
6857 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::UnsupportedMediaType);
6858 }
6859 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6860 let _ = req.bytes().await?;
6861 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::InternalServerError);
6862 }
6863 let _ = req.bytes().await?;
6864 return Ok(GetGwApiV1EnumerationsEnumerationtypeResponse::Unknown);
6865 }
6866}
6867#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
6868pub struct GetGwApiV1EnumerationsEnumerationtypeRequestPath {
6869 #[validate(length(min = 1u64))]
6870 pub enumeration_type: String,
6871}
6872#[serde_with::skip_serializing_none]
6873#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
6874pub struct GetGwApiV1EnumerationsEnumerationtypeRequestQuery {
6875 #[serde(rename = "type")]
6877 pub r#type: Option<EnumerationType>,
6878 pub currency: Option<String>,
6879 #[serde(rename = "ibEntity")]
6880 pub ib_entity: Option<String>,
6881 #[serde(rename = "mdStatusNonPro")]
6882 pub md_status_non_pro: Option<String>,
6883 #[serde(rename = "form-number")]
6884 pub form_number: Option<String>,
6885 pub language: Option<GetGwApiV1EnumerationsEnumerationtypeRequestQueryLanguage>,
6886 #[serde(rename = "accountId")]
6887 pub account_id: Option<String>,
6888 #[serde(rename = "userName")]
6889 pub user_name: Option<String>,
6890}
6891#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
6892pub enum GetGwApiV1EnumerationsEnumerationtypeRequestQueryLanguage {
6893 #[serde(rename = "en")]
6894 #[default]
6895 En,
6896 #[serde(rename = "ar")]
6897 Ar,
6898 #[serde(rename = "de")]
6899 De,
6900 #[serde(rename = "es")]
6901 Es,
6902 #[serde(rename = "fr")]
6903 Fr,
6904 #[serde(rename = "he")]
6905 He,
6906 #[serde(rename = "hu")]
6907 Hu,
6908 #[serde(rename = "it")]
6909 It,
6910 #[serde(rename = "ja")]
6911 Ja,
6912 #[serde(rename = "nl")]
6913 Nl,
6914 #[serde(rename = "pt")]
6915 Pt,
6916 #[serde(rename = "ru")]
6917 Ru,
6918 #[serde(rename = "zh_CN")]
6919 ZhCn,
6920 #[serde(rename = "zh_TW")]
6921 ZhTw,
6922}
6923impl core::fmt::Display for GetGwApiV1EnumerationsEnumerationtypeRequestQueryLanguage {
6924 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6925 match self {
6926 Self::En => write!(f, "en"),
6927 Self::Ar => write!(f, "ar"),
6928 Self::De => write!(f, "de"),
6929 Self::Es => write!(f, "es"),
6930 Self::Fr => write!(f, "fr"),
6931 Self::He => write!(f, "he"),
6932 Self::Hu => write!(f, "hu"),
6933 Self::It => write!(f, "it"),
6934 Self::Ja => write!(f, "ja"),
6935 Self::Nl => write!(f, "nl"),
6936 Self::Pt => write!(f, "pt"),
6937 Self::Ru => write!(f, "ru"),
6938 Self::ZhCn => write!(f, "zh_CN"),
6939 Self::ZhTw => write!(f, "zh_TW"),
6940 }
6941 }
6942}
6943#[derive(Debug, Clone)]
6945pub enum GetGwApiV1EnumerationsEnumerationtypeResponse {
6946 Ok(EnumerationResponse),
6948 BadRequest,
6950 Unauthorized,
6952 Forbidden,
6954 UnsupportedMediaType,
6956 InternalServerError,
6958 Unknown,
6960}
6961#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
6963pub struct GetGwApiV1FormsRequest {
6964 pub query: GetGwApiV1FormsRequestQuery,
6965}
6966impl GetGwApiV1FormsRequest {
6967 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetGwApiV1FormsResponse> {
6969 let status = req.status();
6970 if status == http::StatusCode::OK {
6971 let data =
6972 oas3_gen_support::Diagnostics::<FormFileResponse>::json_with_diagnostics(req)
6973 .await?;
6974 return Ok(GetGwApiV1FormsResponse::Ok(data));
6975 }
6976 if status == http::StatusCode::BAD_REQUEST {
6977 let _ = req.bytes().await?;
6978 return Ok(GetGwApiV1FormsResponse::BadRequest);
6979 }
6980 if status == http::StatusCode::UNAUTHORIZED {
6981 let _ = req.bytes().await?;
6982 return Ok(GetGwApiV1FormsResponse::Unauthorized);
6983 }
6984 if status == http::StatusCode::FORBIDDEN {
6985 let _ = req.bytes().await?;
6986 return Ok(GetGwApiV1FormsResponse::Forbidden);
6987 }
6988 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
6989 let _ = req.bytes().await?;
6990 return Ok(GetGwApiV1FormsResponse::UnsupportedMediaType);
6991 }
6992 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
6993 let _ = req.bytes().await?;
6994 return Ok(GetGwApiV1FormsResponse::InternalServerError);
6995 }
6996 let _ = req.bytes().await?;
6997 return Ok(GetGwApiV1FormsResponse::Unknown);
6998 }
6999}
7000#[serde_with::serde_as]
7001#[serde_with::skip_serializing_none]
7002#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
7003pub struct GetGwApiV1FormsRequestQuery {
7004 #[serde_as(as = "Option<oas3_gen_support::StringWithCommaSeparator>")]
7005 #[serde(rename = "formNo")]
7006 pub form_no: Option<Vec<String>>,
7007 #[serde(rename = "getDocs")]
7008 pub get_docs: Option<String>,
7009 #[serde(rename = "fromDate")]
7010 pub from_date: Option<String>,
7011 #[serde(rename = "toDate")]
7012 pub to_date: Option<String>,
7013 pub language: Option<String>,
7014 #[default(Some(Default::default()))]
7015 pub projection: Option<GetGwApiV1FormsRequestQueryProjection>,
7016}
7017#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
7018pub enum GetGwApiV1FormsRequestQueryProjection {
7019 #[serde(rename = "PAYLOAD")]
7020 #[default]
7021 Payload,
7022 #[serde(rename = "DOCS")]
7023 Docs,
7024 #[serde(rename = "NONE")]
7025 None,
7026}
7027impl core::fmt::Display for GetGwApiV1FormsRequestQueryProjection {
7028 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7029 match self {
7030 Self::Payload => write!(f, "PAYLOAD"),
7031 Self::Docs => write!(f, "DOCS"),
7032 Self::None => write!(f, "NONE"),
7033 }
7034 }
7035}
7036#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7038pub struct GetGwApiV1FormsRequiredFormsRequest {
7039 pub query: GetGwApiV1FormsRequiredFormsRequestQuery,
7040}
7041impl GetGwApiV1FormsRequiredFormsRequest {
7042 pub async fn parse_response(
7044 req: reqwest::Response,
7045 ) -> anyhow::Result<GetGwApiV1FormsRequiredFormsResponse> {
7046 let status = req.status();
7047 if status == http::StatusCode::OK {
7048 let data =
7049 oas3_gen_support::Diagnostics::<RequiredFormsResponse>::json_with_diagnostics(req)
7050 .await?;
7051 return Ok(GetGwApiV1FormsRequiredFormsResponse::Ok(data));
7052 }
7053 if status == http::StatusCode::BAD_REQUEST {
7054 let _ = req.bytes().await?;
7055 return Ok(GetGwApiV1FormsRequiredFormsResponse::BadRequest);
7056 }
7057 if status == http::StatusCode::UNAUTHORIZED {
7058 let _ = req.bytes().await?;
7059 return Ok(GetGwApiV1FormsRequiredFormsResponse::Unauthorized);
7060 }
7061 if status == http::StatusCode::FORBIDDEN {
7062 let _ = req.bytes().await?;
7063 return Ok(GetGwApiV1FormsRequiredFormsResponse::Forbidden);
7064 }
7065 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
7066 let _ = req.bytes().await?;
7067 return Ok(GetGwApiV1FormsRequiredFormsResponse::UnsupportedMediaType);
7068 }
7069 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7070 let _ = req.bytes().await?;
7071 return Ok(GetGwApiV1FormsRequiredFormsResponse::InternalServerError);
7072 }
7073 let _ = req.bytes().await?;
7074 return Ok(GetGwApiV1FormsRequiredFormsResponse::Unknown);
7075 }
7076}
7077#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
7078pub struct GetGwApiV1FormsRequiredFormsRequestQuery {
7079 #[serde(rename = "requiredFormsRequest")]
7080 pub required_forms_request: serde_json::Value,
7081}
7082#[derive(Debug, Clone)]
7084pub enum GetGwApiV1FormsRequiredFormsResponse {
7085 Ok(RequiredFormsResponse),
7087 BadRequest,
7089 Unauthorized,
7091 Forbidden,
7093 UnsupportedMediaType,
7095 InternalServerError,
7097 Unknown,
7099}
7100#[derive(Debug, Clone)]
7102pub enum GetGwApiV1FormsResponse {
7103 Ok(FormFileResponse),
7105 BadRequest,
7107 Unauthorized,
7109 Forbidden,
7111 UnsupportedMediaType,
7113 InternalServerError,
7115 Unknown,
7117}
7118#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7120pub struct GetGwApiV1InstructionSetsInstructionsetidRequest {
7121 pub path: GetGwApiV1InstructionSetsInstructionsetidRequestPath,
7122 pub query: GetGwApiV1InstructionSetsInstructionsetidRequestQuery,
7123}
7124impl GetGwApiV1InstructionSetsInstructionsetidRequest {
7125 pub async fn parse_response(
7127 req: reqwest::Response,
7128 ) -> anyhow::Result<GetGwApiV1InstructionSetsInstructionsetidResponse> {
7129 let status = req.status();
7130 if status == http::StatusCode::OK {
7131 let data =
7132 oas3_gen_support::Diagnostics::<BulkMultiStatusResponse>::json_with_diagnostics(
7133 req,
7134 )
7135 .await?;
7136 return Ok(GetGwApiV1InstructionSetsInstructionsetidResponse::Ok(data));
7137 }
7138 if status == http::StatusCode::NOT_FOUND {
7139 let _ = req.bytes().await?;
7140 return Ok(GetGwApiV1InstructionSetsInstructionsetidResponse::NotFound);
7141 }
7142 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7143 let _ = req.bytes().await?;
7144 return Ok(GetGwApiV1InstructionSetsInstructionsetidResponse::InternalServerError);
7145 }
7146 let _ = req.bytes().await?;
7147 return Ok(GetGwApiV1InstructionSetsInstructionsetidResponse::Unknown);
7148 }
7149}
7150#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
7151pub struct GetGwApiV1InstructionSetsInstructionsetidRequestPath {
7152 pub instruction_set_id: i32,
7155}
7156#[serde_with::skip_serializing_none]
7157#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
7158pub struct GetGwApiV1InstructionSetsInstructionsetidRequestQuery {
7159 #[serde(rename = "client-id")]
7162 pub client_id: Option<String>,
7163}
7164#[derive(Debug, Clone)]
7166pub enum GetGwApiV1InstructionSetsInstructionsetidResponse {
7167 Ok(BulkMultiStatusResponse),
7169 NotFound,
7171 InternalServerError,
7173 Unknown,
7175}
7176#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7178pub struct GetGwApiV1InstructionsInstructionidRequest {
7179 pub path: GetGwApiV1InstructionsInstructionidRequestPath,
7180 pub query: GetGwApiV1InstructionsInstructionidRequestQuery,
7181}
7182impl GetGwApiV1InstructionsInstructionidRequest {
7183 pub async fn parse_response(
7185 req: reqwest::Response,
7186 ) -> anyhow::Result<GetGwApiV1InstructionsInstructionidResponse> {
7187 let status = req.status();
7188 if status == http::StatusCode::OK {
7189 let data =
7190 oas3_gen_support::Diagnostics::<Instruction200Response>::json_with_diagnostics(req)
7191 .await?;
7192 return Ok(GetGwApiV1InstructionsInstructionidResponse::Ok(data));
7193 }
7194 if status == http::StatusCode::NOT_FOUND {
7195 let _ = req.bytes().await?;
7196 return Ok(GetGwApiV1InstructionsInstructionidResponse::NotFound);
7197 }
7198 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7199 let _ = req.bytes().await?;
7200 return Ok(GetGwApiV1InstructionsInstructionidResponse::InternalServerError);
7201 }
7202 let _ = req.bytes().await?;
7203 return Ok(GetGwApiV1InstructionsInstructionidResponse::Unknown);
7204 }
7205}
7206#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
7207pub struct GetGwApiV1InstructionsInstructionidRequestPath {
7208 pub instruction_id: i32,
7211}
7212#[serde_with::skip_serializing_none]
7213#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
7214pub struct GetGwApiV1InstructionsInstructionidRequestQuery {
7215 #[serde(rename = "client-id")]
7218 pub client_id: Option<String>,
7219}
7220#[derive(Debug, Clone)]
7222pub enum GetGwApiV1InstructionsInstructionidResponse {
7223 Ok(Instruction200Response),
7225 NotFound,
7227 InternalServerError,
7229 Unknown,
7231}
7232#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7234pub struct GetGwApiV1ParticipatingBanksRequest {
7235 #[validate(nested)]
7236 pub query: GetGwApiV1ParticipatingBanksRequestQuery,
7237}
7238impl GetGwApiV1ParticipatingBanksRequest {
7239 pub async fn parse_response(
7241 req: reqwest::Response,
7242 ) -> anyhow::Result<GetGwApiV1ParticipatingBanksResponse> {
7243 let status = req.status();
7244 if status == http::StatusCode::OK {
7245 let data = oas3_gen_support::Diagnostics::<
7246 GetParticipatingListResponse,
7247 >::json_with_diagnostics(req)
7248 .await?;
7249 return Ok(GetGwApiV1ParticipatingBanksResponse::Ok(data));
7250 }
7251 if status == http::StatusCode::BAD_REQUEST {
7252 let _ = req.bytes().await?;
7253 return Ok(GetGwApiV1ParticipatingBanksResponse::BadRequest);
7254 }
7255 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7256 let _ = req.bytes().await?;
7257 return Ok(GetGwApiV1ParticipatingBanksResponse::InternalServerError);
7258 }
7259 let _ = req.bytes().await?;
7260 return Ok(GetGwApiV1ParticipatingBanksResponse::Unknown);
7261 }
7262}
7263#[serde_with::skip_serializing_none]
7264#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
7265pub struct GetGwApiV1ParticipatingBanksRequestQuery {
7266 #[serde(rename = "client-id")]
7269 pub client_id: Option<String>,
7270 #[serde(rename = "type")]
7272 #[validate(length(min = 1u64))]
7273 pub r#type: String,
7274}
7275#[derive(Debug, Clone)]
7277pub enum GetGwApiV1ParticipatingBanksResponse {
7278 Ok(GetParticipatingListResponse),
7280 BadRequest,
7282 InternalServerError,
7284 Unknown,
7286}
7287#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7289pub struct GetGwApiV1RequestsRequest {
7290 pub query: GetGwApiV1RequestsRequestQuery,
7291}
7292impl GetGwApiV1RequestsRequest {
7293 pub async fn parse_response(
7295 req: reqwest::Response,
7296 ) -> anyhow::Result<GetGwApiV1RequestsResponse> {
7297 let status = req.status();
7298 if status == http::StatusCode::OK {
7299 let data =
7300 oas3_gen_support::Diagnostics::<RequestDetailsResponse>::json_with_diagnostics(req)
7301 .await?;
7302 return Ok(GetGwApiV1RequestsResponse::Ok(data));
7303 }
7304 if status == http::StatusCode::BAD_REQUEST {
7305 let _ = req.bytes().await?;
7306 return Ok(GetGwApiV1RequestsResponse::BadRequest);
7307 }
7308 if status == http::StatusCode::UNAUTHORIZED {
7309 let _ = req.bytes().await?;
7310 return Ok(GetGwApiV1RequestsResponse::Unauthorized);
7311 }
7312 if status == http::StatusCode::FORBIDDEN {
7313 let _ = req.bytes().await?;
7314 return Ok(GetGwApiV1RequestsResponse::Forbidden);
7315 }
7316 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
7317 let _ = req.bytes().await?;
7318 return Ok(GetGwApiV1RequestsResponse::UnsupportedMediaType);
7319 }
7320 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7321 let _ = req.bytes().await?;
7322 return Ok(GetGwApiV1RequestsResponse::InternalServerError);
7323 }
7324 let _ = req.bytes().await?;
7325 return Ok(GetGwApiV1RequestsResponse::Unknown);
7326 }
7327}
7328#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
7329pub struct GetGwApiV1RequestsRequestQuery {
7330 #[serde(rename = "requestDetails")]
7331 pub request_details: serde_json::Value,
7332}
7333#[derive(Debug, Clone)]
7335pub enum GetGwApiV1RequestsResponse {
7336 Ok(RequestDetailsResponse),
7338 BadRequest,
7340 Unauthorized,
7342 Forbidden,
7344 UnsupportedMediaType,
7346 InternalServerError,
7348 Unknown,
7350}
7351#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7353pub struct GetGwApiV1StatementsAvailableRequest {
7354 #[validate(nested)]
7355 pub query: GetGwApiV1StatementsAvailableRequestQuery,
7356 #[validate(nested)]
7357 pub header: GetGwApiV1StatementsAvailableRequestHeader,
7358}
7359impl GetGwApiV1StatementsAvailableRequest {
7360 pub async fn parse_response(
7362 req: reqwest::Response,
7363 ) -> anyhow::Result<GetGwApiV1StatementsAvailableResponse> {
7364 let status = req.status();
7365 if status == http::StatusCode::OK {
7366 let data = oas3_gen_support::Diagnostics::<
7367 GetAvailableStmtDatesResponse,
7368 >::json_with_diagnostics(req)
7369 .await?;
7370 return Ok(GetGwApiV1StatementsAvailableResponse::Ok(data));
7371 }
7372 if status == http::StatusCode::BAD_REQUEST {
7373 let _ = req.bytes().await?;
7374 return Ok(GetGwApiV1StatementsAvailableResponse::BadRequest);
7375 }
7376 if status == http::StatusCode::UNAUTHORIZED {
7377 let _ = req.bytes().await?;
7378 return Ok(GetGwApiV1StatementsAvailableResponse::Unauthorized);
7379 }
7380 if status == http::StatusCode::PAYMENT_REQUIRED {
7381 let _ = req.bytes().await?;
7382 return Ok(GetGwApiV1StatementsAvailableResponse::PaymentRequired);
7383 }
7384 if status == http::StatusCode::FORBIDDEN {
7385 let _ = req.bytes().await?;
7386 return Ok(GetGwApiV1StatementsAvailableResponse::Forbidden);
7387 }
7388 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7389 let _ = req.bytes().await?;
7390 return Ok(GetGwApiV1StatementsAvailableResponse::InternalServerError);
7391 }
7392 let _ = req.bytes().await?;
7393 return Ok(GetGwApiV1StatementsAvailableResponse::Unknown);
7394 }
7395}
7396#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7397pub struct GetGwApiV1StatementsAvailableRequestHeader {
7398 #[validate(length(min = 1u64))]
7401 pub authorization: String,
7402}
7403impl core::convert::TryFrom<&GetGwApiV1StatementsAvailableRequestHeader> for http::HeaderMap {
7404 type Error = http::header::InvalidHeaderValue;
7405 fn try_from(
7406 headers: &GetGwApiV1StatementsAvailableRequestHeader,
7407 ) -> core::result::Result<Self, Self::Error> {
7408 let mut map = http::HeaderMap::with_capacity(1usize);
7409 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
7410 map.insert(AUTHORIZATION, header_value);
7411 Ok(map)
7412 }
7413}
7414impl core::convert::TryFrom<GetGwApiV1StatementsAvailableRequestHeader> for http::HeaderMap {
7415 type Error = http::header::InvalidHeaderValue;
7416 fn try_from(
7417 headers: GetGwApiV1StatementsAvailableRequestHeader,
7418 ) -> core::result::Result<Self, Self::Error> {
7419 http::HeaderMap::try_from(&headers)
7420 }
7421}
7422#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
7423pub struct GetGwApiV1StatementsAvailableRequestQuery {
7424 #[serde(rename = "accountId")]
7427 #[validate(length(min = 1u64))]
7428 pub account_id: String,
7429}
7430#[derive(Debug, Clone)]
7432pub enum GetGwApiV1StatementsAvailableResponse {
7433 Ok(GetAvailableStmtDatesResponse),
7435 BadRequest,
7437 Unauthorized,
7439 PaymentRequired,
7441 Forbidden,
7443 InternalServerError,
7445 Unknown,
7447}
7448#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7450pub struct GetGwApiV1TaxDocumentsAvailableRequest {
7451 #[validate(nested)]
7452 pub query: GetGwApiV1TaxDocumentsAvailableRequestQuery,
7453 #[validate(nested)]
7454 pub header: GetGwApiV1TaxDocumentsAvailableRequestHeader,
7455}
7456impl GetGwApiV1TaxDocumentsAvailableRequest {
7457 pub async fn parse_response(
7459 req: reqwest::Response,
7460 ) -> anyhow::Result<GetGwApiV1TaxDocumentsAvailableResponse> {
7461 let status = req.status();
7462 if status == http::StatusCode::OK {
7463 let data = oas3_gen_support::Diagnostics::<
7464 GetAvailableTaxFormsResponse,
7465 >::json_with_diagnostics(req)
7466 .await?;
7467 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::Ok(data));
7468 }
7469 if status == http::StatusCode::BAD_REQUEST {
7470 let _ = req.bytes().await?;
7471 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::BadRequest);
7472 }
7473 if status == http::StatusCode::UNAUTHORIZED {
7474 let _ = req.bytes().await?;
7475 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::Unauthorized);
7476 }
7477 if status == http::StatusCode::PAYMENT_REQUIRED {
7478 let _ = req.bytes().await?;
7479 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::PaymentRequired);
7480 }
7481 if status == http::StatusCode::FORBIDDEN {
7482 let _ = req.bytes().await?;
7483 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::Forbidden);
7484 }
7485 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7486 let _ = req.bytes().await?;
7487 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::InternalServerError);
7488 }
7489 let _ = req.bytes().await?;
7490 return Ok(GetGwApiV1TaxDocumentsAvailableResponse::Unknown);
7491 }
7492}
7493#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7494pub struct GetGwApiV1TaxDocumentsAvailableRequestHeader {
7495 #[validate(length(min = 1u64))]
7498 pub authorization: String,
7499}
7500impl core::convert::TryFrom<&GetGwApiV1TaxDocumentsAvailableRequestHeader> for http::HeaderMap {
7501 type Error = http::header::InvalidHeaderValue;
7502 fn try_from(
7503 headers: &GetGwApiV1TaxDocumentsAvailableRequestHeader,
7504 ) -> core::result::Result<Self, Self::Error> {
7505 let mut map = http::HeaderMap::with_capacity(1usize);
7506 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
7507 map.insert(AUTHORIZATION, header_value);
7508 Ok(map)
7509 }
7510}
7511impl core::convert::TryFrom<GetGwApiV1TaxDocumentsAvailableRequestHeader> for http::HeaderMap {
7512 type Error = http::header::InvalidHeaderValue;
7513 fn try_from(
7514 headers: GetGwApiV1TaxDocumentsAvailableRequestHeader,
7515 ) -> core::result::Result<Self, Self::Error> {
7516 http::HeaderMap::try_from(&headers)
7517 }
7518}
7519#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
7520pub struct GetGwApiV1TaxDocumentsAvailableRequestQuery {
7521 #[serde(rename = "accountId")]
7524 #[validate(length(min = 1u64))]
7525 pub account_id: String,
7526 pub year: i32,
7529}
7530#[derive(Debug, Clone)]
7532pub enum GetGwApiV1TaxDocumentsAvailableResponse {
7533 Ok(GetAvailableTaxFormsResponse),
7535 BadRequest,
7537 Unauthorized,
7539 PaymentRequired,
7541 Forbidden,
7543 InternalServerError,
7545 Unknown,
7547}
7548#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7550pub struct GetGwApiV1TradeConfirmationsAvailableRequest {
7551 #[validate(nested)]
7552 pub query: GetGwApiV1TradeConfirmationsAvailableRequestQuery,
7553 #[validate(nested)]
7554 pub header: GetGwApiV1TradeConfirmationsAvailableRequestHeader,
7555}
7556impl GetGwApiV1TradeConfirmationsAvailableRequest {
7557 pub async fn parse_response(
7559 req: reqwest::Response,
7560 ) -> anyhow::Result<GetGwApiV1TradeConfirmationsAvailableResponse> {
7561 let status = req.status();
7562 if status == http::StatusCode::OK {
7563 let data = oas3_gen_support::Diagnostics::<
7564 GetAvailableTradeConfirmationDatesResponse,
7565 >::json_with_diagnostics(req)
7566 .await?;
7567 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::Ok(data));
7568 }
7569 if status == http::StatusCode::BAD_REQUEST {
7570 let _ = req.bytes().await?;
7571 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::BadRequest);
7572 }
7573 if status == http::StatusCode::UNAUTHORIZED {
7574 let _ = req.bytes().await?;
7575 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::Unauthorized);
7576 }
7577 if status == http::StatusCode::PAYMENT_REQUIRED {
7578 let _ = req.bytes().await?;
7579 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::PaymentRequired);
7580 }
7581 if status == http::StatusCode::FORBIDDEN {
7582 let _ = req.bytes().await?;
7583 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::Forbidden);
7584 }
7585 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7586 let _ = req.bytes().await?;
7587 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::InternalServerError);
7588 }
7589 let _ = req.bytes().await?;
7590 return Ok(GetGwApiV1TradeConfirmationsAvailableResponse::Unknown);
7591 }
7592}
7593#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7594pub struct GetGwApiV1TradeConfirmationsAvailableRequestHeader {
7595 #[validate(length(min = 1u64))]
7598 pub authorization: String,
7599}
7600impl core::convert::TryFrom<&GetGwApiV1TradeConfirmationsAvailableRequestHeader>
7601 for http::HeaderMap
7602{
7603 type Error = http::header::InvalidHeaderValue;
7604 fn try_from(
7605 headers: &GetGwApiV1TradeConfirmationsAvailableRequestHeader,
7606 ) -> core::result::Result<Self, Self::Error> {
7607 let mut map = http::HeaderMap::with_capacity(1usize);
7608 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
7609 map.insert(AUTHORIZATION, header_value);
7610 Ok(map)
7611 }
7612}
7613impl core::convert::TryFrom<GetGwApiV1TradeConfirmationsAvailableRequestHeader>
7614 for http::HeaderMap
7615{
7616 type Error = http::header::InvalidHeaderValue;
7617 fn try_from(
7618 headers: GetGwApiV1TradeConfirmationsAvailableRequestHeader,
7619 ) -> core::result::Result<Self, Self::Error> {
7620 http::HeaderMap::try_from(&headers)
7621 }
7622}
7623#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
7624pub struct GetGwApiV1TradeConfirmationsAvailableRequestQuery {
7625 #[serde(rename = "accountId")]
7628 #[validate(length(min = 1u64))]
7629 pub account_id: String,
7630}
7631#[derive(Debug, Clone)]
7633pub enum GetGwApiV1TradeConfirmationsAvailableResponse {
7634 Ok(GetAvailableTradeConfirmationDatesResponse),
7636 BadRequest,
7638 Unauthorized,
7640 PaymentRequired,
7642 Forbidden,
7644 InternalServerError,
7646 Unknown,
7648}
7649#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7651pub struct GetGwApiV1ValidationsUsernamesUsernameRequest {
7652 #[validate(nested)]
7653 pub path: GetGwApiV1ValidationsUsernamesUsernameRequestPath,
7654}
7655impl GetGwApiV1ValidationsUsernamesUsernameRequest {
7656 pub async fn parse_response(
7658 req: reqwest::Response,
7659 ) -> anyhow::Result<GetGwApiV1ValidationsUsernamesUsernameResponse> {
7660 let status = req.status();
7661 if status == http::StatusCode::OK {
7662 let data =
7663 oas3_gen_support::Diagnostics::<UserNameAvailableResponse>::json_with_diagnostics(
7664 req,
7665 )
7666 .await?;
7667 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::Ok(data));
7668 }
7669 if status == http::StatusCode::BAD_REQUEST {
7670 let _ = req.bytes().await?;
7671 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::BadRequest);
7672 }
7673 if status == http::StatusCode::UNAUTHORIZED {
7674 let _ = req.bytes().await?;
7675 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::Unauthorized);
7676 }
7677 if status == http::StatusCode::FORBIDDEN {
7678 let _ = req.bytes().await?;
7679 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::Forbidden);
7680 }
7681 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
7682 let _ = req.bytes().await?;
7683 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::UnsupportedMediaType);
7684 }
7685 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7686 let _ = req.bytes().await?;
7687 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::InternalServerError);
7688 }
7689 let _ = req.bytes().await?;
7690 return Ok(GetGwApiV1ValidationsUsernamesUsernameResponse::Unknown);
7691 }
7692}
7693#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7694pub struct GetGwApiV1ValidationsUsernamesUsernameRequestPath {
7695 #[validate(length(min = 1u64))]
7696 pub username: String,
7697}
7698#[derive(Debug, Clone)]
7700pub enum GetGwApiV1ValidationsUsernamesUsernameResponse {
7701 Ok(UserNameAvailableResponse),
7703 BadRequest,
7705 Unauthorized,
7707 Forbidden,
7709 UnsupportedMediaType,
7711 InternalServerError,
7713 Unknown,
7715}
7716#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7718pub struct GetInfoAndRulesRequest {
7719 #[validate(nested)]
7720 pub path: GetInfoAndRulesRequestPath,
7721}
7722impl GetInfoAndRulesRequest {
7723 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetInfoAndRulesResponse> {
7725 let status = req.status();
7726 if status == http::StatusCode::OK {
7727 let data = oas3_gen_support::Diagnostics::<Rule200Response>::json_with_diagnostics(req)
7728 .await?;
7729 return Ok(GetInfoAndRulesResponse::Ok(data));
7730 }
7731 if status == http::StatusCode::UNAUTHORIZED {
7732 let _ = req.bytes().await?;
7733 return Ok(GetInfoAndRulesResponse::Unauthorized);
7734 }
7735 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7736 let _ = req.bytes().await?;
7737 return Ok(GetInfoAndRulesResponse::InternalServerError);
7738 }
7739 if status == http::StatusCode::SERVICE_UNAVAILABLE {
7740 let _ = req.bytes().await?;
7741 return Ok(GetInfoAndRulesResponse::ServiceUnavailable);
7742 }
7743 let _ = req.bytes().await?;
7744 return Ok(GetInfoAndRulesResponse::Unknown);
7745 }
7746}
7747#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7748pub struct GetInfoAndRulesRequestPath {
7749 #[validate(length(min = 1u64))]
7752 pub conid: String,
7753}
7754#[derive(Debug, Clone)]
7756pub enum GetInfoAndRulesResponse {
7757 Ok(Rule200Response),
7759 Unauthorized,
7761 InternalServerError,
7764 ServiceUnavailable,
7767 Unknown,
7769}
7770#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7772pub struct GetInstrumentDefinitionRequest {
7773 #[validate(nested)]
7774 pub query: GetInstrumentDefinitionRequestQuery,
7775}
7776impl GetInstrumentDefinitionRequest {
7777 pub async fn parse_response(
7779 req: reqwest::Response,
7780 ) -> anyhow::Result<GetInstrumentDefinitionResponse> {
7781 let status = req.status();
7782 if status == http::StatusCode::OK {
7783 let data =
7784 oas3_gen_support::Diagnostics::<TrsrvSecDefResponse>::json_with_diagnostics(req)
7785 .await?;
7786 return Ok(GetInstrumentDefinitionResponse::Ok(data));
7787 }
7788 if status == http::StatusCode::BAD_REQUEST {
7789 let _ = req.bytes().await?;
7790 return Ok(GetInstrumentDefinitionResponse::BadRequest);
7791 }
7792 if status == http::StatusCode::UNAUTHORIZED {
7793 let _ = req.bytes().await?;
7794 return Ok(GetInstrumentDefinitionResponse::Unauthorized);
7795 }
7796 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7797 let _ = req.bytes().await?;
7798 return Ok(GetInstrumentDefinitionResponse::InternalServerError);
7799 }
7800 if status == http::StatusCode::SERVICE_UNAVAILABLE {
7801 let _ = req.bytes().await?;
7802 return Ok(GetInstrumentDefinitionResponse::ServiceUnavailable);
7803 }
7804 let _ = req.bytes().await?;
7805 return Ok(GetInstrumentDefinitionResponse::Unknown);
7806 }
7807}
7808#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
7809pub struct GetInstrumentDefinitionRequestQuery {
7810 #[validate(length(min = 1u64))]
7813 pub conids: String,
7814}
7815#[derive(Debug, Clone)]
7817pub enum GetInstrumentDefinitionResponse {
7818 Ok(TrsrvSecDefResponse),
7820 BadRequest,
7822 Unauthorized,
7824 InternalServerError,
7827 ServiceUnavailable,
7830 Unknown,
7832}
7833#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7835pub struct GetInstrumentInfoRequest {
7836 #[validate(nested)]
7837 pub path: GetInstrumentInfoRequestPath,
7838}
7839impl GetInstrumentInfoRequest {
7840 pub async fn parse_response(
7842 req: reqwest::Response,
7843 ) -> anyhow::Result<GetInstrumentInfoResponse> {
7844 let status = req.status();
7845 if status == http::StatusCode::OK {
7846 let data =
7847 oas3_gen_support::Diagnostics::<ContractInfo>::json_with_diagnostics(req).await?;
7848 return Ok(GetInstrumentInfoResponse::Ok(data));
7849 }
7850 if status == http::StatusCode::UNAUTHORIZED {
7851 let _ = req.bytes().await?;
7852 return Ok(GetInstrumentInfoResponse::Unauthorized);
7853 }
7854 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7855 let _ = req.bytes().await?;
7856 return Ok(GetInstrumentInfoResponse::InternalServerError);
7857 }
7858 if status == http::StatusCode::SERVICE_UNAVAILABLE {
7859 let _ = req.bytes().await?;
7860 return Ok(GetInstrumentInfoResponse::ServiceUnavailable);
7861 }
7862 let _ = req.bytes().await?;
7863 return Ok(GetInstrumentInfoResponse::Unknown);
7864 }
7865}
7866#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
7867pub struct GetInstrumentInfoRequestPath {
7868 #[validate(length(min = 1u64))]
7871 pub conid: String,
7872}
7873#[derive(Debug, Clone)]
7875pub enum GetInstrumentInfoResponse {
7876 Ok(ContractInfo),
7878 Unauthorized,
7880 InternalServerError,
7883 ServiceUnavailable,
7886 Unknown,
7888}
7889#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7891pub struct GetInvestedAccountsInModelRequest {
7892 pub body: PositionRequestBody,
7893}
7894impl GetInvestedAccountsInModelRequest {
7895 pub async fn parse_response(
7897 req: reqwest::Response,
7898 ) -> anyhow::Result<GetInvestedAccountsInModelResponse> {
7899 let status = req.status();
7900 if status == http::StatusCode::OK {
7901 let data =
7902 oas3_gen_support::Diagnostics::<GetInvestedAccountsSummary>::json_with_diagnostics(
7903 req,
7904 )
7905 .await?;
7906 return Ok(GetInvestedAccountsInModelResponse::Ok(data));
7907 }
7908 if status == http::StatusCode::UNAUTHORIZED {
7909 let _ = req.bytes().await?;
7910 return Ok(GetInvestedAccountsInModelResponse::Unauthorized);
7911 }
7912 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
7913 let _ = req.bytes().await?;
7914 return Ok(GetInvestedAccountsInModelResponse::InternalServerError);
7915 }
7916 if status == http::StatusCode::SERVICE_UNAVAILABLE {
7917 let _ = req.bytes().await?;
7918 return Ok(GetInvestedAccountsInModelResponse::ServiceUnavailable);
7919 }
7920 let _ = req.bytes().await?;
7921 return Ok(GetInvestedAccountsInModelResponse::Unknown);
7922 }
7923}
7924#[derive(Debug, Clone)]
7926pub enum GetInvestedAccountsInModelResponse {
7927 Ok(GetInvestedAccountsSummary),
7929 Unauthorized,
7931 InternalServerError,
7934 ServiceUnavailable,
7937 Unknown,
7939}
7940#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
7941pub struct GetInvestedAccountsSummary {
7942 #[serde(rename = "accountList")]
7944 pub account_list: Option<Vec<GetInvestedAccountsSummaryAccountList>>,
7945 #[serde(rename = "baseCcyMaster")]
7947 pub base_ccy_master: Option<String>,
7948 #[serde(rename = "baseCcyMasterPrecision")]
7950 pub base_ccy_master_precision: Option<String>,
7951 pub model: Option<String>,
7953 #[serde(rename = "reqID")]
7955 pub req_id: Option<i32>,
7956 #[serde(rename = "subscriptionStatus")]
7958 pub subscription_status: Option<AlertActivationRequestAlertActive>,
7959}
7960#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
7961pub struct GetInvestedAccountsSummaryAccountList {
7962 pub account: Option<String>,
7964 #[serde(rename = "accountModelNlv")]
7966 pub account_model_nlv: Option<String>,
7967 #[serde(rename = "accountOtherModelsNlv")]
7969 pub account_other_models_nlv: Option<String>,
7970 pub alias: Option<String>,
7972 #[serde(rename = "baseCcyAccount")]
7974 pub base_ccy_account: Option<String>,
7975 #[serde(rename = "baseCcyAccountPrecision")]
7977 pub base_ccy_account_precision: Option<String>,
7978 #[serde(rename = "cashInIndependentNlv")]
7980 pub cash_in_independent_nlv: Option<String>,
7981 #[serde(rename = "exchangeRate")]
7983 pub exchange_rate: Option<f64>,
7984 pub nlv: Option<String>,
7986 #[serde(rename = "positionsInIndependentNlv")]
7988 pub positions_in_independent_nlv: Option<String>,
7989}
7990#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
7992pub struct GetManySubaccountsRequest {
7993 pub query: GetManySubaccountsRequestQuery,
7994}
7995impl GetManySubaccountsRequest {
7996 pub async fn parse_response(
7998 req: reqwest::Response,
7999 ) -> anyhow::Result<GetManySubaccountsResponse> {
8000 let status = req.status();
8001 if status == http::StatusCode::OK {
8002 let data =
8003 oas3_gen_support::Diagnostics::<Subaccounts2Response>::json_with_diagnostics(req)
8004 .await?;
8005 return Ok(GetManySubaccountsResponse::Ok(data));
8006 }
8007 if status == http::StatusCode::UNAUTHORIZED {
8008 let _ = req.bytes().await?;
8009 return Ok(GetManySubaccountsResponse::Unauthorized);
8010 }
8011 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8012 let _ = req.bytes().await?;
8013 return Ok(GetManySubaccountsResponse::InternalServerError);
8014 }
8015 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8016 let _ = req.bytes().await?;
8017 return Ok(GetManySubaccountsResponse::ServiceUnavailable);
8018 }
8019 let _ = req.bytes().await?;
8020 return Ok(GetManySubaccountsResponse::Unknown);
8021 }
8022}
8023#[serde_with::skip_serializing_none]
8024#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
8025pub struct GetManySubaccountsRequestQuery {
8026 #[serde(rename = "accountId")]
8029 pub account_id: Option<String>,
8030 #[default(Some(false))]
8032 pub nocache: Option<bool>,
8033}
8034#[derive(Debug, Clone)]
8036pub enum GetManySubaccountsResponse {
8037 Ok(Subaccounts2Response),
8039 Unauthorized,
8041 InternalServerError,
8044 ServiceUnavailable,
8047 Unknown,
8049}
8050#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8052pub struct GetMarginSummaryRequest {
8053 #[validate(nested)]
8054 pub path: GetMarginSummaryRequestPath,
8055}
8056impl GetMarginSummaryRequest {
8057 pub async fn parse_response(
8059 req: reqwest::Response,
8060 ) -> anyhow::Result<GetMarginSummaryResponse> {
8061 let status = req.status();
8062 if status == http::StatusCode::OK {
8063 let data = oas3_gen_support::Diagnostics::<
8064 SummaryOfAccountMarginResponse,
8065 >::json_with_diagnostics(req)
8066 .await?;
8067 return Ok(GetMarginSummaryResponse::Ok(data));
8068 }
8069 if status == http::StatusCode::BAD_REQUEST {
8070 let _ = req.bytes().await?;
8071 return Ok(GetMarginSummaryResponse::BadRequest);
8072 }
8073 if status == http::StatusCode::UNAUTHORIZED {
8074 let _ = req.bytes().await?;
8075 return Ok(GetMarginSummaryResponse::Unauthorized);
8076 }
8077 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8078 let _ = req.bytes().await?;
8079 return Ok(GetMarginSummaryResponse::ServiceUnavailable);
8080 }
8081 let _ = req.bytes().await?;
8082 return Ok(GetMarginSummaryResponse::Unknown);
8083 }
8084}
8085#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
8086pub struct GetMarginSummaryRequestPath {
8087 #[validate(length(min = 1u64))]
8090 pub account_id: String,
8091}
8092#[derive(Debug, Clone)]
8094pub enum GetMarginSummaryResponse {
8095 Ok(SummaryOfAccountMarginResponse),
8097 BadRequest,
8099 Unauthorized,
8101 ServiceUnavailable,
8104 Unknown,
8106}
8107#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8109pub struct GetMdHistoryRequest {
8110 #[validate(nested)]
8111 pub query: GetMdHistoryRequestQuery,
8112}
8113impl GetMdHistoryRequest {
8114 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetMdHistoryResponse> {
8116 let status = req.status();
8117 if status == http::StatusCode::OK {
8118 let data =
8119 oas3_gen_support::Diagnostics::<History200Response>::json_with_diagnostics(req)
8120 .await?;
8121 return Ok(GetMdHistoryResponse::Ok(data));
8122 }
8123 if status == http::StatusCode::BAD_REQUEST {
8124 let _ = req.bytes().await?;
8125 return Ok(GetMdHistoryResponse::BadRequest);
8126 }
8127 if status == http::StatusCode::UNAUTHORIZED {
8128 let _ = req.bytes().await?;
8129 return Ok(GetMdHistoryResponse::Unauthorized);
8130 }
8131 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8132 let _ = req.bytes().await?;
8133 return Ok(GetMdHistoryResponse::InternalServerError);
8134 }
8135 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8136 let _ = req.bytes().await?;
8137 return Ok(GetMdHistoryResponse::ServiceUnavailable);
8138 }
8139 let _ = req.bytes().await?;
8140 return Ok(GetMdHistoryResponse::Unknown);
8141 }
8142}
8143#[serde_with::skip_serializing_none]
8144#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
8145pub struct GetMdHistoryRequestQuery {
8146 pub conid: i32,
8149 #[validate(length(min = 1u64))]
8158 #[default("1d".to_string())]
8159 pub period: String,
8160 #[validate(length(min = 1u64))]
8169 #[default("1min".to_string())]
8170 pub bar: String,
8171 pub exchange: Option<String>,
8174 #[serde(rename = "outsideRth")]
8176 #[default(Some(false))]
8177 pub outside_rth: Option<bool>,
8178 #[serde(rename = "startTime")]
8181 pub start_time: Option<String>,
8182 #[default(Some(Default::default()))]
8186 pub direction: Option<GetMdHistoryRequestQueryDirection>,
8187 #[default(Some("Last".to_string()))]
8193 pub source: Option<String>,
8194}
8195#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
8196pub enum GetMdHistoryRequestQueryDirection {
8197 #[serde(rename = "-1")]
8198 #[default]
8199 Value_1,
8200 #[serde(rename = "1")]
8201 Value1,
8202}
8203impl core::fmt::Display for GetMdHistoryRequestQueryDirection {
8204 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8205 match self {
8206 Self::Value_1 => write!(f, "-1"),
8207 Self::Value1 => write!(f, "1"),
8208 }
8209 }
8210}
8211#[derive(Debug, Clone)]
8213pub enum GetMdHistoryResponse {
8214 Ok(History200Response),
8216 BadRequest,
8218 Unauthorized,
8220 InternalServerError,
8223 ServiceUnavailable,
8226 Unknown,
8228}
8229#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8231pub struct GetMdSnapshotRequest {
8232 pub query: GetMdSnapshotRequestQuery,
8233}
8234impl GetMdSnapshotRequest {
8235 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetMdSnapshotResponse> {
8237 let status = req.status();
8238 if status == http::StatusCode::OK {
8239 let data = oas3_gen_support::Diagnostics::<IserverSnapshot>::json_with_diagnostics(req)
8240 .await?;
8241 return Ok(GetMdSnapshotResponse::Ok(data));
8242 }
8243 if status == http::StatusCode::BAD_REQUEST {
8244 let _ = req.bytes().await?;
8245 return Ok(GetMdSnapshotResponse::BadRequest);
8246 }
8247 if status == http::StatusCode::UNAUTHORIZED {
8248 let _ = req.bytes().await?;
8249 return Ok(GetMdSnapshotResponse::Unauthorized);
8250 }
8251 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8252 let _ = req.bytes().await?;
8253 return Ok(GetMdSnapshotResponse::InternalServerError);
8254 }
8255 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8256 let _ = req.bytes().await?;
8257 return Ok(GetMdSnapshotResponse::ServiceUnavailable);
8258 }
8259 let _ = req.bytes().await?;
8260 return Ok(GetMdSnapshotResponse::Unknown);
8261 }
8262}
8263#[serde_with::skip_serializing_none]
8264#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
8265pub struct GetMdSnapshotRequestQuery {
8266 pub conids: i32,
8269 pub fields: Option<MdFields>,
8383}
8384#[derive(Debug, Clone)]
8386pub enum GetMdSnapshotResponse {
8387 Ok(IserverSnapshot),
8389 BadRequest,
8391 Unauthorized,
8393 InternalServerError,
8396 ServiceUnavailable,
8399 Unknown,
8401}
8402#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8404pub struct GetModelPresetsRequest {
8405 pub body: ReqIDRequestBody,
8406}
8407impl GetModelPresetsRequest {
8408 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetModelPresetsResponse> {
8410 let status = req.status();
8411 if status == http::StatusCode::OK {
8412 let data =
8413 oas3_gen_support::Diagnostics::<ModelPresetsResponse>::json_with_diagnostics(req)
8414 .await?;
8415 return Ok(GetModelPresetsResponse::Ok(data));
8416 }
8417 if status == http::StatusCode::UNAUTHORIZED {
8418 let _ = req.bytes().await?;
8419 return Ok(GetModelPresetsResponse::Unauthorized);
8420 }
8421 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8422 let _ = req.bytes().await?;
8423 return Ok(GetModelPresetsResponse::InternalServerError);
8424 }
8425 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8426 let _ = req.bytes().await?;
8427 return Ok(GetModelPresetsResponse::ServiceUnavailable);
8428 }
8429 let _ = req.bytes().await?;
8430 return Ok(GetModelPresetsResponse::Unknown);
8431 }
8432}
8433#[derive(Debug, Clone)]
8435pub enum GetModelPresetsResponse {
8436 Ok(ModelPresetsResponse),
8438 Unauthorized,
8440 InternalServerError,
8443 ServiceUnavailable,
8446 Unknown,
8448}
8449#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8451pub struct GetModelSummarySingleRequest {
8452 pub body: SummaryRequestBody,
8453}
8454impl GetModelSummarySingleRequest {
8455 pub async fn parse_response(
8457 req: reqwest::Response,
8458 ) -> anyhow::Result<GetModelSummarySingleResponse> {
8459 let status = req.status();
8460 if status == http::StatusCode::OK {
8461 let data =
8462 oas3_gen_support::Diagnostics::<ModelSummaryResponse>::json_with_diagnostics(req)
8463 .await?;
8464 return Ok(GetModelSummarySingleResponse::Ok(data));
8465 }
8466 if status == http::StatusCode::UNAUTHORIZED {
8467 let _ = req.bytes().await?;
8468 return Ok(GetModelSummarySingleResponse::Unauthorized);
8469 }
8470 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8471 let _ = req.bytes().await?;
8472 return Ok(GetModelSummarySingleResponse::InternalServerError);
8473 }
8474 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8475 let _ = req.bytes().await?;
8476 return Ok(GetModelSummarySingleResponse::ServiceUnavailable);
8477 }
8478 let _ = req.bytes().await?;
8479 return Ok(GetModelSummarySingleResponse::Unknown);
8480 }
8481}
8482#[derive(Debug, Clone)]
8484pub enum GetModelSummarySingleResponse {
8485 Ok(ModelSummaryResponse),
8487 Unauthorized,
8489 InternalServerError,
8492 ServiceUnavailable,
8495 Unknown,
8497}
8498#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8500pub struct GetMtaDetailsRequest {}
8501impl GetMtaDetailsRequest {
8502 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetMtaDetailsResponse> {
8504 let status = req.status();
8505 if status == http::StatusCode::OK {
8506 let data =
8507 oas3_gen_support::Diagnostics::<AlertDetails>::json_with_diagnostics(req).await?;
8508 return Ok(GetMtaDetailsResponse::Ok(data));
8509 }
8510 let _ = req.bytes().await?;
8511 return Ok(GetMtaDetailsResponse::Unknown);
8512 }
8513}
8514#[derive(Debug, Clone)]
8516pub enum GetMtaDetailsResponse {
8517 Ok(AlertDetails),
8519 Unknown,
8521}
8522#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8524pub struct GetOpenOrdersRequest {
8525 pub query: GetOpenOrdersRequestQuery,
8526}
8527impl GetOpenOrdersRequest {
8528 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetOpenOrdersResponse> {
8530 let status = req.status();
8531 if status == http::StatusCode::OK {
8532 let data =
8533 oas3_gen_support::Diagnostics::<LiveOrdersResponse>::json_with_diagnostics(req)
8534 .await?;
8535 return Ok(GetOpenOrdersResponse::Ok(data));
8536 }
8537 if status == http::StatusCode::UNAUTHORIZED {
8538 let _ = req.bytes().await?;
8539 return Ok(GetOpenOrdersResponse::Unauthorized);
8540 }
8541 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8542 let _ = req.bytes().await?;
8543 return Ok(GetOpenOrdersResponse::InternalServerError);
8544 }
8545 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8546 let _ = req.bytes().await?;
8547 return Ok(GetOpenOrdersResponse::ServiceUnavailable);
8548 }
8549 let _ = req.bytes().await?;
8550 return Ok(GetOpenOrdersResponse::Unknown);
8551 }
8552}
8553#[serde_with::skip_serializing_none]
8554#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
8555pub struct GetOpenOrdersRequestQuery {
8556 pub filters: Option<GetOpenOrdersRequestQueryFilters>,
8559 pub force: Option<bool>,
8561}
8562#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
8563pub enum GetOpenOrdersRequestQueryFilters {
8564 #[serde(rename = "inactive")]
8565 #[default]
8566 Inactive,
8567 #[serde(rename = "pending_submit")]
8568 PendingSubmit,
8569 #[serde(rename = "pre_submitted")]
8570 PreSubmitted,
8571 #[serde(rename = "submitted")]
8572 Submitted,
8573 #[serde(rename = "filled")]
8574 Filled,
8575 #[serde(rename = "pending_cancel")]
8576 PendingCancel,
8577 #[serde(rename = "cancelled")]
8578 Cancelled,
8579 #[serde(rename = "warn_state")]
8580 WarnState,
8581 #[serde(rename = "sort_by_time")]
8582 SortByTime,
8583}
8584impl core::fmt::Display for GetOpenOrdersRequestQueryFilters {
8585 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8586 match self {
8587 Self::Inactive => write!(f, "inactive"),
8588 Self::PendingSubmit => write!(f, "pending_submit"),
8589 Self::PreSubmitted => write!(f, "pre_submitted"),
8590 Self::Submitted => write!(f, "submitted"),
8591 Self::Filled => write!(f, "filled"),
8592 Self::PendingCancel => write!(f, "pending_cancel"),
8593 Self::Cancelled => write!(f, "cancelled"),
8594 Self::WarnState => write!(f, "warn_state"),
8595 Self::SortByTime => write!(f, "sort_by_time"),
8596 }
8597 }
8598}
8599#[derive(Debug, Clone)]
8601pub enum GetOpenOrdersResponse {
8602 Ok(LiveOrdersResponse),
8604 Unauthorized,
8606 InternalServerError,
8609 ServiceUnavailable,
8612 Unknown,
8614}
8615#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8617pub struct GetOrderStatusRequest {
8618 pub path: GetOrderStatusRequestPath,
8619}
8620impl GetOrderStatusRequest {
8621 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetOrderStatusResponse> {
8623 let status = req.status();
8624 if status == http::StatusCode::OK {
8625 let _ = req.bytes().await?;
8626 return Ok(GetOrderStatusResponse::Ok);
8627 }
8628 if status == http::StatusCode::BAD_REQUEST {
8629 let _ = req.bytes().await?;
8630 return Ok(GetOrderStatusResponse::BadRequest);
8631 }
8632 if status == http::StatusCode::UNAUTHORIZED {
8633 let _ = req.bytes().await?;
8634 return Ok(GetOrderStatusResponse::Unauthorized);
8635 }
8636 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8637 let _ = req.bytes().await?;
8638 return Ok(GetOrderStatusResponse::InternalServerError);
8639 }
8640 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8641 let _ = req.bytes().await?;
8642 return Ok(GetOrderStatusResponse::ServiceUnavailable);
8643 }
8644 let _ = req.bytes().await?;
8645 return Ok(GetOrderStatusResponse::Unknown);
8646 }
8647}
8648#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
8649pub struct GetOrderStatusRequestPath {
8650 pub order_id: i32,
8653}
8654#[derive(Debug, Clone)]
8656pub enum GetOrderStatusResponse {
8657 Ok,
8659 BadRequest,
8661 Unauthorized,
8663 InternalServerError,
8666 ServiceUnavailable,
8669 Unknown,
8671}
8672#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8674pub struct GetPaginatedPositionsRequest {
8675 #[validate(nested)]
8676 pub path: GetPaginatedPositionsRequestPath,
8677 pub query: GetPaginatedPositionsRequestQuery,
8678}
8679impl GetPaginatedPositionsRequest {
8680 pub async fn parse_response(
8682 req: reqwest::Response,
8683 ) -> anyhow::Result<GetPaginatedPositionsResponse> {
8684 let status = req.status();
8685 if status == http::StatusCode::OK {
8686 let data =
8687 oas3_gen_support::Diagnostics::<Position200Response2>::json_with_diagnostics(req)
8688 .await?;
8689 return Ok(GetPaginatedPositionsResponse::Ok(data));
8690 }
8691 if status == http::StatusCode::BAD_REQUEST {
8692 let _ = req.bytes().await?;
8693 return Ok(GetPaginatedPositionsResponse::BadRequest);
8694 }
8695 if status == http::StatusCode::UNAUTHORIZED {
8696 let _ = req.bytes().await?;
8697 return Ok(GetPaginatedPositionsResponse::Unauthorized);
8698 }
8699 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8700 let _ = req.bytes().await?;
8701 return Ok(GetPaginatedPositionsResponse::InternalServerError);
8702 }
8703 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8704 let _ = req.bytes().await?;
8705 return Ok(GetPaginatedPositionsResponse::ServiceUnavailable);
8706 }
8707 let _ = req.bytes().await?;
8708 return Ok(GetPaginatedPositionsResponse::Unknown);
8709 }
8710}
8711#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
8712pub struct GetPaginatedPositionsRequestPath {
8713 #[validate(length(min = 1u64))]
8716 pub account_id: String,
8717 pub page_id: i32,
8720}
8721#[serde_with::skip_serializing_none]
8722#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
8723pub struct GetPaginatedPositionsRequestQuery {
8724 pub model: Option<serde_json::Value>,
8726 pub sort: Option<serde_json::Value>,
8729 pub direction: Option<serde_json::Value>,
8732 #[serde(rename = "waitForSecDef")]
8734 pub wait_for_sec_def: Option<bool>,
8735}
8736#[derive(Debug, Clone)]
8738pub enum GetPaginatedPositionsResponse {
8739 Ok(Position200Response2),
8741 BadRequest,
8743 Unauthorized,
8745 InternalServerError,
8748 ServiceUnavailable,
8751 Unknown,
8753}
8754#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
8755pub struct GetParticipatingListResponse {
8756 #[serde(rename = "participatingBanks")]
8757 pub participating_banks: Vec<GetParticipatingListResponseParticipatingBank>,
8758 #[serde(rename = "type")]
8760 pub r#type: String,
8761}
8762#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
8763pub struct GetParticipatingListResponseParticipatingBank {
8764 #[serde(rename = "BIC")]
8766 pub bic: String,
8767 #[serde(rename = "clearingCode")]
8769 pub clearing_code: String,
8770 #[serde(rename = "institutionName")]
8772 pub institution_name: String,
8773}
8774#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8776pub struct GetPerformanceAllPeriodsRequest {
8777 pub query: GetPerformanceAllPeriodsRequestQuery,
8778 pub body: AcctIdRequestBody3,
8779}
8780impl GetPerformanceAllPeriodsRequest {
8781 pub async fn parse_response(
8783 req: reqwest::Response,
8784 ) -> anyhow::Result<GetPerformanceAllPeriodsResponse> {
8785 let status = req.status();
8786 if status == http::StatusCode::OK {
8787 let data = oas3_gen_support::Diagnostics::<
8788 DetailedContractInformation,
8789 >::json_with_diagnostics(req)
8790 .await?;
8791 return Ok(GetPerformanceAllPeriodsResponse::Ok(data));
8792 }
8793 if status == http::StatusCode::BAD_REQUEST {
8794 let _ = req.bytes().await?;
8795 return Ok(GetPerformanceAllPeriodsResponse::BadRequest);
8796 }
8797 if status == http::StatusCode::UNAUTHORIZED {
8798 let _ = req.bytes().await?;
8799 return Ok(GetPerformanceAllPeriodsResponse::Unauthorized);
8800 }
8801 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8802 let _ = req.bytes().await?;
8803 return Ok(GetPerformanceAllPeriodsResponse::InternalServerError);
8804 }
8805 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8806 let _ = req.bytes().await?;
8807 return Ok(GetPerformanceAllPeriodsResponse::ServiceUnavailable);
8808 }
8809 let _ = req.bytes().await?;
8810 return Ok(GetPerformanceAllPeriodsResponse::Unknown);
8811 }
8812}
8813#[serde_with::skip_serializing_none]
8814#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
8815pub struct GetPerformanceAllPeriodsRequestQuery {
8816 pub param: Option<String>,
8818}
8819#[derive(Debug, Clone)]
8821pub enum GetPerformanceAllPeriodsResponse {
8822 Ok(DetailedContractInformation),
8824 BadRequest,
8826 Unauthorized,
8828 InternalServerError,
8831 ServiceUnavailable,
8834 Unknown,
8836}
8837#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8839pub struct GetPnlRequest {}
8840impl GetPnlRequest {
8841 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetPnlResponse> {
8843 let status = req.status();
8844 if status == http::StatusCode::OK {
8845 let data =
8846 oas3_gen_support::Diagnostics::<PnlPartitionedResponse>::json_with_diagnostics(req)
8847 .await?;
8848 return Ok(GetPnlResponse::Ok(data));
8849 }
8850 if status == http::StatusCode::BAD_REQUEST {
8851 let _ = req.bytes().await?;
8852 return Ok(GetPnlResponse::BadRequest);
8853 }
8854 if status == http::StatusCode::UNAUTHORIZED {
8855 let _ = req.bytes().await?;
8856 return Ok(GetPnlResponse::Unauthorized);
8857 }
8858 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8859 let _ = req.bytes().await?;
8860 return Ok(GetPnlResponse::ServiceUnavailable);
8861 }
8862 let _ = req.bytes().await?;
8863 return Ok(GetPnlResponse::Unknown);
8864 }
8865}
8866#[derive(Debug, Clone)]
8868pub enum GetPnlResponse {
8869 Ok(PnlPartitionedResponse),
8871 BadRequest,
8873 Unauthorized,
8875 ServiceUnavailable,
8878 Unknown,
8880}
8881#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8883pub struct GetPortfolioLedgerRequest {
8884 #[validate(nested)]
8885 pub path: GetPortfolioLedgerRequestPath,
8886}
8887impl GetPortfolioLedgerRequest {
8888 pub async fn parse_response(
8890 req: reqwest::Response,
8891 ) -> anyhow::Result<GetPortfolioLedgerResponse> {
8892 let status = req.status();
8893 if status == http::StatusCode::OK {
8894 let data = oas3_gen_support::Diagnostics::<Ledger>::json_with_diagnostics(req).await?;
8895 return Ok(GetPortfolioLedgerResponse::Ok(data));
8896 }
8897 if status == http::StatusCode::UNAUTHORIZED {
8898 let _ = req.bytes().await?;
8899 return Ok(GetPortfolioLedgerResponse::Unauthorized);
8900 }
8901 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8902 let _ = req.bytes().await?;
8903 return Ok(GetPortfolioLedgerResponse::InternalServerError);
8904 }
8905 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8906 let _ = req.bytes().await?;
8907 return Ok(GetPortfolioLedgerResponse::ServiceUnavailable);
8908 }
8909 let _ = req.bytes().await?;
8910 return Ok(GetPortfolioLedgerResponse::Unknown);
8911 }
8912}
8913#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
8914pub struct GetPortfolioLedgerRequestPath {
8915 #[validate(length(min = 1u64))]
8918 pub account_id: String,
8919}
8920#[derive(Debug, Clone)]
8922pub enum GetPortfolioLedgerResponse {
8923 Ok(Ledger),
8925 Unauthorized,
8927 InternalServerError,
8930 ServiceUnavailable,
8933 Unknown,
8935}
8936#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8938pub struct GetPortfolioMetadataRequest {
8939 #[validate(nested)]
8940 pub path: GetPortfolioMetadataRequestPath,
8941}
8942impl GetPortfolioMetadataRequest {
8943 pub async fn parse_response(
8945 req: reqwest::Response,
8946 ) -> anyhow::Result<GetPortfolioMetadataResponse> {
8947 let status = req.status();
8948 if status == http::StatusCode::OK {
8949 let data =
8950 oas3_gen_support::Diagnostics::<AccountAttributes>::json_with_diagnostics(req)
8951 .await?;
8952 return Ok(GetPortfolioMetadataResponse::Ok(data));
8953 }
8954 if status == http::StatusCode::UNAUTHORIZED {
8955 let _ = req.bytes().await?;
8956 return Ok(GetPortfolioMetadataResponse::Unauthorized);
8957 }
8958 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
8959 let _ = req.bytes().await?;
8960 return Ok(GetPortfolioMetadataResponse::InternalServerError);
8961 }
8962 if status == http::StatusCode::SERVICE_UNAVAILABLE {
8963 let _ = req.bytes().await?;
8964 return Ok(GetPortfolioMetadataResponse::ServiceUnavailable);
8965 }
8966 let _ = req.bytes().await?;
8967 return Ok(GetPortfolioMetadataResponse::Unknown);
8968 }
8969}
8970#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
8971pub struct GetPortfolioMetadataRequestPath {
8972 #[validate(length(min = 1u64))]
8975 pub account_id: String,
8976}
8977#[derive(Debug, Clone)]
8979pub enum GetPortfolioMetadataResponse {
8980 Ok(AccountAttributes),
8982 Unauthorized,
8984 InternalServerError,
8987 ServiceUnavailable,
8990 Unknown,
8992}
8993#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
8995pub struct GetPortfolioSummaryRequest {
8996 #[validate(nested)]
8997 pub path: GetPortfolioSummaryRequestPath,
8998}
8999impl GetPortfolioSummaryRequest {
9000 pub async fn parse_response(
9002 req: reqwest::Response,
9003 ) -> anyhow::Result<GetPortfolioSummaryResponse> {
9004 let status = req.status();
9005 if status == http::StatusCode::OK {
9006 let data =
9007 oas3_gen_support::Diagnostics::<PortfolioSummary>::json_with_diagnostics(req)
9008 .await?;
9009 return Ok(GetPortfolioSummaryResponse::Ok(data));
9010 }
9011 if status == http::StatusCode::UNAUTHORIZED {
9012 let _ = req.bytes().await?;
9013 return Ok(GetPortfolioSummaryResponse::Unauthorized);
9014 }
9015 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9016 let _ = req.bytes().await?;
9017 return Ok(GetPortfolioSummaryResponse::InternalServerError);
9018 }
9019 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9020 let _ = req.bytes().await?;
9021 return Ok(GetPortfolioSummaryResponse::ServiceUnavailable);
9022 }
9023 let _ = req.bytes().await?;
9024 return Ok(GetPortfolioSummaryResponse::Unknown);
9025 }
9026}
9027#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
9028pub struct GetPortfolioSummaryRequestPath {
9029 #[validate(length(min = 1u64))]
9032 pub account_id: String,
9033}
9034#[derive(Debug, Clone)]
9036pub enum GetPortfolioSummaryResponse {
9037 Ok(PortfolioSummary),
9039 Unauthorized,
9041 InternalServerError,
9044 ServiceUnavailable,
9047 Unknown,
9049}
9050#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9052pub struct GetPositionByConidRequest {
9053 #[validate(nested)]
9054 pub path: GetPositionByConidRequestPath,
9055}
9056impl GetPositionByConidRequest {
9057 pub async fn parse_response(
9059 req: reqwest::Response,
9060 ) -> anyhow::Result<GetPositionByConidResponse> {
9061 let status = req.status();
9062 if status == http::StatusCode::OK {
9063 let data =
9064 oas3_gen_support::Diagnostics::<IndividualPositionArray>::json_with_diagnostics(
9065 req,
9066 )
9067 .await?;
9068 return Ok(GetPositionByConidResponse::Ok(data));
9069 }
9070 if status == http::StatusCode::BAD_REQUEST {
9071 let _ = req.bytes().await?;
9072 return Ok(GetPositionByConidResponse::BadRequest);
9073 }
9074 if status == http::StatusCode::UNAUTHORIZED {
9075 let _ = req.bytes().await?;
9076 return Ok(GetPositionByConidResponse::Unauthorized);
9077 }
9078 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9079 let _ = req.bytes().await?;
9080 return Ok(GetPositionByConidResponse::InternalServerError);
9081 }
9082 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9083 let _ = req.bytes().await?;
9084 return Ok(GetPositionByConidResponse::ServiceUnavailable);
9085 }
9086 let _ = req.bytes().await?;
9087 return Ok(GetPositionByConidResponse::Unknown);
9088 }
9089}
9090#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
9091pub struct GetPositionByConidRequestPath {
9092 #[validate(length(min = 1u64))]
9095 pub accountid: String,
9096 pub conid: i32,
9099}
9100#[derive(Debug, Clone)]
9102pub enum GetPositionByConidResponse {
9103 Ok(IndividualPositionArray),
9105 BadRequest,
9107 Unauthorized,
9109 InternalServerError,
9112 ServiceUnavailable,
9115 Unknown,
9117}
9118#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9120pub struct GetScannerParametersRequest {}
9121impl GetScannerParametersRequest {
9122 pub async fn parse_response(
9124 req: reqwest::Response,
9125 ) -> anyhow::Result<GetScannerParametersResponse> {
9126 let status = req.status();
9127 if status == http::StatusCode::OK {
9128 let data =
9129 oas3_gen_support::Diagnostics::<IserverScannerParams>::json_with_diagnostics(req)
9130 .await?;
9131 return Ok(GetScannerParametersResponse::Ok(data));
9132 }
9133 if status == http::StatusCode::UNAUTHORIZED {
9134 let _ = req.bytes().await?;
9135 return Ok(GetScannerParametersResponse::Unauthorized);
9136 }
9137 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9138 let _ = req.bytes().await?;
9139 return Ok(GetScannerParametersResponse::InternalServerError);
9140 }
9141 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9142 let _ = req.bytes().await?;
9143 return Ok(GetScannerParametersResponse::ServiceUnavailable);
9144 }
9145 let _ = req.bytes().await?;
9146 return Ok(GetScannerParametersResponse::Unknown);
9147 }
9148}
9149#[derive(Debug, Clone)]
9151pub enum GetScannerParametersResponse {
9152 Ok(IserverScannerParams),
9154 Unauthorized,
9156 InternalServerError,
9159 ServiceUnavailable,
9162 Unknown,
9164}
9165#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9167pub struct GetScannerResultsRequest {
9168 pub body: IserverScannerRunRequest,
9169}
9170impl GetScannerResultsRequest {
9171 pub async fn parse_response(
9173 req: reqwest::Response,
9174 ) -> anyhow::Result<GetScannerResultsResponse> {
9175 let status = req.status();
9176 if status == http::StatusCode::OK {
9177 let data =
9178 oas3_gen_support::Diagnostics::<IserverScannerRunResponse>::json_with_diagnostics(
9179 req,
9180 )
9181 .await?;
9182 return Ok(GetScannerResultsResponse::Ok(data));
9183 }
9184 if status == http::StatusCode::BAD_REQUEST {
9185 let _ = req.bytes().await?;
9186 return Ok(GetScannerResultsResponse::BadRequest);
9187 }
9188 if status == http::StatusCode::UNAUTHORIZED {
9189 let _ = req.bytes().await?;
9190 return Ok(GetScannerResultsResponse::Unauthorized);
9191 }
9192 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9193 let _ = req.bytes().await?;
9194 return Ok(GetScannerResultsResponse::InternalServerError);
9195 }
9196 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9197 let _ = req.bytes().await?;
9198 return Ok(GetScannerResultsResponse::ServiceUnavailable);
9199 }
9200 let _ = req.bytes().await?;
9201 return Ok(GetScannerResultsResponse::Unknown);
9202 }
9203}
9204#[derive(Debug, Clone)]
9206pub enum GetScannerResultsResponse {
9207 Ok(IserverScannerRunResponse),
9209 BadRequest,
9211 Unauthorized,
9213 InternalServerError,
9216 ServiceUnavailable,
9219 Unknown,
9221}
9222#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9224pub struct GetSessionTokenRequest {}
9225impl GetSessionTokenRequest {
9226 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetSessionTokenResponse> {
9228 let status = req.status();
9229 if status == http::StatusCode::OK {
9230 let data =
9231 oas3_gen_support::Diagnostics::<TickleResponse>::json_with_diagnostics(req).await?;
9232 return Ok(GetSessionTokenResponse::Ok(data));
9233 }
9234 if status == http::StatusCode::UNAUTHORIZED {
9235 let _ = req.bytes().await?;
9236 return Ok(GetSessionTokenResponse::Unauthorized);
9237 }
9238 let _ = req.bytes().await?;
9239 return Ok(GetSessionTokenResponse::Unknown);
9240 }
9241}
9242#[derive(Debug, Clone)]
9244pub enum GetSessionTokenResponse {
9245 Ok(TickleResponse),
9247 Unauthorized,
9249 Unknown,
9251}
9252#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9254pub struct GetSessionValidationRequest {}
9255impl GetSessionValidationRequest {
9256 pub async fn parse_response(
9258 req: reqwest::Response,
9259 ) -> anyhow::Result<GetSessionValidationResponse> {
9260 let status = req.status();
9261 if status == http::StatusCode::OK {
9262 let data =
9263 oas3_gen_support::Diagnostics::<SsoValidateResponse>::json_with_diagnostics(req)
9264 .await?;
9265 return Ok(GetSessionValidationResponse::Ok(data));
9266 }
9267 if status == http::StatusCode::UNAUTHORIZED {
9268 let _ = req.bytes().await?;
9269 return Ok(GetSessionValidationResponse::Unauthorized);
9270 }
9271 let _ = req.bytes().await?;
9272 return Ok(GetSessionValidationResponse::Unknown);
9273 }
9274}
9275#[derive(Debug, Clone)]
9277pub enum GetSessionValidationResponse {
9278 Ok(SsoValidateResponse),
9280 Unauthorized,
9282 Unknown,
9284}
9285#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9287pub struct GetSingleAllocationGroupRequest {
9288 #[validate(nested)]
9289 pub body: NameRequestBody,
9290}
9291impl GetSingleAllocationGroupRequest {
9292 pub async fn parse_response(
9294 req: reqwest::Response,
9295 ) -> anyhow::Result<GetSingleAllocationGroupResponse> {
9296 let status = req.status();
9297 if status == http::StatusCode::OK {
9298 let data = oas3_gen_support::Diagnostics::<AllocationGroup>::json_with_diagnostics(req)
9299 .await?;
9300 return Ok(GetSingleAllocationGroupResponse::Ok(data));
9301 }
9302 if status == http::StatusCode::UNAUTHORIZED {
9303 let _ = req.bytes().await?;
9304 return Ok(GetSingleAllocationGroupResponse::Unauthorized);
9305 }
9306 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9307 let _ = req.bytes().await?;
9308 return Ok(GetSingleAllocationGroupResponse::InternalServerError);
9309 }
9310 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9311 let _ = req.bytes().await?;
9312 return Ok(GetSingleAllocationGroupResponse::ServiceUnavailable);
9313 }
9314 let _ = req.bytes().await?;
9315 return Ok(GetSingleAllocationGroupResponse::Unknown);
9316 }
9317}
9318#[derive(Debug, Clone)]
9320pub enum GetSingleAllocationGroupResponse {
9321 Ok(AllocationGroup),
9323 Unauthorized,
9325 InternalServerError,
9328 ServiceUnavailable,
9331 Unknown,
9333}
9334#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9336pub struct GetSinglePerformancePeriodRequest {
9337 pub body: PerformanceRequestBody,
9338}
9339impl GetSinglePerformancePeriodRequest {
9340 pub async fn parse_response(
9342 req: reqwest::Response,
9343 ) -> anyhow::Result<GetSinglePerformancePeriodResponse> {
9344 let status = req.status();
9345 if status == http::StatusCode::OK {
9346 let data =
9347 oas3_gen_support::Diagnostics::<PerformanceResponse>::json_with_diagnostics(req)
9348 .await?;
9349 return Ok(GetSinglePerformancePeriodResponse::Ok(data));
9350 }
9351 if status == http::StatusCode::BAD_REQUEST {
9352 let _ = req.bytes().await?;
9353 return Ok(GetSinglePerformancePeriodResponse::BadRequest);
9354 }
9355 if status == http::StatusCode::UNAUTHORIZED {
9356 let _ = req.bytes().await?;
9357 return Ok(GetSinglePerformancePeriodResponse::Unauthorized);
9358 }
9359 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9360 let _ = req.bytes().await?;
9361 return Ok(GetSinglePerformancePeriodResponse::InternalServerError);
9362 }
9363 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9364 let _ = req.bytes().await?;
9365 return Ok(GetSinglePerformancePeriodResponse::ServiceUnavailable);
9366 }
9367 let _ = req.bytes().await?;
9368 return Ok(GetSinglePerformancePeriodResponse::Unknown);
9369 }
9370}
9371#[derive(Debug, Clone)]
9373pub enum GetSinglePerformancePeriodResponse {
9374 Ok(PerformanceResponse),
9376 BadRequest,
9378 Unauthorized,
9380 InternalServerError,
9383 ServiceUnavailable,
9386 Unknown,
9388}
9389#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9391pub struct GetSpecificWatchlistRequest {
9392 #[validate(nested)]
9393 pub query: GetSpecificWatchlistRequestQuery,
9394}
9395impl GetSpecificWatchlistRequest {
9396 pub async fn parse_response(
9398 req: reqwest::Response,
9399 ) -> anyhow::Result<GetSpecificWatchlistResponse> {
9400 let status = req.status();
9401 if status == http::StatusCode::OK {
9402 let data = oas3_gen_support::Diagnostics::<SingleWatchlist>::json_with_diagnostics(req)
9403 .await?;
9404 return Ok(GetSpecificWatchlistResponse::Ok(data));
9405 }
9406 if status == http::StatusCode::BAD_REQUEST {
9407 let _ = req.bytes().await?;
9408 return Ok(GetSpecificWatchlistResponse::BadRequest);
9409 }
9410 if status == http::StatusCode::UNAUTHORIZED {
9411 let _ = req.bytes().await?;
9412 return Ok(GetSpecificWatchlistResponse::Unauthorized);
9413 }
9414 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9415 let _ = req.bytes().await?;
9416 return Ok(GetSpecificWatchlistResponse::InternalServerError);
9417 }
9418 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9419 let _ = req.bytes().await?;
9420 return Ok(GetSpecificWatchlistResponse::ServiceUnavailable);
9421 }
9422 let _ = req.bytes().await?;
9423 return Ok(GetSpecificWatchlistResponse::Unknown);
9424 }
9425}
9426#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9427pub struct GetSpecificWatchlistRequestQuery {
9428 #[validate(length(min = 1u64))]
9431 pub id: String,
9432}
9433#[derive(Debug, Clone)]
9435pub enum GetSpecificWatchlistResponse {
9436 Ok(SingleWatchlist),
9438 BadRequest,
9440 Unauthorized,
9442 InternalServerError,
9445 ServiceUnavailable,
9448 Unknown,
9450}
9451#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
9452pub struct GetStatementsResponse {
9453 pub data: Option<ResponseData>,
9454}
9455#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9457pub struct GetStockBySymbolRequest {
9458 #[validate(nested)]
9459 pub query: GetStockBySymbolRequestQuery,
9460}
9461impl GetStockBySymbolRequest {
9462 pub async fn parse_response(
9464 req: reqwest::Response,
9465 ) -> anyhow::Result<GetStockBySymbolResponse> {
9466 let status = req.status();
9467 if status == http::StatusCode::OK {
9468 let data = oas3_gen_support::Diagnostics::<Stocks>::json_with_diagnostics(req).await?;
9469 return Ok(GetStockBySymbolResponse::Ok(data));
9470 }
9471 if status == http::StatusCode::BAD_REQUEST {
9472 let _ = req.bytes().await?;
9473 return Ok(GetStockBySymbolResponse::BadRequest);
9474 }
9475 if status == http::StatusCode::UNAUTHORIZED {
9476 let _ = req.bytes().await?;
9477 return Ok(GetStockBySymbolResponse::Unauthorized);
9478 }
9479 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9480 let _ = req.bytes().await?;
9481 return Ok(GetStockBySymbolResponse::InternalServerError);
9482 }
9483 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9484 let _ = req.bytes().await?;
9485 return Ok(GetStockBySymbolResponse::ServiceUnavailable);
9486 }
9487 let _ = req.bytes().await?;
9488 return Ok(GetStockBySymbolResponse::Unknown);
9489 }
9490}
9491#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9492pub struct GetStockBySymbolRequestQuery {
9493 #[validate(length(min = 1u64))]
9496 pub symbols: String,
9497}
9498#[derive(Debug, Clone)]
9500pub enum GetStockBySymbolResponse {
9501 Ok(Stocks),
9503 BadRequest,
9505 Unauthorized,
9507 InternalServerError,
9510 ServiceUnavailable,
9513 Unknown,
9515}
9516#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9518pub struct GetTradeHistoryRequest {
9519 pub query: GetTradeHistoryRequestQuery,
9520}
9521impl GetTradeHistoryRequest {
9522 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetTradeHistoryResponse> {
9524 let status = req.status();
9525 if status == http::StatusCode::OK {
9526 let data =
9527 oas3_gen_support::Diagnostics::<TradesResponse>::json_with_diagnostics(req).await?;
9528 return Ok(GetTradeHistoryResponse::Ok(data));
9529 }
9530 if status == http::StatusCode::UNAUTHORIZED {
9531 let _ = req.bytes().await?;
9532 return Ok(GetTradeHistoryResponse::Unauthorized);
9533 }
9534 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9535 let _ = req.bytes().await?;
9536 return Ok(GetTradeHistoryResponse::InternalServerError);
9537 }
9538 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9539 let _ = req.bytes().await?;
9540 return Ok(GetTradeHistoryResponse::ServiceUnavailable);
9541 }
9542 let _ = req.bytes().await?;
9543 return Ok(GetTradeHistoryResponse::Unknown);
9544 }
9545}
9546#[serde_with::skip_serializing_none]
9547#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
9548pub struct GetTradeHistoryRequestQuery {
9549 pub days: Option<i32>,
9552}
9553#[derive(Debug, Clone)]
9555pub enum GetTradeHistoryResponse {
9556 Ok(TradesResponse),
9558 Unauthorized,
9560 InternalServerError,
9563 ServiceUnavailable,
9566 Unknown,
9568}
9569#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9571pub struct GetTradingScheduleGetTrsrvSecdefScheduleRequest {
9572 #[validate(nested)]
9573 pub query: GetTradingScheduleGetTrsrvSecdefScheduleRequestQuery,
9574}
9575impl GetTradingScheduleGetTrsrvSecdefScheduleRequest {
9576 pub async fn parse_response(
9578 req: reqwest::Response,
9579 ) -> anyhow::Result<GetTradingScheduleGetTrsrvSecdefScheduleResponse> {
9580 let status = req.status();
9581 if status == http::StatusCode::OK {
9582 let data = oas3_gen_support::Diagnostics::<TradingSchedule>::json_with_diagnostics(req)
9583 .await?;
9584 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::Ok(data));
9585 }
9586 if status == http::StatusCode::BAD_REQUEST {
9587 let _ = req.bytes().await?;
9588 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::BadRequest);
9589 }
9590 if status == http::StatusCode::UNAUTHORIZED {
9591 let _ = req.bytes().await?;
9592 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::Unauthorized);
9593 }
9594 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9595 let _ = req.bytes().await?;
9596 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::InternalServerError);
9597 }
9598 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9599 let _ = req.bytes().await?;
9600 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::ServiceUnavailable);
9601 }
9602 let _ = req.bytes().await?;
9603 return Ok(GetTradingScheduleGetTrsrvSecdefScheduleResponse::Unknown);
9604 }
9605}
9606#[serde_with::skip_serializing_none]
9607#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9608pub struct GetTradingScheduleGetTrsrvSecdefScheduleRequestQuery {
9609 #[serde(rename = "assetClass")]
9620 pub asset_class: GetTradingScheduleGetTrsrvSecdefScheduleRequestQueryAssetClass,
9621 #[validate(length(min = 1u64))]
9624 pub symbol: String,
9625 pub exchange: Option<String>,
9628 #[serde(rename = "exchangeFilter")]
9631 pub exchange_filter: Option<String>,
9632}
9633#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
9644pub enum GetTradingScheduleGetTrsrvSecdefScheduleRequestQueryAssetClass {
9645 #[serde(rename = "STK")]
9646 #[default]
9647 Stk,
9648 #[serde(rename = "OPT")]
9649 Opt,
9650 #[serde(rename = "FUT")]
9651 Fut,
9652 #[serde(rename = "CFD")]
9653 Cfd,
9654 #[serde(rename = "WAR")]
9655 War,
9656 #[serde(rename = "SWP")]
9657 Swp,
9658 #[serde(rename = "FND")]
9659 Fnd,
9660 #[serde(rename = "BND")]
9661 Bnd,
9662 #[serde(rename = "ICS")]
9663 Ics,
9664}
9665impl core::fmt::Display for GetTradingScheduleGetTrsrvSecdefScheduleRequestQueryAssetClass {
9666 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9667 match self {
9668 Self::Stk => write!(f, "STK"),
9669 Self::Opt => write!(f, "OPT"),
9670 Self::Fut => write!(f, "FUT"),
9671 Self::Cfd => write!(f, "CFD"),
9672 Self::War => write!(f, "WAR"),
9673 Self::Swp => write!(f, "SWP"),
9674 Self::Fnd => write!(f, "FND"),
9675 Self::Bnd => write!(f, "BND"),
9676 Self::Ics => write!(f, "ICS"),
9677 }
9678 }
9679}
9680#[derive(Debug, Clone)]
9682pub enum GetTradingScheduleGetTrsrvSecdefScheduleResponse {
9683 Ok(TradingSchedule),
9685 BadRequest,
9687 Unauthorized,
9689 InternalServerError,
9692 ServiceUnavailable,
9695 Unknown,
9697}
9698#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9700pub struct GetTradingScheduleRequest {
9701 #[validate(nested)]
9702 pub query: GetTradingScheduleRequestQuery,
9703}
9704impl GetTradingScheduleRequest {
9705 pub async fn parse_response(
9707 req: reqwest::Response,
9708 ) -> anyhow::Result<GetTradingScheduleResponse> {
9709 let status = req.status();
9710 if status == http::StatusCode::OK {
9711 let data =
9712 oas3_gen_support::Diagnostics::<ScheduleResponse>::json_with_diagnostics(req)
9713 .await?;
9714 return Ok(GetTradingScheduleResponse::Ok(data));
9715 }
9716 if status == http::StatusCode::UNAUTHORIZED {
9717 let _ = req.bytes().await?;
9718 return Ok(GetTradingScheduleResponse::Unauthorized);
9719 }
9720 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9721 let _ = req.bytes().await?;
9722 return Ok(GetTradingScheduleResponse::InternalServerError);
9723 }
9724 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9725 let _ = req.bytes().await?;
9726 return Ok(GetTradingScheduleResponse::ServiceUnavailable);
9727 }
9728 let _ = req.bytes().await?;
9729 return Ok(GetTradingScheduleResponse::Unknown);
9730 }
9731}
9732#[serde_with::skip_serializing_none]
9733#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9734pub struct GetTradingScheduleRequestQuery {
9735 #[validate(length(min = 1u64))]
9737 pub conid: String,
9738 pub exchange: Option<String>,
9740}
9741#[derive(Debug, Clone)]
9743pub enum GetTradingScheduleResponse {
9744 Ok(ScheduleResponse),
9746 Unauthorized,
9748 InternalServerError,
9751 ServiceUnavailable,
9754 Unknown,
9756}
9757#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9759pub struct GetTransactionsRequest {
9760 pub body: TransactionRequestBody,
9761}
9762impl GetTransactionsRequest {
9763 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetTransactionsResponse> {
9765 let status = req.status();
9766 if status == http::StatusCode::OK {
9767 let data =
9768 oas3_gen_support::Diagnostics::<TransactionsResponse>::json_with_diagnostics(req)
9769 .await?;
9770 return Ok(GetTransactionsResponse::Ok(data));
9771 }
9772 if status == http::StatusCode::BAD_REQUEST {
9773 let _ = req.bytes().await?;
9774 return Ok(GetTransactionsResponse::BadRequest);
9775 }
9776 if status == http::StatusCode::UNAUTHORIZED {
9777 let _ = req.bytes().await?;
9778 return Ok(GetTransactionsResponse::Unauthorized);
9779 }
9780 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9781 let _ = req.bytes().await?;
9782 return Ok(GetTransactionsResponse::InternalServerError);
9783 }
9784 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9785 let _ = req.bytes().await?;
9786 return Ok(GetTransactionsResponse::ServiceUnavailable);
9787 }
9788 let _ = req.bytes().await?;
9789 return Ok(GetTransactionsResponse::Unknown);
9790 }
9791}
9792#[derive(Debug, Clone)]
9794pub enum GetTransactionsResponse {
9795 Ok(TransactionsResponse),
9797 BadRequest,
9799 Unauthorized,
9801 InternalServerError,
9804 ServiceUnavailable,
9807 Unknown,
9809}
9810#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9812pub struct GetUncachedPositionsRequest {
9813 #[validate(nested)]
9814 pub path: GetUncachedPositionsRequestPath,
9815 pub query: GetUncachedPositionsRequestQuery,
9816}
9817impl GetUncachedPositionsRequest {
9818 pub async fn parse_response(
9820 req: reqwest::Response,
9821 ) -> anyhow::Result<GetUncachedPositionsResponse> {
9822 let status = req.status();
9823 if status == http::StatusCode::OK {
9824 let data =
9825 oas3_gen_support::Diagnostics::<Portfolio2Positions>::json_with_diagnostics(req)
9826 .await?;
9827 return Ok(GetUncachedPositionsResponse::Ok(data));
9828 }
9829 if status == http::StatusCode::UNAUTHORIZED {
9830 let _ = req.bytes().await?;
9831 return Ok(GetUncachedPositionsResponse::Unauthorized);
9832 }
9833 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9834 let _ = req.bytes().await?;
9835 return Ok(GetUncachedPositionsResponse::InternalServerError);
9836 }
9837 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9838 let _ = req.bytes().await?;
9839 return Ok(GetUncachedPositionsResponse::ServiceUnavailable);
9840 }
9841 let _ = req.bytes().await?;
9842 return Ok(GetUncachedPositionsResponse::Unknown);
9843 }
9844}
9845#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
9846pub struct GetUncachedPositionsRequestPath {
9847 #[validate(length(min = 1u64))]
9850 pub account_id: String,
9851}
9852#[serde_with::skip_serializing_none]
9853#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
9854pub struct GetUncachedPositionsRequestQuery {
9855 pub model: Option<String>,
9858 #[default(Some(Default::default()))]
9862 pub direction: Option<GetUncachedPositionsRequestQueryDirection>,
9863}
9864#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
9868pub enum GetUncachedPositionsRequestQueryDirection {
9869 #[serde(rename = "a")]
9870 #[default]
9871 A,
9872 #[serde(rename = "d")]
9873 D,
9874}
9875impl core::fmt::Display for GetUncachedPositionsRequestQueryDirection {
9876 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9877 match self {
9878 Self::A => write!(f, "a"),
9879 Self::D => write!(f, "d"),
9880 }
9881 }
9882}
9883#[derive(Debug, Clone)]
9885pub enum GetUncachedPositionsResponse {
9886 Ok(Portfolio2Positions),
9888 Unauthorized,
9890 InternalServerError,
9893 ServiceUnavailable,
9896 Unknown,
9898}
9899#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
9901pub struct GetUnreadFyisRequest {}
9902impl GetUnreadFyisRequest {
9903 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<GetUnreadFyisResponse> {
9905 let status = req.status();
9906 if status == http::StatusCode::OK {
9907 let data =
9908 oas3_gen_support::Diagnostics::<BNResponse>::json_with_diagnostics(req).await?;
9909 return Ok(GetUnreadFyisResponse::Ok(data));
9910 }
9911 if status == http::StatusCode::UNAUTHORIZED {
9912 let _ = req.bytes().await?;
9913 return Ok(GetUnreadFyisResponse::Unauthorized);
9914 }
9915 if status == http::StatusCode::LOCKED {
9916 let _ = req.bytes().await?;
9917 return Ok(GetUnreadFyisResponse::Locked);
9918 }
9919 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
9920 let _ = req.bytes().await?;
9921 return Ok(GetUnreadFyisResponse::InternalServerError);
9922 }
9923 if status == http::StatusCode::SERVICE_UNAVAILABLE {
9924 let _ = req.bytes().await?;
9925 return Ok(GetUnreadFyisResponse::ServiceUnavailable);
9926 }
9927 let _ = req.bytes().await?;
9928 return Ok(GetUnreadFyisResponse::Unknown);
9929 }
9930}
9931#[derive(Debug, Clone)]
9933pub enum GetUnreadFyisResponse {
9934 Ok(BNResponse),
9936 Unauthorized,
9938 Locked,
9940 InternalServerError,
9943 ServiceUnavailable,
9946 Unknown,
9948}
9949#[serde_with::skip_serializing_none]
9950#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9951#[serde(default)]
9952pub struct GroupRequestBody {
9953 #[validate(nested)]
9955 pub accounts: Vec<GroupRequestBodyAccount>,
9956 #[default(Some(Default::default()))]
9967 pub default_method: Option<AllocationMethod>,
9968 #[validate(length(min = 1u64))]
9971 pub name: String,
9972 pub prev_name: Option<String>,
9975}
9976#[serde_with::skip_serializing_none]
9977#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
9978#[serde(default)]
9979pub struct GroupRequestBody2 {
9980 #[validate(nested)]
9982 pub accounts: Vec<GroupRequestBodyAccount>,
9983 #[default(Some(Default::default()))]
9994 pub default_method: Option<AllocationMethod>,
9995 #[validate(length(min = 1u64))]
9998 pub name: String,
9999}
10000#[serde_with::skip_serializing_none]
10001#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
10002pub struct GroupRequestBodyAccount {
10003 pub amount: Option<i32>,
10006 #[validate(length(min = 1u64))]
10009 pub name: String,
10010}
10011#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10012#[serde(untagged)]
10013pub enum History200Response {
10014 #[default]
10016 BidAsk(IserverHistoryBidAskResponse),
10017 Last(IserverHistoryLastResponse),
10019 Midpoint(IserverHistoryMidpointResponse),
10021}
10022impl History200Response {
10023 pub fn bid_ask() -> Self {
10025 Self::BidAsk(IserverHistoryBidAskResponse::default())
10026 }
10027 pub fn last() -> Self {
10029 Self::Last(IserverHistoryLastResponse::default())
10030 }
10031 pub fn midpoint() -> Self {
10033 Self::Midpoint(IserverHistoryMidpointResponse::default())
10034 }
10035}
10036#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10037pub struct IndividualComboPosition {
10038 #[serde(rename = "acctId")]
10040 pub acct_id: Option<String>,
10041 #[serde(rename = "assetClass")]
10043 pub asset_class: Option<String>,
10044 #[serde(rename = "avgCost")]
10046 pub avg_cost: Option<f64>,
10047 #[serde(rename = "avgPrice")]
10049 pub avg_price: Option<f64>,
10050 #[serde(rename = "conExchMap")]
10051 pub con_exch_map: Option<Vec<serde_json::Value>>,
10052 pub conid: Option<i32>,
10054 #[serde(rename = "contractDesc")]
10056 pub contract_desc: Option<String>,
10057 pub currency: Option<String>,
10059 pub exchs: Option<serde_json::Value>,
10060 #[serde(rename = "exerciseStyle")]
10062 pub exercise_style: Option<String>,
10063 pub expiry: Option<String>,
10065 #[serde(rename = "mktPrice")]
10067 pub mkt_price: Option<f64>,
10068 #[serde(rename = "mktValue")]
10070 pub mkt_value: Option<f64>,
10071 pub multiplier: Option<f64>,
10073 pub position: Option<f64>,
10075 #[serde(rename = "putOrCall")]
10077 pub put_or_call: Option<IndividualComboPositionPutOrCall>,
10078 #[serde(rename = "realizedPnl")]
10080 pub realized_pnl: Option<f64>,
10081 pub strike: Option<String>,
10083 #[serde(rename = "undConid")]
10085 pub und_conid: Option<i32>,
10086 #[serde(rename = "unrealizedPnl")]
10088 pub unrealized_pnl: Option<f64>,
10089}
10090#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
10092pub enum IndividualComboPositionPutOrCall {
10093 #[default]
10094 P,
10095 C,
10096 None,
10097}
10098impl core::fmt::Display for IndividualComboPositionPutOrCall {
10099 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10100 match self {
10101 Self::P => write!(f, "P"),
10102 Self::C => write!(f, "C"),
10103 Self::None => write!(f, "None"),
10104 }
10105 }
10106}
10107#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10108pub struct IndividualIRABene {
10109 #[serde(rename = "dateOfBirth")]
10110 pub date_of_birth: Option<String>,
10111 #[serde(rename = "firstName")]
10112 pub first_name: Option<String>,
10113 pub identification: Option<std::collections::HashMap<String, String>>,
10114 #[serde(rename = "lastName")]
10115 pub last_name: Option<String>,
10116 pub location: Option<std::collections::HashMap<String, String>>,
10117 pub ownership: Option<i32>,
10118 #[serde(rename = "perStripes")]
10119 pub per_stripes: Option<String>,
10120 pub relationship: Option<String>,
10121 #[serde(rename = "type")]
10122 pub r#type: Option<String>,
10123}
10124#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10126pub struct IndividualPosition {
10127 #[serde(rename = "acctId")]
10129 pub acct_id: Option<String>,
10130 #[serde(rename = "allExchanges")]
10132 pub all_exchanges: Option<String>,
10133 #[serde(rename = "assetClass")]
10135 pub asset_class: Option<String>,
10136 #[serde(rename = "avgCost")]
10138 pub avg_cost: Option<f64>,
10139 #[serde(rename = "avgPrice")]
10141 pub avg_price: Option<f64>,
10142 #[serde(rename = "baseAvgCost")]
10144 pub base_avg_cost: Option<f64>,
10145 #[serde(rename = "baseAvgPrice")]
10147 pub base_avg_price: Option<f64>,
10148 #[serde(rename = "baseMktPrice")]
10150 pub base_mkt_price: Option<f64>,
10151 #[serde(rename = "baseMktValue")]
10153 pub base_mkt_value: Option<f64>,
10154 #[serde(rename = "baseRealizedPnl")]
10156 pub base_realized_pnl: Option<f64>,
10157 #[serde(rename = "baseUnrealizedPnl")]
10159 pub base_unrealized_pnl: Option<f64>,
10160 #[serde(rename = "chineseName")]
10162 pub chinese_name: Option<String>,
10163 #[serde(rename = "conExchMap")]
10164 pub con_exch_map: Option<Vec<serde_json::Value>>,
10165 pub conid: Option<i32>,
10167 #[serde(rename = "contractDesc")]
10169 pub contract_desc: Option<String>,
10170 #[serde(rename = "countryCode")]
10172 pub country_code: Option<String>,
10173 pub currency: Option<String>,
10175 #[serde(rename = "displayRule")]
10177 pub display_rule: Option<IndividualPositionDisplayRule>,
10178 pub exchs: Option<serde_json::Value>,
10179 #[serde(rename = "exerciseStyle")]
10181 pub exercise_style: Option<String>,
10182 pub expiry: Option<String>,
10184 #[serde(rename = "fullName")]
10186 pub full_name: Option<String>,
10187 pub group: Option<String>,
10189 #[serde(rename = "hasOptions")]
10191 pub has_options: Option<bool>,
10192 #[serde(rename = "incrementRules")]
10194 pub increment_rules: Option<Vec<IndividualPositionIncrementRule>>,
10195 #[serde(rename = "isEventContract")]
10197 pub is_event_contract: Option<bool>,
10198 #[serde(rename = "isUS")]
10200 pub is_us: Option<bool>,
10201 #[serde(rename = "lastTradingDay")]
10203 pub last_trading_day: Option<String>,
10204 #[serde(rename = "listingExchange")]
10206 pub listing_exchange: Option<String>,
10207 #[serde(rename = "mktPrice")]
10209 pub mkt_price: Option<f64>,
10210 #[serde(rename = "mktValue")]
10212 pub mkt_value: Option<f64>,
10213 pub model: Option<String>,
10215 pub multiplier: Option<f64>,
10217 pub name: Option<String>,
10219 #[serde(rename = "pageSize")]
10221 pub page_size: Option<i32>,
10222 pub position: Option<f64>,
10224 #[serde(rename = "putOrCall")]
10226 pub put_or_call: Option<IndividualPositionPutOrCall>,
10227 #[serde(rename = "realizedPnl")]
10229 pub realized_pnl: Option<f64>,
10230 pub sector: Option<String>,
10232 #[serde(rename = "sectorGroup")]
10234 pub sector_group: Option<String>,
10235 pub strike: Option<String>,
10237 pub ticker: Option<String>,
10239 pub time: Option<i32>,
10241 #[serde(rename = "type")]
10243 pub r#type: Option<String>,
10244 #[serde(rename = "undConid")]
10246 pub und_conid: Option<i32>,
10247 #[serde(rename = "unrealizedPnl")]
10249 pub unrealized_pnl: Option<f64>,
10250}
10251pub type IndividualPositionArray = Vec<IndividualPosition>;
10252#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10254pub struct IndividualPositionDisplayRule {
10255 #[serde(rename = "displayRuleStep")]
10257 pub display_rule_step: Option<Vec<IndividualPositionDisplayRuleDisplayRuleStep>>,
10258 pub magnification: Option<i32>,
10260}
10261#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10263pub struct IndividualPositionDisplayRuleDisplayRuleStep {
10264 #[serde(rename = "decimalDigits")]
10266 pub decimal_digits: Option<i32>,
10267 #[serde(rename = "lowerEdge")]
10269 pub lower_edge: Option<f64>,
10270 #[serde(rename = "wholeDigits")]
10272 pub whole_digits: Option<i32>,
10273}
10274#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10276pub struct IndividualPositionIncrementRule {
10277 pub increment: Option<f64>,
10279 #[serde(rename = "lowerEdge")]
10281 pub lower_edge: Option<f64>,
10282}
10283#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
10285pub enum IndividualPositionPutOrCall {
10286 #[default]
10287 P,
10288 C,
10289}
10290impl core::fmt::Display for IndividualPositionPutOrCall {
10291 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10292 match self {
10293 Self::P => write!(f, "P"),
10294 Self::C => write!(f, "C"),
10295 }
10296 }
10297}
10298#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
10300pub struct InitializeSessionRequest {
10301 pub body: BrokerageSessionInitRequest,
10302}
10303impl InitializeSessionRequest {
10304 pub async fn parse_response(
10306 req: reqwest::Response,
10307 ) -> anyhow::Result<InitializeSessionResponse> {
10308 let status = req.status();
10309 if status == http::StatusCode::OK {
10310 let data =
10311 oas3_gen_support::Diagnostics::<BrokerageSessionStatus>::json_with_diagnostics(req)
10312 .await?;
10313 return Ok(InitializeSessionResponse::Ok(data));
10314 }
10315 if status == http::StatusCode::UNAUTHORIZED {
10316 let _ = req.bytes().await?;
10317 return Ok(InitializeSessionResponse::Unauthorized);
10318 }
10319 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
10320 let _ = req.bytes().await?;
10321 return Ok(InitializeSessionResponse::InternalServerError);
10322 }
10323 if status == http::StatusCode::SERVICE_UNAVAILABLE {
10324 let _ = req.bytes().await?;
10325 return Ok(InitializeSessionResponse::ServiceUnavailable);
10326 }
10327 let _ = req.bytes().await?;
10328 return Ok(InitializeSessionResponse::Unknown);
10329 }
10330}
10331#[derive(Debug, Clone)]
10333pub enum InitializeSessionResponse {
10334 Ok(BrokerageSessionStatus),
10336 Unauthorized,
10338 InternalServerError,
10341 ServiceUnavailable,
10344 Unknown,
10346}
10347#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10348#[serde(untagged)]
10349pub enum Instruction200Response {
10350 #[default]
10351 InstructionPolling(InstructionPollingResponse),
10352 Instruction(InstructionResponse),
10353 QueryRecentInstruction(QueryRecentInstructionResponse),
10354 DepositFundsPolling(DepositFundsPollingResponse),
10355 QueryIRAContributions(QueryIRAContributionsResponse),
10356}
10357#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
10358pub enum InstructionDirection {
10359 #[serde(rename = "IN")]
10360 #[default]
10361 In,
10362 #[serde(rename = "OUT")]
10363 Out,
10364}
10365impl core::fmt::Display for InstructionDirection {
10366 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10367 match self {
10368 Self::In => write!(f, "IN"),
10369 Self::Out => write!(f, "OUT"),
10370 }
10371 }
10372}
10373#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10374pub struct InstructionPollingResponse {
10375 #[serde(rename = "instructionResult")]
10376 pub instruction_result: Option<PollingInstructionResult>,
10377 #[serde(rename = "instructionSetId")]
10379 pub instruction_set_id: f64,
10380 pub status: f64,
10382}
10383#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10384pub struct InstructionRequestBody {
10385 pub instruction: InstructionRequestBodyInstruction,
10386 #[serde(rename = "instructionType")]
10387 pub instruction_type: InstructionRequestBodyInstructionType,
10388}
10389#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10390#[serde(untagged)]
10391pub enum InstructionRequestBodyInstruction {
10392 #[default]
10393 TraditionalBankInstructionVerification(TraditionalBankInstructionVerification),
10394 AchInstruction(AchInstruction),
10395 DeleteBankInstruction(DeleteBankInstruction),
10396 PredefinedDestinationInstruction(PredefinedDestinationInstruction),
10397 EddaInstruction(EddaInstruction),
10398}
10399#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
10400pub enum InstructionRequestBodyInstructionType {
10401 #[serde(rename = "ACH_INSTRUCTION")]
10402 #[default]
10403 AchInstruction,
10404 #[serde(rename = "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")]
10405 TraditionalBankInstructionVerification,
10406 #[serde(rename = "DELETE_BANK_INSTRUCTION")]
10407 DeleteBankInstruction,
10408 #[serde(rename = "PREDEFINED_DESTINATION_INSTRUCTION")]
10409 PredefinedDestinationInstruction,
10410 #[serde(rename = "EDDA_INSTRUCTION")]
10411 EddaInstruction,
10412}
10413impl core::fmt::Display for InstructionRequestBodyInstructionType {
10414 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10415 match self {
10416 Self::AchInstruction => write!(f, "ACH_INSTRUCTION"),
10417 Self::TraditionalBankInstructionVerification => {
10418 write!(f, "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")
10419 }
10420 Self::DeleteBankInstruction => write!(f, "DELETE_BANK_INSTRUCTION"),
10421 Self::PredefinedDestinationInstruction => {
10422 write!(f, "PREDEFINED_DESTINATION_INSTRUCTION")
10423 }
10424 Self::EddaInstruction => write!(f, "EDDA_INSTRUCTION"),
10425 }
10426 }
10427}
10428#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10429pub struct InstructionResponse {
10430 #[serde(rename = "instructionResult")]
10431 pub instruction_result: Option<InstructionResult>,
10432 #[serde(rename = "instructionSetId")]
10434 pub instruction_set_id: f64,
10435 pub status: f64,
10437}
10438#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10439pub struct InstructionResult {
10440 #[serde(rename = "clientInstructionId")]
10442 pub client_instruction_id: f64,
10443 pub description: Option<String>,
10445 #[serde(rename = "ibReferenceId")]
10447 pub ib_reference_id: Option<f64>,
10448 #[serde(rename = "instructionId")]
10450 pub instruction_id: f64,
10451 #[serde(rename = "instructionStatus")]
10453 pub instruction_status: InstructionResultInstructionStatus,
10454 #[serde(rename = "instructionType")]
10456 pub instruction_type: InstructionResultInstructionType,
10457}
10458#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
10459pub enum InstructionResultInstructionStatus {
10460 #[serde(rename = "PENDING")]
10461 #[default]
10462 Pending,
10463 #[serde(rename = "PROCESSED")]
10464 Processed,
10465 #[serde(rename = "REJECTED")]
10466 Rejected,
10467 #[serde(rename = "PENDING_VERIFICATION")]
10468 PendingVerification,
10469}
10470impl core::fmt::Display for InstructionResultInstructionStatus {
10471 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10472 match self {
10473 Self::Pending => write!(f, "PENDING"),
10474 Self::Processed => write!(f, "PROCESSED"),
10475 Self::Rejected => write!(f, "REJECTED"),
10476 Self::PendingVerification => write!(f, "PENDING_VERIFICATION"),
10477 }
10478 }
10479}
10480#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
10481pub enum InstructionResultInstructionType {
10482 #[serde(rename = "ACH_INSTRUCTION")]
10483 #[default]
10484 AchInstruction,
10485 #[serde(rename = "CANCEL_INSTRUCTION")]
10486 CancelInstruction,
10487 #[serde(rename = "COMPLEX_ASSET_TRANSFER")]
10488 ComplexAssetTransfer,
10489 #[serde(rename = "DELETE_BANK_INSTRUCTION")]
10490 DeleteBankInstruction,
10491 #[serde(rename = "DEPOSIT")]
10492 Deposit,
10493 #[serde(rename = "DWAC")]
10494 Dwac,
10495 #[serde(rename = "EXTERNAL_POSITION_TRANSFER")]
10496 ExternalPositionTransfer,
10497 #[serde(rename = "FOP")]
10498 Fop,
10499 #[serde(rename = "QUERY_RECENT_INSTRUCTIONS")]
10500 QueryRecentInstructions,
10501 #[serde(rename = "QUERY_WITHDRAWABLE_FUNDS")]
10502 QueryWithdrawableFunds,
10503 #[serde(rename = "INTERNAL_POSITION_TRANSFER")]
10504 InternalPositionTransfer,
10505 #[serde(rename = "INTERNAL_CASH_TRANSFER")]
10506 InternalCashTransfer,
10507 #[serde(rename = "MICRO_AMOUNT")]
10508 MicroAmount,
10509 #[serde(rename = "PREDEFINED_DESTINATION_INSTRUCTION")]
10510 PredefinedDestinationInstruction,
10511 #[serde(rename = "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")]
10512 TraditionalBankInstructionVerification,
10513 #[serde(rename = "WITHDRAWAL")]
10514 Withdrawal,
10515 #[serde(rename = "QUERY_IRA_CONTRIBUTIONS")]
10516 QueryIraContributions,
10517 #[serde(rename = "EDDA_INSTRUCTION")]
10518 EddaInstruction,
10519 #[serde(rename = "QUERY_RECENT_RECURRING_EVENTS")]
10520 QueryRecentRecurringEvents,
10521 #[serde(rename = "QUERY_RECURRING_INSTRUCTIONS")]
10522 QueryRecurringInstructions,
10523 #[serde(rename = "QUERY_ACCOUNT_BALANCES")]
10524 QueryAccountBalances,
10525 #[serde(rename = "QUERY_BANK_INSTRUCTION")]
10526 QueryBankInstruction,
10527 #[serde(rename = "QUERY_WITHDRAWABLE_CASH_EQUITY")]
10528 QueryWithdrawableCashEquity,
10529}
10530impl core::fmt::Display for InstructionResultInstructionType {
10531 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10532 match self {
10533 Self::AchInstruction => write!(f, "ACH_INSTRUCTION"),
10534 Self::CancelInstruction => write!(f, "CANCEL_INSTRUCTION"),
10535 Self::ComplexAssetTransfer => write!(f, "COMPLEX_ASSET_TRANSFER"),
10536 Self::DeleteBankInstruction => write!(f, "DELETE_BANK_INSTRUCTION"),
10537 Self::Deposit => write!(f, "DEPOSIT"),
10538 Self::Dwac => write!(f, "DWAC"),
10539 Self::ExternalPositionTransfer => write!(f, "EXTERNAL_POSITION_TRANSFER"),
10540 Self::Fop => write!(f, "FOP"),
10541 Self::QueryRecentInstructions => write!(f, "QUERY_RECENT_INSTRUCTIONS"),
10542 Self::QueryWithdrawableFunds => write!(f, "QUERY_WITHDRAWABLE_FUNDS"),
10543 Self::InternalPositionTransfer => write!(f, "INTERNAL_POSITION_TRANSFER"),
10544 Self::InternalCashTransfer => write!(f, "INTERNAL_CASH_TRANSFER"),
10545 Self::MicroAmount => write!(f, "MICRO_AMOUNT"),
10546 Self::PredefinedDestinationInstruction => {
10547 write!(f, "PREDEFINED_DESTINATION_INSTRUCTION")
10548 }
10549 Self::TraditionalBankInstructionVerification => {
10550 write!(f, "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")
10551 }
10552 Self::Withdrawal => write!(f, "WITHDRAWAL"),
10553 Self::QueryIraContributions => write!(f, "QUERY_IRA_CONTRIBUTIONS"),
10554 Self::EddaInstruction => write!(f, "EDDA_INSTRUCTION"),
10555 Self::QueryRecentRecurringEvents => {
10556 write!(f, "QUERY_RECENT_RECURRING_EVENTS")
10557 }
10558 Self::QueryRecurringInstructions => write!(f, "QUERY_RECURRING_INSTRUCTIONS"),
10559 Self::QueryAccountBalances => write!(f, "QUERY_ACCOUNT_BALANCES"),
10560 Self::QueryBankInstruction => write!(f, "QUERY_BANK_INSTRUCTION"),
10561 Self::QueryWithdrawableCashEquity => {
10562 write!(f, "QUERY_WITHDRAWABLE_CASH_EQUITY")
10563 }
10564 }
10565 }
10566}
10567#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10568#[serde(default)]
10569pub struct InternalAssetTransfersBulkRequestBody {
10570 #[serde(rename = "instructionType")]
10571 #[default("INTERNAL_POSITION_TRANSFER".to_string())]
10572 pub instruction_type: String,
10573 pub instructions: Vec<serde_json::Value>,
10574}
10575#[serde_with::skip_serializing_none]
10576#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
10577pub struct InternalCashTransferInstruction {
10578 pub amount: f64,
10580 #[serde(rename = "clientInstructionId")]
10582 pub client_instruction_id: f64,
10583 #[serde(rename = "clientNote")]
10585 #[validate(length(min = 1u64, max = 64u64))]
10586 pub client_note: Option<String>,
10587 #[validate(length(min = 1u64, max = 3u64))]
10589 pub currency: String,
10590 #[serde(rename = "dateTimeToOccur")]
10591 pub date_time_to_occur: Option<chrono::DateTime<chrono::Utc>>,
10592 #[serde(rename = "sourceAccountId")]
10594 #[validate(length(min = 1u64, max = 32u64))]
10595 pub source_account_id: String,
10596 #[serde(rename = "targetAccountId")]
10598 #[validate(length(min = 1u64, max = 32u64))]
10599 pub target_account_id: String,
10600}
10601#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10602#[serde(default)]
10603pub struct InternalCashTransfersBulkRequestBody {
10604 #[serde(rename = "instructionType")]
10605 #[default("INTERNAL_CASH_TRANSFER".to_string())]
10606 pub instruction_type: String,
10607 pub instructions: Vec<serde_json::Value>,
10608}
10609#[serde_with::skip_serializing_none]
10610#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
10611pub struct InternalPositionTransferInstruction {
10612 #[serde(rename = "clientInstructionId")]
10614 pub client_instruction_id: f64,
10615 #[serde(rename = "settleDate")]
10618 pub settle_date: Option<String>,
10619 #[serde(rename = "sourceAccountId")]
10621 #[validate(length(min = 1u64))]
10622 pub source_account_id: String,
10623 #[serde(rename = "targetAccountId")]
10625 #[validate(length(min = 1u64))]
10626 pub target_account_id: String,
10627 #[serde(rename = "tradeDate")]
10630 pub trade_date: Option<String>,
10631 #[serde(rename = "tradingInstrument")]
10632 pub trading_instrument: TradingInstrument,
10633 #[serde(rename = "transferPrice")]
10637 pub transfer_price: Option<f64>,
10638 #[serde(rename = "transferQuantity")]
10640 pub transfer_quantity: f64,
10641}
10642#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
10644pub struct InvalidatePositionCacheRequest {
10645 #[validate(nested)]
10646 pub path: InvalidatePositionCacheRequestPath,
10647}
10648impl InvalidatePositionCacheRequest {
10649 pub async fn parse_response(
10651 req: reqwest::Response,
10652 ) -> anyhow::Result<InvalidatePositionCacheResponse> {
10653 let status = req.status();
10654 if status == http::StatusCode::OK {
10655 let data = oas3_gen_support::Diagnostics::<MessageResponse>::json_with_diagnostics(req)
10656 .await?;
10657 return Ok(InvalidatePositionCacheResponse::Ok(data));
10658 }
10659 if status == http::StatusCode::BAD_REQUEST {
10660 let _ = req.bytes().await?;
10661 return Ok(InvalidatePositionCacheResponse::BadRequest);
10662 }
10663 if status == http::StatusCode::UNAUTHORIZED {
10664 let _ = req.bytes().await?;
10665 return Ok(InvalidatePositionCacheResponse::Unauthorized);
10666 }
10667 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
10668 let _ = req.bytes().await?;
10669 return Ok(InvalidatePositionCacheResponse::InternalServerError);
10670 }
10671 if status == http::StatusCode::SERVICE_UNAVAILABLE {
10672 let _ = req.bytes().await?;
10673 return Ok(InvalidatePositionCacheResponse::ServiceUnavailable);
10674 }
10675 let _ = req.bytes().await?;
10676 return Ok(InvalidatePositionCacheResponse::Unknown);
10677 }
10678}
10679#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
10680pub struct InvalidatePositionCacheRequestPath {
10681 #[validate(length(min = 1u64))]
10684 pub account_id: String,
10685}
10686#[derive(Debug, Clone)]
10688pub enum InvalidatePositionCacheResponse {
10689 Ok(MessageResponse),
10691 BadRequest,
10693 Unauthorized,
10695 InternalServerError,
10698 ServiceUnavailable,
10701 Unknown,
10703}
10704#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10705pub struct InvestDivest200Response {
10706 #[serde(rename = "reqID")]
10709 pub req_id: Option<String>,
10710 #[serde(rename = "subscriptionStatus")]
10712 pub subscription_status: Option<i32>,
10713}
10714#[serde_with::skip_serializing_none]
10715#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10716pub struct InvestDivestRequestBody {
10717 #[serde(rename = "accountList")]
10719 pub account_list: Option<Vec<InvestDivestRequestBodyAccountList>>,
10720 pub model: Option<String>,
10722 #[serde(rename = "reqID")]
10724 pub req_id: Option<i32>,
10725}
10726#[serde_with::skip_serializing_none]
10727#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
10728pub struct InvestDivestRequestBodyAccountList {
10729 pub account: Option<String>,
10731 #[serde(rename = "amtToInvest")]
10733 pub amt_to_invest: Option<f64>,
10734}
10735#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10737#[serde(default)]
10738pub struct IserverHistoryBidAskResponse {
10739 #[serde(rename = "barLength")]
10741 pub bar_length: Option<i32>,
10742 #[serde(rename = "chartPanStartTime")]
10744 pub chart_pan_start_time: Option<String>,
10745 pub data: Option<Vec<SingleHistoricalBarBidAsk>>,
10747 #[default(Some(-1i32))]
10749 pub direction: Option<i32>,
10750 pub high: Option<String>,
10752 pub low: Option<String>,
10754 #[serde(rename = "mdAvailability")]
10756 pub md_availability: Option<String>,
10757 #[serde(rename = "messageVersion")]
10759 pub message_version: Option<i32>,
10760 #[serde(rename = "mktDataDelay")]
10762 pub mkt_data_delay: Option<i32>,
10763 #[serde(rename = "negativeCapable")]
10765 pub negative_capable: Option<bool>,
10766 #[serde(rename = "outsideRth")]
10768 pub outside_rth: Option<bool>,
10769 pub points: Option<i32>,
10771 #[serde(rename = "priceDisplayRule")]
10773 pub price_display_rule: Option<i32>,
10774 #[serde(rename = "priceDisplayValue")]
10776 pub price_display_value: Option<String>,
10777 #[serde(rename = "priceFactor")]
10779 pub price_factor: Option<i32>,
10780 #[serde(rename = "serverId")]
10782 pub server_id: Option<String>,
10783 #[serde(rename = "startTime")]
10785 pub start_time: Option<String>,
10786 pub symbol: Option<String>,
10788 pub text: Option<String>,
10790 #[serde(rename = "timePeriod")]
10792 pub time_period: Option<String>,
10793 #[serde(rename = "tradingDayDuration")]
10795 pub trading_day_duration: Option<i32>,
10796 #[serde(rename = "travelTime")]
10798 pub travel_time: Option<i32>,
10799 #[serde(rename = "volumeFactor")]
10801 pub volume_factor: Option<i32>,
10802}
10803#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10805#[serde(default)]
10806pub struct IserverHistoryLastResponse {
10807 #[serde(rename = "barLength")]
10809 pub bar_length: Option<i32>,
10810 #[serde(rename = "chartPanStartTime")]
10812 pub chart_pan_start_time: Option<String>,
10813 pub data: Option<Vec<SingleHistoricalBarLast>>,
10815 #[default(Some(-1i32))]
10817 pub direction: Option<i32>,
10818 pub high: Option<String>,
10820 pub low: Option<String>,
10822 #[serde(rename = "mdAvailability")]
10824 pub md_availability: Option<String>,
10825 #[serde(rename = "messageVersion")]
10827 pub message_version: Option<i32>,
10828 #[serde(rename = "mktDataDelay")]
10830 pub mkt_data_delay: Option<i32>,
10831 #[serde(rename = "negativeCapable")]
10833 pub negative_capable: Option<bool>,
10834 #[serde(rename = "outsideRth")]
10836 pub outside_rth: Option<bool>,
10837 pub points: Option<i32>,
10839 #[serde(rename = "priceDisplayRule")]
10841 pub price_display_rule: Option<i32>,
10842 #[serde(rename = "priceDisplayValue")]
10844 pub price_display_value: Option<String>,
10845 #[serde(rename = "priceFactor")]
10847 pub price_factor: Option<i32>,
10848 #[serde(rename = "serverId")]
10850 pub server_id: Option<String>,
10851 #[serde(rename = "startTime")]
10853 pub start_time: Option<String>,
10854 pub symbol: Option<String>,
10856 pub text: Option<String>,
10858 #[serde(rename = "timePeriod")]
10860 pub time_period: Option<String>,
10861 #[serde(rename = "tradingDayDuration")]
10863 pub trading_day_duration: Option<i32>,
10864 #[serde(rename = "travelTime")]
10866 pub travel_time: Option<i32>,
10867 #[serde(rename = "volumeFactor")]
10869 pub volume_factor: Option<i32>,
10870}
10871#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10873#[serde(default)]
10874pub struct IserverHistoryMidpointResponse {
10875 #[serde(rename = "barLength")]
10877 pub bar_length: Option<i32>,
10878 #[serde(rename = "chartPanStartTime")]
10880 pub chart_pan_start_time: Option<String>,
10881 pub data: Option<Vec<SingleHistoricalBarMidpoint>>,
10883 #[default(Some(-1i32))]
10885 pub direction: Option<i32>,
10886 pub high: Option<String>,
10888 pub low: Option<String>,
10890 #[serde(rename = "mdAvailability")]
10892 pub md_availability: Option<String>,
10893 #[serde(rename = "messageVersion")]
10895 pub message_version: Option<i32>,
10896 #[serde(rename = "mktDataDelay")]
10898 pub mkt_data_delay: Option<i32>,
10899 #[serde(rename = "negativeCapable")]
10901 pub negative_capable: Option<bool>,
10902 #[serde(rename = "outsideRth")]
10904 pub outside_rth: Option<bool>,
10905 pub points: Option<i32>,
10907 #[serde(rename = "priceDisplayRule")]
10909 pub price_display_rule: Option<i32>,
10910 #[serde(rename = "priceDisplayValue")]
10912 pub price_display_value: Option<String>,
10913 #[serde(rename = "priceFactor")]
10915 pub price_factor: Option<i32>,
10916 #[serde(rename = "serverId")]
10918 pub server_id: Option<String>,
10919 #[serde(rename = "startTime")]
10921 pub start_time: Option<String>,
10922 pub symbol: Option<String>,
10924 pub text: Option<String>,
10926 #[serde(rename = "timePeriod")]
10928 pub time_period: Option<String>,
10929 #[serde(rename = "tradingDayDuration")]
10931 pub trading_day_duration: Option<i32>,
10932 #[serde(rename = "travelTime")]
10934 pub travel_time: Option<i32>,
10935 #[serde(rename = "volumeFactor")]
10937 pub volume_factor: Option<i32>,
10938}
10939#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10940pub struct IserverScannerParams {
10941 pub filter_list: Option<Vec<IserverScannerParamsFilterList>>,
10942 pub instrument_list: Option<Vec<IserverScannerParamsInstrumentList>>,
10944 pub location_tree: Option<Vec<IserverScannerParamsLocationTree>>,
10946 pub scan_type_list: Option<Vec<IserverScannerParamsScanTypeList>>,
10948}
10949#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10950pub struct IserverScannerParamsFilterList {
10951 pub code: Option<String>,
10953 pub combo_values: Option<Vec<IserverScannerParamsFilterListComboValue>>,
10955 pub display_name: Option<String>,
10957 pub group: Option<String>,
10959 #[serde(rename = "type")]
10961 pub r#type: Option<String>,
10962}
10963#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10964pub struct IserverScannerParamsFilterListComboValue {
10965 pub default: Option<bool>,
10966 pub vendor: Option<serde_json::Value>,
10967}
10968#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10969pub struct IserverScannerParamsInstrumentList {
10970 pub display_name: Option<String>,
10972 pub filters: Option<Vec<serde_json::Value>>,
10974 #[serde(rename = "type")]
10976 pub r#type: Option<String>,
10977}
10978#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10979pub struct IserverScannerParamsLocationTree {
10980 pub display_name: Option<String>,
10982 pub locations: Option<Vec<IserverScannerParamsLocationTreeLocation>>,
10983 #[serde(rename = "type")]
10985 pub r#type: Option<String>,
10986}
10987#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10988pub struct IserverScannerParamsLocationTreeLocation {
10989 pub display_name: Option<String>,
10991 pub locations: Option<Vec<IserverScannerParamsLocationTreeLocationLocation>>,
10992 #[serde(rename = "type")]
10994 pub r#type: Option<String>,
10995}
10996#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
10997pub struct IserverScannerParamsLocationTreeLocationLocation {
10998 pub display_name: Option<String>,
10999 #[serde(rename = "type")]
11000 pub r#type: Option<String>,
11001}
11002#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11003pub struct IserverScannerParamsScanTypeList {
11004 pub code: Option<String>,
11006 pub display_name: Option<String>,
11008 pub instruments: Option<Vec<serde_json::Value>>,
11010}
11011#[serde_with::skip_serializing_none]
11012#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
11013pub struct IserverScannerRunRequest {
11014 pub filter: Option<Vec<IserverScannerRunRequestFilter>>,
11016 pub instrument: Option<String>,
11018 pub location: Option<String>,
11020 #[serde(rename = "type")]
11022 pub r#type: Option<String>,
11023}
11024#[serde_with::skip_serializing_none]
11025#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
11026pub struct IserverScannerRunRequestFilter {
11027 pub code: Option<String>,
11029 pub value: Option<IserverScannerRunRequestFilterValue>,
11031}
11032#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
11034#[serde(untagged)]
11035pub enum IserverScannerRunRequestFilterValue {
11036 #[default]
11037 String(String),
11038 Integer(i32),
11039 Boolean(bool),
11040 Number(f64),
11041}
11042#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11043pub struct IserverScannerRunResponse {
11044 pub contracts: Option<Vec<IserverScannerRunResponseContract>>,
11046 pub scan_data_column_name: Option<String>,
11048}
11049#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11050pub struct IserverScannerRunResponseContract {
11051 pub available_chart_periods: Option<String>,
11053 pub column_name: Option<String>,
11055 pub company_name: Option<String>,
11057 pub con_id: Option<i32>,
11059 pub conidex: Option<String>,
11061 pub contract_description_1: Option<String>,
11063 pub listing_exchange: Option<String>,
11065 pub sec_type: Option<String>,
11067 pub server_id: Option<String>,
11069 pub symbol: Option<String>,
11071}
11072pub type IserverSnapshot = Vec<IserverSnapshotKind>;
11074#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11075#[serde(untagged)]
11076pub enum IserverSnapshotKind {
11077 #[default]
11078 Variant0(serde_json::Value),
11079}
11080#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11082pub struct Ledger {
11083 #[serde(flatten)]
11085 pub additional_properties: std::collections::HashMap<String, serde_json::Value>,
11086}
11087#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11088pub struct LiveOrdersResponse {
11089 pub orders: Option<Vec<LiveOrdersResponseOrder>>,
11091 pub snapshot: Option<bool>,
11093}
11094#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11096pub struct LiveOrdersResponseOrder {
11097 pub account: Option<String>,
11099 pub acct: Option<String>,
11101 #[serde(rename = "avgPrice")]
11103 pub avg_price: Option<String>,
11104 #[serde(rename = "bgColor")]
11106 pub bg_color: Option<String>,
11107 #[serde(rename = "cashCcy")]
11109 pub cash_ccy: Option<String>,
11110 #[serde(rename = "companyName")]
11112 pub company_name: Option<String>,
11113 pub conid: Option<String>,
11115 pub conidex: Option<String>,
11117 pub description1: Option<String>,
11119 pub description2: Option<String>,
11121 pub exchange: Option<String>,
11123 #[serde(rename = "fgColor")]
11125 pub fg_color: Option<String>,
11126 #[serde(rename = "filledQuantity")]
11128 pub filled_quantity: Option<String>,
11129 #[serde(rename = "isEventTrading")]
11131 pub is_event_trading: Option<AlertActivationRequestAlertActive>,
11132 #[serde(rename = "lastExecutionTime")]
11134 pub last_execution_time: Option<String>,
11135 #[serde(rename = "lastExecutionTime_r")]
11137 pub last_execution_time_r: Option<String>,
11138 #[serde(rename = "listingExchange")]
11140 pub listing_exchange: Option<String>,
11141 #[serde(rename = "orderDesc")]
11143 pub order_desc: Option<String>,
11144 #[serde(rename = "orderId")]
11146 pub order_id: Option<i32>,
11147 #[serde(rename = "orderType")]
11149 pub order_type: Option<String>,
11150 pub order_cancellation_by_system_reason: Option<String>,
11152 pub order_ccp_status: Option<String>,
11154 #[serde(rename = "origOrderType")]
11156 pub orig_order_type: Option<String>,
11157 pub price: Option<String>,
11159 #[serde(rename = "remainingQuantity")]
11161 pub remaining_quantity: Option<String>,
11162 #[serde(rename = "secType")]
11164 pub sec_type: Option<String>,
11165 pub side: Option<String>,
11167 #[serde(rename = "sizeAndFills")]
11169 pub size_and_fills: Option<String>,
11170 pub status: Option<OrderStatusOrderStatus>,
11172 #[serde(rename = "supportsTaxOpt")]
11174 pub supports_tax_opt: Option<AlertActivationRequestAlertActive>,
11175 #[serde(rename = "taxOptimizerId")]
11177 pub tax_optimizer_id: Option<String>,
11178 pub ticker: Option<String>,
11180 #[serde(rename = "timeInForce")]
11182 pub time_in_force: Option<String>,
11183 #[serde(rename = "totalCashSize")]
11185 pub total_cash_size: Option<String>,
11186 #[serde(rename = "totalSize")]
11188 pub total_size: Option<String>,
11189}
11190#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11191pub struct LiveSessionToken200Response {
11192 pub diffie_hellman_challenge: Option<String>,
11194 pub live_session_token_expiration: Option<i32>,
11196 pub live_session_token_signature: Option<String>,
11198}
11199#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11200pub struct LoginMessage {
11201 #[serde(rename = "contentId")]
11202 pub content_id: Option<i32>,
11203 pub description: Option<String>,
11204 pub id: Option<i32>,
11205 #[serde(rename = "messageType")]
11206 pub message_type: Option<String>,
11207 #[serde(rename = "recordDate")]
11208 pub record_date: Option<chrono::DateTime<chrono::Utc>>,
11209 pub state: Option<String>,
11210 pub tasks: Option<Vec<i32>>,
11211 pub username: Option<String>,
11212}
11213#[serde_with::skip_serializing_none]
11214#[derive(
11215 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
11216)]
11217pub struct LoginMessageRequest {
11218 #[serde(rename = "endDate")]
11219 pub end_date: chrono::NaiveDate,
11220 #[validate(range(min = 1i32, max = 1_000i32))]
11221 pub limit: Option<i32>,
11222 #[validate(range(min = 0i32))]
11223 pub offset: Option<i32>,
11224 #[serde(rename = "startDate")]
11225 pub start_date: chrono::NaiveDate,
11226 pub status: Option<RequestStatus>,
11227 #[serde(rename = "type")]
11228 pub r#type: Option<String>,
11229}
11230#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11231pub struct LoginMessageResponse {
11232 #[serde(rename = "accountId")]
11233 pub account_id: Option<String>,
11234 #[serde(rename = "clearingStatus")]
11235 pub clearing_status: Option<String>,
11236 #[serde(rename = "clearingStatusDescription")]
11237 pub clearing_status_description: Option<String>,
11238 #[serde(rename = "loginMessagePresent")]
11239 pub login_message_present: Option<bool>,
11240 #[serde(rename = "loginMessages")]
11241 pub login_messages: Option<Vec<LoginMessage>>,
11242}
11243#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
11245pub struct LogoutRequest {}
11246impl LogoutRequest {
11247 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<LogoutResponse> {
11249 let status = req.status();
11250 if status == http::StatusCode::OK {
11251 let data = oas3_gen_support::Diagnostics::<StatusResponse4>::json_with_diagnostics(req)
11252 .await?;
11253 return Ok(LogoutResponse::Ok(data));
11254 }
11255 if status == http::StatusCode::UNAUTHORIZED {
11256 let _ = req.bytes().await?;
11257 return Ok(LogoutResponse::Unauthorized);
11258 }
11259 let _ = req.bytes().await?;
11260 return Ok(LogoutResponse::Unknown);
11261 }
11262}
11263#[derive(Debug, Clone)]
11265pub enum LogoutResponse {
11266 Ok(StatusResponse4),
11268 Unauthorized,
11270 Unknown,
11272}
11273#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
11387pub enum MdFields {
11388 #[serde(rename = "31")]
11389 #[default]
11390 T31,
11391 #[serde(rename = "55")]
11392 T55,
11393 #[serde(rename = "58")]
11394 T58,
11395 #[serde(rename = "70")]
11396 T70,
11397 #[serde(rename = "71")]
11398 T71,
11399 #[serde(rename = "73")]
11400 T73,
11401 #[serde(rename = "74")]
11402 T74,
11403 #[serde(rename = "75")]
11404 T75,
11405 #[serde(rename = "76")]
11406 T76,
11407 #[serde(rename = "77")]
11408 T77,
11409 #[serde(rename = "78")]
11410 T78,
11411 #[serde(rename = "79")]
11412 T79,
11413 #[serde(rename = "80")]
11414 T80,
11415 #[serde(rename = "82")]
11416 T82,
11417 #[serde(rename = "83")]
11418 T83,
11419 #[serde(rename = "84")]
11420 T84,
11421 #[serde(rename = "85")]
11422 T85,
11423 #[serde(rename = "86")]
11424 T86,
11425 #[serde(rename = "87")]
11426 T87,
11427 #[serde(rename = "88")]
11428 T88,
11429 #[serde(rename = "6004")]
11430 T6004,
11431 #[serde(rename = "6008")]
11432 T6008,
11433 #[serde(rename = "6070")]
11434 T6070,
11435 #[serde(rename = "6072")]
11436 T6072,
11437 #[serde(rename = "6073")]
11438 T6073,
11439 #[serde(rename = "6119")]
11440 T6119,
11441 #[serde(rename = "6457")]
11442 T6457,
11443 #[serde(rename = "6508")]
11444 T6508,
11445 #[serde(rename = "6509")]
11446 T6509,
11447 #[serde(rename = "7051")]
11448 T7051,
11449 #[serde(rename = "7057")]
11450 T7057,
11451 #[serde(rename = "7058")]
11452 T7058,
11453 #[serde(rename = "7059")]
11454 T7059,
11455 #[serde(rename = "7068")]
11456 T7068,
11457 #[serde(rename = "7084")]
11458 T7084,
11459 #[serde(rename = "7085")]
11460 T7085,
11461 #[serde(rename = "7086")]
11462 T7086,
11463 #[serde(rename = "7087")]
11464 T7087,
11465 #[serde(rename = "7088")]
11466 T7088,
11467 #[serde(rename = "7089")]
11468 T7089,
11469 #[serde(rename = "7094")]
11470 T7094,
11471 #[serde(rename = "7184")]
11472 T7184,
11473 #[serde(rename = "7219")]
11474 T7219,
11475 #[serde(rename = "7220")]
11476 T7220,
11477 #[serde(rename = "7221")]
11478 T7221,
11479 #[serde(rename = "7280")]
11480 T7280,
11481 #[serde(rename = "7281")]
11482 T7281,
11483 #[serde(rename = "7282")]
11484 T7282,
11485 #[serde(rename = "7283")]
11486 T7283,
11487 #[serde(rename = "7284")]
11488 T7284,
11489 #[serde(rename = "7285")]
11490 T7285,
11491 #[serde(rename = "7292")]
11492 T7292,
11493 #[serde(rename = "7293")]
11494 T7293,
11495 #[serde(rename = "7294")]
11496 T7294,
11497 #[serde(rename = "7295")]
11498 T7295,
11499 #[serde(rename = "7296")]
11500 T7296,
11501 #[serde(rename = "7308")]
11502 T7308,
11503 #[serde(rename = "7309")]
11504 T7309,
11505 #[serde(rename = "7310")]
11506 T7310,
11507 #[serde(rename = "7311")]
11508 T7311,
11509 #[serde(rename = "7607")]
11510 T7607,
11511 #[serde(rename = "7633")]
11512 T7633,
11513 #[serde(rename = "7635")]
11514 T7635,
11515 #[serde(rename = "7636")]
11516 T7636,
11517 #[serde(rename = "7637")]
11518 T7637,
11519 #[serde(rename = "7638")]
11520 T7638,
11521 #[serde(rename = "7639")]
11522 T7639,
11523 #[serde(rename = "7644")]
11524 T7644,
11525 #[serde(rename = "7671")]
11526 T7671,
11527 #[serde(rename = "7672")]
11528 T7672,
11529 #[serde(rename = "7674")]
11530 T7674,
11531 #[serde(rename = "7675")]
11532 T7675,
11533 #[serde(rename = "7676")]
11534 T7676,
11535 #[serde(rename = "7677")]
11536 T7677,
11537 #[serde(rename = "7678")]
11538 T7678,
11539 #[serde(rename = "7679")]
11540 T7679,
11541 #[serde(rename = "7724")]
11542 T7724,
11543 #[serde(rename = "7681")]
11544 T7681,
11545 #[serde(rename = "7682")]
11546 T7682,
11547 #[serde(rename = "7683")]
11548 T7683,
11549 #[serde(rename = "7684")]
11550 T7684,
11551 #[serde(rename = "7685")]
11552 T7685,
11553 #[serde(rename = "7686")]
11554 T7686,
11555 #[serde(rename = "7687")]
11556 T7687,
11557 #[serde(rename = "7688")]
11558 T7688,
11559 #[serde(rename = "7689")]
11560 T7689,
11561 #[serde(rename = "7690")]
11562 T7690,
11563 #[serde(rename = "7694")]
11564 T7694,
11565 #[serde(rename = "7695")]
11566 T7695,
11567 #[serde(rename = "7696")]
11568 T7696,
11569 #[serde(rename = "7697")]
11570 T7697,
11571 #[serde(rename = "7698")]
11572 T7698,
11573 #[serde(rename = "7699")]
11574 T7699,
11575 #[serde(rename = "7700")]
11576 T7700,
11577 #[serde(rename = "7702")]
11578 T7702,
11579 #[serde(rename = "7703")]
11580 T7703,
11581 #[serde(rename = "7704")]
11582 T7704,
11583 #[serde(rename = "7705")]
11584 T7705,
11585 #[serde(rename = "7706")]
11586 T7706,
11587 #[serde(rename = "7707")]
11588 T7707,
11589 #[serde(rename = "7708")]
11590 T7708,
11591 #[serde(rename = "7714")]
11592 T7714,
11593 #[serde(rename = "7715")]
11594 T7715,
11595 #[serde(rename = "7720")]
11596 T7720,
11597 #[serde(rename = "7741")]
11598 T7741,
11599 #[serde(rename = "7762")]
11600 T7762,
11601 #[serde(rename = "7768")]
11602 T7768,
11603 #[serde(rename = "7920")]
11604 T7920,
11605 #[serde(rename = "7921")]
11606 T7921,
11607 #[serde(rename = "7943")]
11608 T7943,
11609}
11610impl core::fmt::Display for MdFields {
11611 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11612 match self {
11613 Self::T31 => write!(f, "31"),
11614 Self::T55 => write!(f, "55"),
11615 Self::T58 => write!(f, "58"),
11616 Self::T70 => write!(f, "70"),
11617 Self::T71 => write!(f, "71"),
11618 Self::T73 => write!(f, "73"),
11619 Self::T74 => write!(f, "74"),
11620 Self::T75 => write!(f, "75"),
11621 Self::T76 => write!(f, "76"),
11622 Self::T77 => write!(f, "77"),
11623 Self::T78 => write!(f, "78"),
11624 Self::T79 => write!(f, "79"),
11625 Self::T80 => write!(f, "80"),
11626 Self::T82 => write!(f, "82"),
11627 Self::T83 => write!(f, "83"),
11628 Self::T84 => write!(f, "84"),
11629 Self::T85 => write!(f, "85"),
11630 Self::T86 => write!(f, "86"),
11631 Self::T87 => write!(f, "87"),
11632 Self::T88 => write!(f, "88"),
11633 Self::T6004 => write!(f, "6004"),
11634 Self::T6008 => write!(f, "6008"),
11635 Self::T6070 => write!(f, "6070"),
11636 Self::T6072 => write!(f, "6072"),
11637 Self::T6073 => write!(f, "6073"),
11638 Self::T6119 => write!(f, "6119"),
11639 Self::T6457 => write!(f, "6457"),
11640 Self::T6508 => write!(f, "6508"),
11641 Self::T6509 => write!(f, "6509"),
11642 Self::T7051 => write!(f, "7051"),
11643 Self::T7057 => write!(f, "7057"),
11644 Self::T7058 => write!(f, "7058"),
11645 Self::T7059 => write!(f, "7059"),
11646 Self::T7068 => write!(f, "7068"),
11647 Self::T7084 => write!(f, "7084"),
11648 Self::T7085 => write!(f, "7085"),
11649 Self::T7086 => write!(f, "7086"),
11650 Self::T7087 => write!(f, "7087"),
11651 Self::T7088 => write!(f, "7088"),
11652 Self::T7089 => write!(f, "7089"),
11653 Self::T7094 => write!(f, "7094"),
11654 Self::T7184 => write!(f, "7184"),
11655 Self::T7219 => write!(f, "7219"),
11656 Self::T7220 => write!(f, "7220"),
11657 Self::T7221 => write!(f, "7221"),
11658 Self::T7280 => write!(f, "7280"),
11659 Self::T7281 => write!(f, "7281"),
11660 Self::T7282 => write!(f, "7282"),
11661 Self::T7283 => write!(f, "7283"),
11662 Self::T7284 => write!(f, "7284"),
11663 Self::T7285 => write!(f, "7285"),
11664 Self::T7292 => write!(f, "7292"),
11665 Self::T7293 => write!(f, "7293"),
11666 Self::T7294 => write!(f, "7294"),
11667 Self::T7295 => write!(f, "7295"),
11668 Self::T7296 => write!(f, "7296"),
11669 Self::T7308 => write!(f, "7308"),
11670 Self::T7309 => write!(f, "7309"),
11671 Self::T7310 => write!(f, "7310"),
11672 Self::T7311 => write!(f, "7311"),
11673 Self::T7607 => write!(f, "7607"),
11674 Self::T7633 => write!(f, "7633"),
11675 Self::T7635 => write!(f, "7635"),
11676 Self::T7636 => write!(f, "7636"),
11677 Self::T7637 => write!(f, "7637"),
11678 Self::T7638 => write!(f, "7638"),
11679 Self::T7639 => write!(f, "7639"),
11680 Self::T7644 => write!(f, "7644"),
11681 Self::T7671 => write!(f, "7671"),
11682 Self::T7672 => write!(f, "7672"),
11683 Self::T7674 => write!(f, "7674"),
11684 Self::T7675 => write!(f, "7675"),
11685 Self::T7676 => write!(f, "7676"),
11686 Self::T7677 => write!(f, "7677"),
11687 Self::T7678 => write!(f, "7678"),
11688 Self::T7679 => write!(f, "7679"),
11689 Self::T7724 => write!(f, "7724"),
11690 Self::T7681 => write!(f, "7681"),
11691 Self::T7682 => write!(f, "7682"),
11692 Self::T7683 => write!(f, "7683"),
11693 Self::T7684 => write!(f, "7684"),
11694 Self::T7685 => write!(f, "7685"),
11695 Self::T7686 => write!(f, "7686"),
11696 Self::T7687 => write!(f, "7687"),
11697 Self::T7688 => write!(f, "7688"),
11698 Self::T7689 => write!(f, "7689"),
11699 Self::T7690 => write!(f, "7690"),
11700 Self::T7694 => write!(f, "7694"),
11701 Self::T7695 => write!(f, "7695"),
11702 Self::T7696 => write!(f, "7696"),
11703 Self::T7697 => write!(f, "7697"),
11704 Self::T7698 => write!(f, "7698"),
11705 Self::T7699 => write!(f, "7699"),
11706 Self::T7700 => write!(f, "7700"),
11707 Self::T7702 => write!(f, "7702"),
11708 Self::T7703 => write!(f, "7703"),
11709 Self::T7704 => write!(f, "7704"),
11710 Self::T7705 => write!(f, "7705"),
11711 Self::T7706 => write!(f, "7706"),
11712 Self::T7707 => write!(f, "7707"),
11713 Self::T7708 => write!(f, "7708"),
11714 Self::T7714 => write!(f, "7714"),
11715 Self::T7715 => write!(f, "7715"),
11716 Self::T7720 => write!(f, "7720"),
11717 Self::T7741 => write!(f, "7741"),
11718 Self::T7762 => write!(f, "7762"),
11719 Self::T7768 => write!(f, "7768"),
11720 Self::T7920 => write!(f, "7920"),
11721 Self::T7921 => write!(f, "7921"),
11722 Self::T7943 => write!(f, "7943"),
11723 }
11724 }
11725}
11726#[serde_with::skip_serializing_none]
11727#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
11728pub struct MessageIdRequestBody {
11729 #[serde(rename = "messageIds")]
11731 pub message_ids: Option<Vec<MessageIdRequestBodyMessageId>>,
11732}
11733#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
11767pub enum MessageIdRequestBodyMessageId {
11768 #[serde(rename = "o163")]
11769 #[default]
11770 O163,
11771 #[serde(rename = "o354")]
11772 O354,
11773 #[serde(rename = "o382")]
11774 O382,
11775 #[serde(rename = "o383")]
11776 O383,
11777 #[serde(rename = "o403")]
11778 O403,
11779 #[serde(rename = "o451")]
11780 O451,
11781 #[serde(rename = "o2136")]
11782 O2136,
11783 #[serde(rename = "o2137")]
11784 O2137,
11785 #[serde(rename = "o2165")]
11786 O2165,
11787 #[serde(rename = "o10082")]
11788 O10082,
11789 #[serde(rename = "o10138")]
11790 O10138,
11791 #[serde(rename = "o10151")]
11792 O10151,
11793 #[serde(rename = "o10152")]
11794 O10152,
11795 #[serde(rename = "o10153")]
11796 O10153,
11797 #[serde(rename = "o10164")]
11798 O10164,
11799 #[serde(rename = "o10223")]
11800 O10223,
11801 #[serde(rename = "o10288")]
11802 O10288,
11803 #[serde(rename = "o10331")]
11804 O10331,
11805 #[serde(rename = "o10332")]
11806 O10332,
11807 #[serde(rename = "o10333")]
11808 O10333,
11809 #[serde(rename = "o10334")]
11810 O10334,
11811 #[serde(rename = "o10335")]
11812 O10335,
11813 #[serde(rename = "o10336")]
11814 O10336,
11815 #[serde(rename = "p6")]
11816 P6,
11817 #[serde(rename = "p12")]
11818 P12,
11819}
11820impl core::fmt::Display for MessageIdRequestBodyMessageId {
11821 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11822 match self {
11823 Self::O163 => write!(f, "o163"),
11824 Self::O354 => write!(f, "o354"),
11825 Self::O382 => write!(f, "o382"),
11826 Self::O383 => write!(f, "o383"),
11827 Self::O403 => write!(f, "o403"),
11828 Self::O451 => write!(f, "o451"),
11829 Self::O2136 => write!(f, "o2136"),
11830 Self::O2137 => write!(f, "o2137"),
11831 Self::O2165 => write!(f, "o2165"),
11832 Self::O10082 => write!(f, "o10082"),
11833 Self::O10138 => write!(f, "o10138"),
11834 Self::O10151 => write!(f, "o10151"),
11835 Self::O10152 => write!(f, "o10152"),
11836 Self::O10153 => write!(f, "o10153"),
11837 Self::O10164 => write!(f, "o10164"),
11838 Self::O10223 => write!(f, "o10223"),
11839 Self::O10288 => write!(f, "o10288"),
11840 Self::O10331 => write!(f, "o10331"),
11841 Self::O10332 => write!(f, "o10332"),
11842 Self::O10333 => write!(f, "o10333"),
11843 Self::O10334 => write!(f, "o10334"),
11844 Self::O10335 => write!(f, "o10335"),
11845 Self::O10336 => write!(f, "o10336"),
11846 Self::P6 => write!(f, "p6"),
11847 Self::P12 => write!(f, "p12"),
11848 }
11849 }
11850}
11851#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11852pub struct MessageResponse {
11853 pub message: Option<String>,
11855}
11856#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11857pub struct ModelListResponse {
11858 #[serde(rename = "baseCcy")]
11860 pub base_ccy: Option<String>,
11861 #[serde(rename = "masterAccount")]
11863 pub master_account: Option<String>,
11864 pub models: Option<Vec<ModelListResponseItem>>,
11866 #[serde(rename = "reqID")]
11869 pub req_id: Option<i32>,
11870 #[serde(rename = "subscriptionStatus")]
11872 pub subscription_status: Option<i32>,
11873}
11874#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11875pub struct ModelListResponseItem {
11876 pub bootstrapped: Option<bool>,
11878 #[serde(rename = "customIndex")]
11880 pub custom_index: Option<bool>,
11881 pub desc: Option<String>,
11883 #[serde(rename = "isStatic")]
11885 pub is_static: Option<bool>,
11886 pub mismatch: Option<bool>,
11888 pub model: Option<String>,
11890 pub nlv: Option<f64>,
11892 #[serde(rename = "numAccounts")]
11894 pub num_accounts: Option<i32>,
11895}
11896#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11897pub struct ModelPositionResponse {
11898 pub cash: Option<Vec<ModelPositionResponseCash>>,
11900 pub mismatched: Option<bool>,
11902 pub model: Option<String>,
11904 pub nlv: Option<f64>,
11906 #[serde(rename = "positionList")]
11908 pub position_list: Option<Vec<ModelPositionResponsePositionList>>,
11909 #[serde(rename = "positionTs")]
11911 pub position_ts: Option<i64>,
11912 #[serde(rename = "reqID")]
11914 pub req_id: Option<i32>,
11915 #[serde(rename = "stkOnly")]
11917 pub stk_only: Option<bool>,
11918 #[serde(rename = "subscriptionStatus")]
11920 pub subscription_status: Option<i32>,
11921 #[serde(rename = "totalDlv")]
11923 pub total_dlv: Option<f64>,
11924 #[serde(rename = "totalMv")]
11926 pub total_mv: Option<f64>,
11927}
11928#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11929pub struct ModelPositionResponseCash {
11930 pub actual: Option<f64>,
11932 pub ccy: Option<String>,
11934 #[serde(rename = "exchangeRate")]
11936 pub exchange_rate: Option<f64>,
11937 #[serde(rename = "instrumentImbalance")]
11939 pub instrument_imbalance: Option<f64>,
11940 pub mv: Option<f64>,
11942 pub target: Option<f64>,
11944}
11945#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
11946pub struct ModelPositionResponsePositionList {
11947 pub actual: Option<f64>,
11949 #[serde(rename = "actualRangeMax")]
11951 pub actual_range_max: Option<f64>,
11952 #[serde(rename = "actualRangeMin")]
11954 pub actual_range_min: Option<f64>,
11955 pub ccy: Option<String>,
11957 pub conid: Option<f64>,
11959 pub dlv: Option<f64>,
11961 #[serde(rename = "exchangeRate")]
11963 pub exchange_rate: Option<f64>,
11964 pub flags: Option<i32>,
11966 pub instrument: Option<String>,
11968 #[serde(rename = "instrumentImbalance")]
11970 pub instrument_imbalance: Option<f64>,
11971 #[serde(rename = "mismatchType")]
11973 pub mismatch_type: Option<f64>,
11974 pub mv: Option<f64>,
11976 pub position: Option<f64>,
11978 pub target: Option<f64>,
11980}
11981#[serde_with::skip_serializing_none]
11982#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, oas3_gen_support::Default)]
11983pub struct ModelPresetsResponse {
11984 #[serde(rename = "avoidNegativeCashInIndependent")]
11986 pub avoid_negative_cash_in_independent: Option<bool>,
11987 #[serde(rename = "closeDivestIndependentPosition")]
11989 pub close_divest_independent_position: Option<bool>,
11990 #[serde(rename = "fullyInvestExistingLongPositions")]
11992 pub fully_invest_existing_long_positions: Option<bool>,
11993 #[serde(rename = "keepModelOpen")]
11995 pub keep_model_open: Option<bool>,
11996 #[serde(rename = "preferCrossWithIndependent")]
11998 pub prefer_cross_with_independent: Option<bool>,
11999 #[serde(rename = "preferTransferFromIndependent")]
12001 pub prefer_transfer_from_independent: Option<bool>,
12002 #[serde(rename = "reqID")]
12004 pub req_id: Option<i32>,
12005 #[serde(rename = "roundAllocationQuantityToExchangeBoardLot")]
12007 pub round_allocation_quantity_to_exchange_board_lot: Option<bool>,
12008 #[serde(rename = "subscriptionStatus")]
12010 pub subscription_status: Option<i32>,
12011 #[serde(rename = "useNonBaseCcy")]
12013 pub use_non_base_ccy: Option<bool>,
12014 #[serde(rename = "useToleranceRange")]
12016 pub use_tolerance_range: Option<bool>,
12017}
12018#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12019pub struct ModelSummaryResponse {
12020 pub bootstrapped: Option<bool>,
12022 #[serde(rename = "customIndex")]
12024 pub custom_index: Option<bool>,
12025 pub desc: Option<String>,
12027 #[serde(rename = "isStatic")]
12029 pub is_static: Option<bool>,
12030 pub mismatch: Option<bool>,
12032 pub model: Option<String>,
12034 pub nlv: Option<f64>,
12036 #[serde(rename = "numAccounts")]
12038 pub num_accounts: Option<i32>,
12039 #[serde(rename = "reqID")]
12042 pub req_id: Option<i32>,
12043 #[serde(rename = "subscriptionStatus")]
12045 pub subscription_status: Option<i32>,
12046}
12047#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12049pub struct ModifyAllocationGroupRequest {
12050 #[validate(nested)]
12051 pub body: GroupRequestBody,
12052}
12053impl ModifyAllocationGroupRequest {
12054 pub async fn parse_response(
12056 req: reqwest::Response,
12057 ) -> anyhow::Result<CreateAllocationGroupResponse> {
12058 let status = req.status();
12059 if status == http::StatusCode::OK {
12060 let data = oas3_gen_support::Diagnostics::<SuccessResponse>::json_with_diagnostics(req)
12061 .await?;
12062 return Ok(CreateAllocationGroupResponse::Ok(data));
12063 }
12064 if status == http::StatusCode::UNAUTHORIZED {
12065 let _ = req.bytes().await?;
12066 return Ok(CreateAllocationGroupResponse::Unauthorized);
12067 }
12068 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12069 let _ = req.bytes().await?;
12070 return Ok(CreateAllocationGroupResponse::InternalServerError);
12071 }
12072 if status == http::StatusCode::SERVICE_UNAVAILABLE {
12073 let _ = req.bytes().await?;
12074 return Ok(CreateAllocationGroupResponse::ServiceUnavailable);
12075 }
12076 let _ = req.bytes().await?;
12077 return Ok(CreateAllocationGroupResponse::Unknown);
12078 }
12079}
12080#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12082pub struct ModifyFyiDeliveryRequest {
12083 pub body: FyiEnableDeviceOption,
12084}
12085impl ModifyFyiDeliveryRequest {
12086 pub async fn parse_response(
12088 req: reqwest::Response,
12089 ) -> anyhow::Result<ModifyFyiDeliveryResponse> {
12090 let status = req.status();
12091 if status == http::StatusCode::OK {
12092 let data = oas3_gen_support::Diagnostics::<FyiVT>::json_with_diagnostics(req).await?;
12093 return Ok(ModifyFyiDeliveryResponse::Ok(data));
12094 }
12095 if status == http::StatusCode::BAD_REQUEST {
12096 let _ = req.bytes().await?;
12097 return Ok(ModifyFyiDeliveryResponse::BadRequest);
12098 }
12099 if status == http::StatusCode::UNAUTHORIZED {
12100 let _ = req.bytes().await?;
12101 return Ok(ModifyFyiDeliveryResponse::Unauthorized);
12102 }
12103 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12104 let _ = req.bytes().await?;
12105 return Ok(ModifyFyiDeliveryResponse::InternalServerError);
12106 }
12107 if status == http::StatusCode::SERVICE_UNAVAILABLE {
12108 let _ = req.bytes().await?;
12109 return Ok(ModifyFyiDeliveryResponse::ServiceUnavailable);
12110 }
12111 let _ = req.bytes().await?;
12112 return Ok(ModifyFyiDeliveryResponse::Unknown);
12113 }
12114}
12115#[derive(Debug, Clone)]
12117pub enum ModifyFyiDeliveryResponse {
12118 Ok(FyiVT),
12120 BadRequest,
12122 Unauthorized,
12124 InternalServerError,
12127 ServiceUnavailable,
12130 Unknown,
12132}
12133#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12135pub struct ModifyFyiEmailsRequest {
12136 pub query: ModifyFyiEmailsRequestQuery,
12137}
12138impl ModifyFyiEmailsRequest {
12139 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ModifyFyiEmailsResponse> {
12141 let status = req.status();
12142 if status == http::StatusCode::OK {
12143 let data = oas3_gen_support::Diagnostics::<FyiVT>::json_with_diagnostics(req).await?;
12144 return Ok(ModifyFyiEmailsResponse::Ok(data));
12145 }
12146 if status == http::StatusCode::UNAUTHORIZED {
12147 let _ = req.bytes().await?;
12148 return Ok(ModifyFyiEmailsResponse::Unauthorized);
12149 }
12150 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12151 let _ = req.bytes().await?;
12152 return Ok(ModifyFyiEmailsResponse::InternalServerError);
12153 }
12154 if status == http::StatusCode::SERVICE_UNAVAILABLE {
12155 let _ = req.bytes().await?;
12156 return Ok(ModifyFyiEmailsResponse::ServiceUnavailable);
12157 }
12158 let _ = req.bytes().await?;
12159 return Ok(ModifyFyiEmailsResponse::Unknown);
12160 }
12161}
12162#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
12163pub struct ModifyFyiEmailsRequestQuery {
12164 pub enabled: serde_json::Value,
12166}
12167#[derive(Debug, Clone)]
12169pub enum ModifyFyiEmailsResponse {
12170 Ok(FyiVT),
12172 Unauthorized,
12174 InternalServerError,
12177 ServiceUnavailable,
12180 Unknown,
12182}
12183#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12185pub struct ModifyFyiNotificationRequest {
12186 pub path: ModifyFyiNotificationRequestPath,
12187 pub body: EnabledRequestBody,
12188}
12189impl ModifyFyiNotificationRequest {
12190 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ModifyFyiEmailsResponse> {
12192 let status = req.status();
12193 if status == http::StatusCode::OK {
12194 let data = oas3_gen_support::Diagnostics::<FyiVT>::json_with_diagnostics(req).await?;
12195 return Ok(ModifyFyiEmailsResponse::Ok(data));
12196 }
12197 if status == http::StatusCode::UNAUTHORIZED {
12198 let _ = req.bytes().await?;
12199 return Ok(ModifyFyiEmailsResponse::Unauthorized);
12200 }
12201 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12202 let _ = req.bytes().await?;
12203 return Ok(ModifyFyiEmailsResponse::InternalServerError);
12204 }
12205 if status == http::StatusCode::SERVICE_UNAVAILABLE {
12206 let _ = req.bytes().await?;
12207 return Ok(ModifyFyiEmailsResponse::ServiceUnavailable);
12208 }
12209 let _ = req.bytes().await?;
12210 return Ok(ModifyFyiEmailsResponse::Unknown);
12211 }
12212}
12213#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
12214pub struct ModifyFyiNotificationRequestPath {
12215 pub typecode: Typecodes,
12240}
12241#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12243pub struct ModifyOpenOrderRequest {
12244 #[validate(nested)]
12245 pub path: ModifyOpenOrderRequestPath,
12246 #[validate(nested)]
12247 pub body: SingleOrderSubmissionRequest,
12248}
12249impl ModifyOpenOrderRequest {
12250 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ModifyOpenOrderResponse> {
12252 let status = req.status();
12253 if status == http::StatusCode::OK {
12254 let data =
12255 oas3_gen_support::Diagnostics::<Order200Response>::json_with_diagnostics(req)
12256 .await?;
12257 return Ok(ModifyOpenOrderResponse::Ok(data));
12258 }
12259 if status == http::StatusCode::BAD_REQUEST {
12260 let _ = req.bytes().await?;
12261 return Ok(ModifyOpenOrderResponse::BadRequest);
12262 }
12263 if status == http::StatusCode::UNAUTHORIZED {
12264 let _ = req.bytes().await?;
12265 return Ok(ModifyOpenOrderResponse::Unauthorized);
12266 }
12267 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12268 let _ = req.bytes().await?;
12269 return Ok(ModifyOpenOrderResponse::InternalServerError);
12270 }
12271 if status == http::StatusCode::SERVICE_UNAVAILABLE {
12272 let _ = req.bytes().await?;
12273 return Ok(ModifyOpenOrderResponse::ServiceUnavailable);
12274 }
12275 let _ = req.bytes().await?;
12276 return Ok(ModifyOpenOrderResponse::Unknown);
12277 }
12278}
12279#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
12280pub struct ModifyOpenOrderRequestPath {
12281 #[validate(length(min = 1u64))]
12284 pub account_id: String,
12285 pub order_id: i32,
12288}
12289#[derive(Debug, Clone)]
12291pub enum ModifyOpenOrderResponse {
12292 Ok(Order200Response),
12294 BadRequest,
12296 Unauthorized,
12298 InternalServerError,
12301 ServiceUnavailable,
12304 Unknown,
12306}
12307#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
12308pub struct NameRequestBody {
12309 #[validate(length(min = 1u64))]
12312 pub name: String,
12313}
12314#[serde_with::skip_serializing_none]
12315#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
12316pub struct NonDisclosedDetail {
12317 #[serde(rename = "buyerSellBic")]
12319 #[validate(length(min = 0u64, max = 64u64))]
12320 pub buyer_sell_bic: Option<String>,
12321 #[serde(rename = "memberAccountId")]
12323 #[validate(length(min = 0u64, max = 64u64))]
12324 pub member_account_id: Option<String>,
12325 #[serde(rename = "psetBic")]
12327 #[validate(length(min = 0u64, max = 64u64))]
12328 pub pset_bic: Option<String>,
12329 #[serde(rename = "reagDeagBic")]
12331 #[validate(length(min = 0u64, max = 64u64))]
12332 pub reag_deag_bic: Option<String>,
12333 #[serde(rename = "safeKeepingAccountId")]
12335 #[validate(length(min = 0u64, max = 64u64))]
12336 pub safe_keeping_account_id: Option<String>,
12337 #[serde(rename = "settleDate")]
12339 #[validate(length(min = 1u64))]
12340 pub settle_date: String,
12341 #[serde(rename = "tradeDate")]
12343 #[validate(length(min = 1u64))]
12344 pub trade_date: String,
12345}
12346#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12347pub struct NotificationReadAcknowledge {
12348 #[serde(rename = "P")]
12350 pub p: Option<NotificationReadAcknowledgeP>,
12351 #[serde(rename = "T")]
12353 pub t: Option<i32>,
12354 #[serde(rename = "V")]
12356 pub v: Option<i32>,
12357}
12358#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12360pub struct NotificationReadAcknowledgeP {
12361 #[serde(rename = "ID")]
12363 pub id: Option<String>,
12364 #[serde(rename = "R")]
12366 pub r: Option<i32>,
12367}
12368#[serde_with::skip_serializing_none]
12369#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
12370pub struct NotificationRequestBody {
12371 #[serde(rename = "orderId")]
12374 pub order_id: Option<i32>,
12375 #[serde(rename = "reqId")]
12378 pub req_id: Option<String>,
12379 pub text: Option<String>,
12382}
12383pub type Notifications = Vec<NotificationsNotification>;
12384#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12385pub struct NotificationsNotification {
12386 #[serde(rename = "D")]
12388 pub d: Option<String>,
12389 #[serde(rename = "FC")]
12391 pub fc: Option<String>,
12392 #[serde(rename = "HT")]
12395 pub ht: Option<i32>,
12396 #[serde(rename = "ID")]
12398 pub id: Option<String>,
12399 #[serde(rename = "MD")]
12401 pub md: Option<String>,
12402 #[serde(rename = "MS")]
12404 pub ms: Option<String>,
12405 #[serde(rename = "R")]
12407 pub r: Option<String>,
12408}
12409#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12410pub struct OauthTokenResponse {
12411 pub oauth_token: Option<String>,
12413}
12414#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12415#[serde(untagged)]
12416pub enum Order200Response {
12417 #[default]
12419 OrderSubmitSuccess(OrderSubmitSuccess),
12420 OrderSubmitError(OrderSubmitError),
12422 OrderReplyMessage(OrderReplyMessage),
12424 AdvancedOrderReject(AdvancedOrderReject),
12426}
12427impl Order200Response {
12428 pub fn order_submit_error(error: Option<String>) -> Self {
12430 Self::OrderSubmitError(OrderSubmitError {
12431 error,
12432 ..Default::default()
12433 })
12434 }
12435 pub fn advanced_order_reject() -> Self {
12437 Self::AdvancedOrderReject(AdvancedOrderReject::default())
12438 }
12439}
12440#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12441#[serde(untagged)]
12442pub enum Order200Response2 {
12443 #[default]
12445 CancelSuccess(OrderCancelSuccess),
12446 SubmitError(OrderSubmitError),
12448}
12449impl Order200Response2 {
12450 pub fn cancel_success() -> Self {
12452 Self::CancelSuccess(OrderCancelSuccess::default())
12453 }
12454 pub fn submit_error(error: Option<String>) -> Self {
12456 Self::SubmitError(OrderSubmitError {
12457 error,
12458 ..Default::default()
12459 })
12460 }
12461}
12462#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12463#[serde(untagged)]
12464pub enum Order200Response3 {
12465 #[default]
12467 OrderSubmitSuccess(OrderSubmitSuccess),
12468 OrderReplyMessage(OrderReplyMessage),
12470 OrderSubmitError(OrderSubmitError),
12472 AdvancedOrderReject(AdvancedOrderReject),
12474}
12475impl Order200Response3 {
12476 pub fn order_submit_error(error: Option<String>) -> Self {
12478 Self::OrderSubmitError(OrderSubmitError {
12479 error,
12480 ..Default::default()
12481 })
12482 }
12483 pub fn advanced_order_reject() -> Self {
12485 Self::AdvancedOrderReject(AdvancedOrderReject::default())
12486 }
12487}
12488#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12490#[serde(default)]
12491pub struct OrderCancelSuccess {
12492 pub account: Option<String>,
12494 pub conid: Option<String>,
12496 #[default(Some("Request was submitted".to_string()))]
12498 pub msg: Option<String>,
12499 pub order_id: Option<String>,
12501}
12502#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12504pub struct OrderPreview {
12505 pub amount: Option<OrderPreviewAmount>,
12507 pub equity: Option<OrderPreviewEquity>,
12509 pub error: Option<String>,
12511 pub initial: Option<OrderPreviewInitial>,
12513 pub maintenance: Option<OrderPreviewMaintenance>,
12515 pub position: Option<OrderPreviewPosition>,
12517 pub warn: Option<String>,
12519}
12520#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12522pub struct OrderPreviewAmount {
12523 pub amount: Option<String>,
12525 pub commission: Option<String>,
12527 pub total: Option<String>,
12529}
12530#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12532pub struct OrderPreviewEquity {
12533 pub after: Option<String>,
12535 pub change: Option<String>,
12537 pub current: Option<String>,
12539}
12540#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12542pub struct OrderPreviewInitial {
12543 pub after: Option<String>,
12545 pub change: Option<String>,
12547 pub current: Option<String>,
12549}
12550#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12552pub struct OrderPreviewMaintenance {
12553 pub after: Option<String>,
12555 pub change: Option<String>,
12557 pub current: Option<String>,
12559}
12560#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12562pub struct OrderPreviewPosition {
12563 pub after: Option<String>,
12565 pub change: Option<String>,
12567 pub current: Option<String>,
12569}
12570pub type OrderReplyMessage = Vec<OrderReplyMessageOrderReplyMessage>;
12572#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12574pub struct OrderReplyMessageOrderReplyMessage {
12575 pub id: Option<String>,
12577 #[serde(rename = "isSuppressed")]
12579 pub is_suppressed: Option<bool>,
12580 pub message: Option<Vec<String>>,
12582 #[serde(rename = "messageIds")]
12584 pub message_ids: Option<Vec<String>>,
12585}
12586#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12588pub struct OrderReplyNotFound {
12589 pub error: Option<String>,
12591}
12592#[serde_with::skip_serializing_none]
12594#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, oas3_gen_support::Default)]
12595pub struct OrderStatus {
12596 pub account: Option<String>,
12598 pub alert_active: Option<AlertActivationRequestAlertActive>,
12600 pub allowed_duplicate_opposite: Option<bool>,
12602 pub available_chart_periods: Option<String>,
12604 pub average_price: Option<String>,
12606 #[serde(rename = "bgColor")]
12608 pub bg_color: Option<String>,
12609 pub cannot_cancel_order: Option<bool>,
12611 pub child_order_type: Option<OrderStatusChildOrderType>,
12613 pub company_name: Option<String>,
12615 pub conid: Option<i32>,
12617 pub conidex: Option<String>,
12619 pub contract_description_1: Option<String>,
12621 pub cum_fill: Option<String>,
12623 pub currency: Option<String>,
12625 pub deactivate_order: Option<bool>,
12627 pub editable_fields: Option<String>,
12629 pub exit_strategy_chart_description: Option<String>,
12631 pub exit_strategy_display_price: Option<String>,
12633 pub exit_strategy_tool_availability: Option<String>,
12635 #[serde(rename = "fgColor")]
12637 pub fg_color: Option<String>,
12638 pub listing_exchange: Option<String>,
12640 pub option_acct: Option<String>,
12642 pub order_ccp_status: Option<String>,
12644 pub order_clearing_account: Option<String>,
12646 pub order_description: Option<String>,
12648 pub order_description_with_contract: Option<String>,
12650 pub order_id: Option<i32>,
12652 pub order_not_editable: Option<bool>,
12654 pub order_status: Option<OrderStatusOrderStatus>,
12656 pub order_status_description: Option<String>,
12658 pub order_time: Option<String>,
12660 pub order_type: Option<String>,
12662 pub request_id: Option<String>,
12664 pub sec_type: Option<OrderStatusSecType>,
12666 pub server_id: Option<String>,
12668 pub side: Option<Side>,
12670 pub size: Option<String>,
12672 pub size_and_fills: Option<String>,
12674 pub sub_type: Option<String>,
12676 pub symbol: Option<String>,
12678 pub tif: Option<OrderStatusTif>,
12680 pub total_size: Option<String>,
12682}
12683#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
12685pub enum OrderStatusChildOrderType {
12686 #[serde(rename = "0")]
12687 #[default]
12688 T0,
12689 A,
12690 B,
12691}
12692impl core::fmt::Display for OrderStatusChildOrderType {
12693 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12694 match self {
12695 Self::T0 => write!(f, "0"),
12696 Self::A => write!(f, "A"),
12697 Self::B => write!(f, "B"),
12698 }
12699 }
12700}
12701#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
12703pub enum OrderStatusOrderStatus {
12704 #[default]
12705 Inactive,
12706 PendingSubmit,
12707 PreSubmitted,
12708 Submitted,
12709 Filled,
12710 PendingCancel,
12711 Cancelled,
12712 WarnState,
12713}
12714impl core::fmt::Display for OrderStatusOrderStatus {
12715 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12716 match self {
12717 Self::Inactive => write!(f, "Inactive"),
12718 Self::PendingSubmit => write!(f, "PendingSubmit"),
12719 Self::PreSubmitted => write!(f, "PreSubmitted"),
12720 Self::Submitted => write!(f, "Submitted"),
12721 Self::Filled => write!(f, "Filled"),
12722 Self::PendingCancel => write!(f, "PendingCancel"),
12723 Self::Cancelled => write!(f, "Cancelled"),
12724 Self::WarnState => write!(f, "WarnState"),
12725 }
12726 }
12727}
12728#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
12730pub enum OrderStatusSecType {
12731 #[serde(rename = "STK")]
12732 #[default]
12733 Stk,
12734 #[serde(rename = "OPT")]
12735 Opt,
12736 #[serde(rename = "FUT")]
12737 Fut,
12738 #[serde(rename = "FOP")]
12739 Fop,
12740 #[serde(rename = "CASH")]
12741 Cash,
12742 #[serde(rename = "CRYPTO")]
12743 Crypto,
12744 #[serde(rename = "BOND")]
12745 Bond,
12746 #[serde(rename = "WAR")]
12747 War,
12748 #[serde(rename = "FUND")]
12749 Fund,
12750}
12751impl core::fmt::Display for OrderStatusSecType {
12752 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12753 match self {
12754 Self::Stk => write!(f, "STK"),
12755 Self::Opt => write!(f, "OPT"),
12756 Self::Fut => write!(f, "FUT"),
12757 Self::Fop => write!(f, "FOP"),
12758 Self::Cash => write!(f, "CASH"),
12759 Self::Crypto => write!(f, "CRYPTO"),
12760 Self::Bond => write!(f, "BOND"),
12761 Self::War => write!(f, "WAR"),
12762 Self::Fund => write!(f, "FUND"),
12763 }
12764 }
12765}
12766#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
12768pub enum OrderStatusTif {
12769 #[serde(rename = "DAY")]
12770 #[default]
12771 Day,
12772 #[serde(rename = "IOC")]
12773 Ioc,
12774 #[serde(rename = "GTC")]
12775 Gtc,
12776 #[serde(rename = "OPG")]
12777 Opg,
12778 #[serde(rename = "PAX")]
12779 Pax,
12780}
12781impl core::fmt::Display for OrderStatusTif {
12782 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12783 match self {
12784 Self::Day => write!(f, "DAY"),
12785 Self::Ioc => write!(f, "IOC"),
12786 Self::Gtc => write!(f, "GTC"),
12787 Self::Opg => write!(f, "OPG"),
12788 Self::Pax => write!(f, "PAX"),
12789 }
12790 }
12791}
12792#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12794pub struct OrderSubmitError {
12795 pub error: Option<String>,
12797}
12798pub type OrderSubmitSuccess = Vec<OrderSubmitSuccessOrderSubmitSuccess>;
12800#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
12802pub struct OrderSubmitSuccessOrderSubmitSuccess {
12803 pub encrypt_message: Option<String>,
12805 pub order_id: Option<String>,
12807 pub order_status: Option<String>,
12809}
12810#[serde_with::skip_serializing_none]
12811#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
12812pub struct OrdersSubmissionRequest {
12813 #[validate(nested)]
12815 pub orders: Option<Vec<SingleOrderSubmissionRequest>>,
12816}
12817#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12819pub struct PatchGwApiV1AccountsAccountidStatusRequest {
12820 #[validate(nested)]
12821 pub path: PatchGwApiV1AccountsAccountidStatusRequestPath,
12822 pub body: AccountRequestBody,
12823}
12824impl PatchGwApiV1AccountsAccountidStatusRequest {
12825 pub async fn parse_response(
12827 req: reqwest::Response,
12828 ) -> anyhow::Result<GetGwApiV1AccountsAccountidStatusResponse> {
12829 let status = req.status();
12830 if status == http::StatusCode::OK {
12831 let data =
12832 oas3_gen_support::Diagnostics::<AccountStatusResponse>::json_with_diagnostics(req)
12833 .await?;
12834 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Ok(data));
12835 }
12836 if status == http::StatusCode::BAD_REQUEST {
12837 let _ = req.bytes().await?;
12838 return Ok(GetGwApiV1AccountsAccountidStatusResponse::BadRequest);
12839 }
12840 if status == http::StatusCode::UNAUTHORIZED {
12841 let _ = req.bytes().await?;
12842 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Unauthorized);
12843 }
12844 if status == http::StatusCode::FORBIDDEN {
12845 let _ = req.bytes().await?;
12846 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Forbidden);
12847 }
12848 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
12849 let _ = req.bytes().await?;
12850 return Ok(GetGwApiV1AccountsAccountidStatusResponse::UnsupportedMediaType);
12851 }
12852 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12853 let _ = req.bytes().await?;
12854 return Ok(GetGwApiV1AccountsAccountidStatusResponse::InternalServerError);
12855 }
12856 let _ = req.bytes().await?;
12857 return Ok(GetGwApiV1AccountsAccountidStatusResponse::Unknown);
12858 }
12859}
12860#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
12861pub struct PatchGwApiV1AccountsAccountidStatusRequestPath {
12862 #[validate(length(min = 1u64))]
12863 pub account_id: String,
12864}
12865#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12867pub struct PatchGwApiV1AccountsAccountidTasksRequest {
12868 #[validate(nested)]
12869 pub path: PatchGwApiV1AccountsAccountidTasksRequestPath,
12870 pub body: AccountRequestBody,
12871}
12872impl PatchGwApiV1AccountsAccountidTasksRequest {
12873 pub async fn parse_response(
12875 req: reqwest::Response,
12876 ) -> anyhow::Result<PostGwApiV1AccountsAccountidTasksResponse> {
12877 let status = req.status();
12878 if status == http::StatusCode::OK {
12879 let data =
12880 oas3_gen_support::Diagnostics::<Task200Response2>::json_with_diagnostics(req)
12881 .await?;
12882 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Ok(data));
12883 }
12884 if status == http::StatusCode::BAD_REQUEST {
12885 let _ = req.bytes().await?;
12886 return Ok(PostGwApiV1AccountsAccountidTasksResponse::BadRequest);
12887 }
12888 if status == http::StatusCode::UNAUTHORIZED {
12889 let _ = req.bytes().await?;
12890 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Unauthorized);
12891 }
12892 if status == http::StatusCode::FORBIDDEN {
12893 let _ = req.bytes().await?;
12894 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Forbidden);
12895 }
12896 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
12897 let _ = req.bytes().await?;
12898 return Ok(PostGwApiV1AccountsAccountidTasksResponse::UnsupportedMediaType);
12899 }
12900 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12901 let _ = req.bytes().await?;
12902 return Ok(PostGwApiV1AccountsAccountidTasksResponse::InternalServerError);
12903 }
12904 let _ = req.bytes().await?;
12905 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Unknown);
12906 }
12907}
12908#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
12909pub struct PatchGwApiV1AccountsAccountidTasksRequestPath {
12910 #[validate(length(min = 1u64))]
12911 pub account_id: String,
12912}
12913#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12915pub struct PatchGwApiV1AccountsRequest {
12916 pub body: AccountRequestBody,
12917}
12918impl PatchGwApiV1AccountsRequest {
12919 pub async fn parse_response(
12921 req: reqwest::Response,
12922 ) -> anyhow::Result<PostGwApiV1AccountsResponse> {
12923 let status = req.status();
12924 if status == http::StatusCode::OK {
12925 let data =
12926 oas3_gen_support::Diagnostics::<StatusResponse>::json_with_diagnostics(req).await?;
12927 return Ok(PostGwApiV1AccountsResponse::Ok(data));
12928 }
12929 if status == http::StatusCode::BAD_REQUEST {
12930 let _ = req.bytes().await?;
12931 return Ok(PostGwApiV1AccountsResponse::BadRequest);
12932 }
12933 if status == http::StatusCode::UNAUTHORIZED {
12934 let _ = req.bytes().await?;
12935 return Ok(PostGwApiV1AccountsResponse::Unauthorized);
12936 }
12937 if status == http::StatusCode::FORBIDDEN {
12938 let _ = req.bytes().await?;
12939 return Ok(PostGwApiV1AccountsResponse::Forbidden);
12940 }
12941 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
12942 let _ = req.bytes().await?;
12943 return Ok(PostGwApiV1AccountsResponse::UnsupportedMediaType);
12944 }
12945 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12946 let _ = req.bytes().await?;
12947 return Ok(PostGwApiV1AccountsResponse::InternalServerError);
12948 }
12949 let _ = req.bytes().await?;
12950 return Ok(PostGwApiV1AccountsResponse::Unknown);
12951 }
12952}
12953#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
12955pub struct PatchGwApiV1RequestsRequestidStatusRequest {
12956 pub path: PatchGwApiV1RequestsRequestidStatusRequestPath,
12957 pub body: AccountRequestBody,
12958}
12959impl PatchGwApiV1RequestsRequestidStatusRequest {
12960 pub async fn parse_response(
12962 req: reqwest::Response,
12963 ) -> anyhow::Result<PatchGwApiV1RequestsRequestidStatusResponse> {
12964 let status = req.status();
12965 if status == http::StatusCode::OK {
12966 let data =
12967 oas3_gen_support::Diagnostics::<AmRequestStatusResponse>::json_with_diagnostics(
12968 req,
12969 )
12970 .await?;
12971 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::Ok(data));
12972 }
12973 if status == http::StatusCode::BAD_REQUEST {
12974 let _ = req.bytes().await?;
12975 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::BadRequest);
12976 }
12977 if status == http::StatusCode::UNAUTHORIZED {
12978 let _ = req.bytes().await?;
12979 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::Unauthorized);
12980 }
12981 if status == http::StatusCode::FORBIDDEN {
12982 let _ = req.bytes().await?;
12983 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::Forbidden);
12984 }
12985 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
12986 let _ = req.bytes().await?;
12987 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::UnsupportedMediaType);
12988 }
12989 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
12990 let _ = req.bytes().await?;
12991 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::InternalServerError);
12992 }
12993 let _ = req.bytes().await?;
12994 return Ok(PatchGwApiV1RequestsRequestidStatusResponse::Unknown);
12995 }
12996}
12997#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
12998pub struct PatchGwApiV1RequestsRequestidStatusRequestPath {
12999 pub request_id: i32,
13000}
13001#[derive(Debug, Clone)]
13003pub enum PatchGwApiV1RequestsRequestidStatusResponse {
13004 Ok(AmRequestStatusResponse),
13006 BadRequest,
13008 Unauthorized,
13010 Forbidden,
13012 UnsupportedMediaType,
13014 InternalServerError,
13016 Unknown,
13018}
13019#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13020pub struct PendingTask {
13021 pub action: Option<String>,
13022 #[serde(rename = "au10tixCreatedDate")]
13023 pub au10tix_created_date: Option<chrono::DateTime<chrono::Utc>>,
13024 #[serde(rename = "au10tixExpiryDate")]
13025 pub au10tix_expiry_date: Option<chrono::DateTime<chrono::Utc>>,
13026 #[serde(rename = "documentRejectReason")]
13027 pub document_reject_reason: Option<Vec<String>>,
13028 #[serde(rename = "entityId")]
13029 pub entity_id: Option<i32>,
13030 #[serde(rename = "externalId")]
13031 pub external_id: Option<String>,
13032 #[serde(rename = "formName")]
13033 pub form_name: Option<String>,
13034 #[serde(rename = "formNumber")]
13035 pub form_number: Option<i32>,
13036 #[serde(rename = "onlineTask")]
13037 pub online_task: Option<bool>,
13038 #[serde(rename = "questionIds")]
13039 pub question_ids: Option<Vec<i32>>,
13040 #[serde(rename = "requiredForApproval")]
13041 pub required_for_approval: Option<bool>,
13042 #[serde(rename = "requiredForTrading")]
13043 pub required_for_trading: Option<bool>,
13044 #[serde(rename = "startDate")]
13045 pub start_date: Option<chrono::DateTime<chrono::Utc>>,
13046 pub state: Option<String>,
13047 #[serde(rename = "taskNumber")]
13048 pub task_number: Option<i32>,
13049 pub url: Option<String>,
13050}
13051#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13052pub struct PendingTasksResponse {
13053 #[serde(rename = "accountId")]
13054 pub account_id: Option<String>,
13055 pub description: Option<String>,
13056 pub error: Option<Box<ErrorResponse>>,
13057 #[serde(rename = "errorDescription")]
13058 pub error_description: Option<String>,
13059 #[serde(rename = "hasError")]
13060 pub has_error: Option<bool>,
13061 #[serde(rename = "pendingTaskPresent")]
13062 pub pending_task_present: Option<bool>,
13063 #[serde(rename = "pendingTasks")]
13064 pub pending_tasks: Option<Vec<PendingTask>>,
13065 pub state: Option<String>,
13066 pub status: Option<String>,
13067}
13068#[serde_with::skip_serializing_none]
13069#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
13070#[serde(default)]
13071pub struct PerformanceRequestBody {
13072 #[serde(rename = "acctIds")]
13074 pub acct_ids: Option<Vec<serde_json::Value>>,
13075 #[default(Some(Default::default()))]
13085 pub period: Option<PerformanceRequestBodyPeriod>,
13086}
13087#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
13097pub enum PerformanceRequestBodyPeriod {
13098 #[serde(rename = "1D")]
13099 #[default]
13100 T1d,
13101 #[serde(rename = "7D")]
13102 T7d,
13103 #[serde(rename = "MTD")]
13104 Mtd,
13105 #[serde(rename = "1M")]
13106 T1m,
13107 #[serde(rename = "3M")]
13108 T3m,
13109 #[serde(rename = "6M")]
13110 T6m,
13111 #[serde(rename = "12M")]
13112 T12m,
13113 #[serde(rename = "YTD")]
13114 Ytd,
13115}
13116impl core::fmt::Display for PerformanceRequestBodyPeriod {
13117 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13118 match self {
13119 Self::T1d => write!(f, "1D"),
13120 Self::T7d => write!(f, "7D"),
13121 Self::Mtd => write!(f, "MTD"),
13122 Self::T1m => write!(f, "1M"),
13123 Self::T3m => write!(f, "3M"),
13124 Self::T6m => write!(f, "6M"),
13125 Self::T12m => write!(f, "12M"),
13126 Self::Ytd => write!(f, "YTD"),
13127 }
13128 }
13129}
13130#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13131pub struct PerformanceResponse {
13132 pub cps: Option<PerformanceResponseCps>,
13134 #[serde(rename = "currencyType")]
13136 pub currency_type: Option<String>,
13137 pub id: Option<String>,
13139 pub included: Option<Vec<serde_json::Value>>,
13141 pub nav: Option<PerformanceResponseNav>,
13143 pub nd: Option<i32>,
13145 pub pm: Option<String>,
13147 pub rc: Option<i32>,
13149 pub tpps: Option<PerformanceResponseTpps>,
13151}
13152#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13154pub struct PerformanceResponseCps {
13155 pub data: Option<Vec<PerformanceResponseCpsDatum>>,
13157 pub dates: Option<Vec<serde_json::Value>>,
13159 pub freq: Option<String>,
13161}
13162#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13163pub struct PerformanceResponseCpsDatum {
13164 #[serde(rename = "baseCurrency")]
13166 pub base_currency: Option<String>,
13167 pub end: Option<String>,
13169 pub id: Option<String>,
13171 #[serde(rename = "idType")]
13173 pub id_type: Option<String>,
13174 pub returns: Option<Vec<serde_json::Value>>,
13176 pub start: Option<String>,
13178}
13179#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13181pub struct PerformanceResponseNav {
13182 pub data: Option<Vec<PerformanceResponseNavDatum>>,
13184 pub dates: Option<Vec<serde_json::Value>>,
13186 pub freq: Option<String>,
13188}
13189#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13190pub struct PerformanceResponseNavDatum {
13191 #[serde(rename = "baseCurrency")]
13193 pub base_currency: Option<String>,
13194 pub end: Option<String>,
13196 pub id: Option<String>,
13198 #[serde(rename = "idType")]
13200 pub id_type: Option<String>,
13201 pub navs: Option<Vec<serde_json::Value>>,
13203 pub start: Option<String>,
13205 #[serde(rename = "startNAV")]
13207 pub start_nav: Option<PerformanceResponseNavDatumStartNav>,
13208}
13209#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13211pub struct PerformanceResponseNavDatumStartNav {
13212 pub date: Option<String>,
13214 pub val: Option<f64>,
13216}
13217#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13219pub struct PerformanceResponseTpps {
13220 pub data: Option<Vec<PerformanceResponseCpsDatum>>,
13222 pub dates: Option<Vec<serde_json::Value>>,
13224 pub freq: Option<String>,
13226}
13227#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13228pub struct PnlPartitionedResponse {
13229 pub upnl: Option<PnlPartitionedResponseUpnl>,
13231}
13232#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13234pub struct PnlPartitionedResponseUpnl {
13235 #[serde(rename = "U1234567.Core")]
13237 pub u1234567_core: Option<PnlPartitionedResponseUpnlU1234567Core>,
13238}
13239#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13241pub struct PnlPartitionedResponseUpnlU1234567Core {
13242 pub dpl: Option<f64>,
13244 pub el: Option<f64>,
13246 pub mv: Option<f64>,
13248 pub nl: Option<f64>,
13250 #[serde(rename = "rowType")]
13252 pub row_type: Option<i32>,
13253 pub upl: Option<f64>,
13255}
13256#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13257pub struct PollingInstructionResult {
13258 #[serde(rename = "clientInstructionId")]
13260 pub client_instruction_id: f64,
13261 pub description: Option<String>,
13263 pub error: Option<ResultError>,
13264 #[serde(rename = "ibReferenceId")]
13266 pub ib_reference_id: Option<f64>,
13267 #[serde(rename = "instructionId")]
13269 pub instruction_id: f64,
13270 #[serde(rename = "instructionStatus")]
13272 pub instruction_status: PollingInstructionResultInstructionStatus,
13273 #[serde(rename = "instructionType")]
13275 pub instruction_type: InstructionResultInstructionType,
13276}
13277#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
13278pub enum PollingInstructionResultInstructionStatus {
13279 #[serde(rename = "PENDING")]
13280 #[default]
13281 Pending,
13282 #[serde(rename = "REJECTED")]
13283 Rejected,
13284 #[serde(rename = "PROCESSED")]
13285 Processed,
13286}
13287impl core::fmt::Display for PollingInstructionResultInstructionStatus {
13288 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13289 match self {
13290 Self::Pending => write!(f, "PENDING"),
13291 Self::Rejected => write!(f, "REJECTED"),
13292 Self::Processed => write!(f, "PROCESSED"),
13293 }
13294 }
13295}
13296pub type Portfolio2Positions = Vec<Portfolio2PositionsPortfolio2position>;
13298#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13299pub struct Portfolio2PositionsPortfolio2position {
13300 #[serde(rename = "assetClass")]
13302 pub asset_class: Option<String>,
13303 #[serde(rename = "avgCost")]
13305 pub avg_cost: Option<serde_json::Value>,
13306 #[serde(rename = "avgPrice")]
13308 pub avg_price: Option<f64>,
13309 pub conid: Option<i32>,
13311 pub currency: Option<String>,
13313 pub description: Option<String>,
13315 pub group: Option<String>,
13317 #[serde(rename = "isLastToLoq")]
13318 pub is_last_to_loq: Option<bool>,
13319 #[serde(rename = "marketPrice")]
13321 pub market_price: Option<f64>,
13322 #[serde(rename = "marketValue")]
13324 pub market_value: Option<f64>,
13325 pub model: Option<String>,
13327 pub position: Option<f64>,
13329 #[serde(rename = "realizedPnl")]
13331 pub realized_pnl: Option<f64>,
13332 #[serde(rename = "secType")]
13334 pub sec_type: Option<String>,
13335 pub sector: Option<String>,
13337 pub timestamp: Option<i32>,
13339 #[serde(rename = "unrealizedPnl")]
13341 pub unrealized_pnl: Option<f64>,
13342}
13343#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13344pub struct PortfolioAllocations {
13345 #[serde(rename = "assetClass")]
13347 pub asset_class: Option<PortfolioAllocationsAssetClass>,
13348 pub group: Option<PortfolioAllocationsGroup>,
13350 pub sector: Option<PortfolioAllocationsSector>,
13352}
13353#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13355pub struct PortfolioAllocationsAssetClass {
13356 pub long: Option<std::collections::HashMap<String, f64>>,
13358 pub short: Option<std::collections::HashMap<String, f64>>,
13360}
13361#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13363pub struct PortfolioAllocationsGroup {
13364 pub long: Option<std::collections::HashMap<String, f64>>,
13366 pub short: Option<std::collections::HashMap<String, f64>>,
13368}
13369#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13371pub struct PortfolioAllocationsSector {
13372 pub long: Option<std::collections::HashMap<String, f64>>,
13374 pub short: Option<std::collections::HashMap<String, f64>>,
13376}
13377#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13378pub struct PortfolioSummary {
13379 pub accountcode: Option<serde_json::Value>,
13380 pub accountready: Option<serde_json::Value>,
13381 pub accounttype: Option<serde_json::Value>,
13382 pub accruedcash: Option<serde_json::Value>,
13383 #[serde(rename = "accruedcash-c")]
13384 pub accruedcash_c: Option<serde_json::Value>,
13385 #[serde(rename = "accruedcash-s")]
13386 pub accruedcash_s: Option<serde_json::Value>,
13387 pub accrueddividend: Option<serde_json::Value>,
13388 #[serde(rename = "accrueddividend-c")]
13389 pub accrueddividend_c: Option<serde_json::Value>,
13390 #[serde(rename = "accrueddividend-s")]
13391 pub accrueddividend_s: Option<serde_json::Value>,
13392 pub availablefunds: Option<serde_json::Value>,
13393 #[serde(rename = "availablefunds-c")]
13394 pub availablefunds_c: Option<serde_json::Value>,
13395 #[serde(rename = "availablefunds-s")]
13396 pub availablefunds_s: Option<serde_json::Value>,
13397 pub availabletotrade: Option<serde_json::Value>,
13398 #[serde(rename = "availabletotrade-c")]
13399 pub availabletotrade_c: Option<serde_json::Value>,
13400 #[serde(rename = "availabletotrade-s")]
13401 pub availabletotrade_s: Option<serde_json::Value>,
13402 pub availabletowithdraw: Option<serde_json::Value>,
13403 #[serde(rename = "availabletowithdraw-c")]
13404 pub availabletowithdraw_c: Option<serde_json::Value>,
13405 #[serde(rename = "availabletowithdraw-s")]
13406 pub availabletowithdraw_s: Option<serde_json::Value>,
13407 pub billable: Option<serde_json::Value>,
13408 #[serde(rename = "billable-c")]
13409 pub billable_c: Option<serde_json::Value>,
13410 #[serde(rename = "billable-s")]
13411 pub billable_s: Option<serde_json::Value>,
13412 pub buyingpower: Option<serde_json::Value>,
13413 #[serde(rename = "columnprio-c")]
13414 pub columnprio_c: Option<serde_json::Value>,
13415 #[serde(rename = "columnprio-s")]
13416 pub columnprio_s: Option<serde_json::Value>,
13417 pub cushion: Option<serde_json::Value>,
13418 pub daytradesremaining: Option<serde_json::Value>,
13419 #[serde(rename = "daytradesremainingt+1")]
13420 pub daytradesremainingt_1: Option<serde_json::Value>,
13421 #[serde(rename = "daytradesremainingt+2")]
13422 pub daytradesremainingt_2: Option<serde_json::Value>,
13423 #[serde(rename = "daytradesremainingt+3")]
13424 pub daytradesremainingt_3: Option<serde_json::Value>,
13425 #[serde(rename = "daytradesremainingt+4")]
13426 pub daytradesremainingt_4: Option<serde_json::Value>,
13427 #[serde(rename = "daytradingstatus-s")]
13428 pub daytradingstatus_s: Option<serde_json::Value>,
13429 pub depositoncredithold: Option<serde_json::Value>,
13430 pub equitywithloanvalue: Option<serde_json::Value>,
13431 #[serde(rename = "equitywithloanvalue-c")]
13432 pub equitywithloanvalue_c: Option<serde_json::Value>,
13433 #[serde(rename = "equitywithloanvalue-s")]
13434 pub equitywithloanvalue_s: Option<serde_json::Value>,
13435 pub excessliquidity: Option<serde_json::Value>,
13436 #[serde(rename = "excessliquidity-c")]
13437 pub excessliquidity_c: Option<serde_json::Value>,
13438 #[serde(rename = "excessliquidity-s")]
13439 pub excessliquidity_s: Option<serde_json::Value>,
13440 pub fullavailablefunds: Option<serde_json::Value>,
13441 #[serde(rename = "fullavailablefunds-c")]
13442 pub fullavailablefunds_c: Option<serde_json::Value>,
13443 #[serde(rename = "fullavailablefunds-s")]
13444 pub fullavailablefunds_s: Option<serde_json::Value>,
13445 pub fullexcessliquidity: Option<serde_json::Value>,
13446 #[serde(rename = "fullexcessliquidity-c")]
13447 pub fullexcessliquidity_c: Option<serde_json::Value>,
13448 #[serde(rename = "fullexcessliquidity-s")]
13449 pub fullexcessliquidity_s: Option<serde_json::Value>,
13450 pub fullinitmarginreq: Option<serde_json::Value>,
13451 #[serde(rename = "fullinitmarginreq-c")]
13452 pub fullinitmarginreq_c: Option<serde_json::Value>,
13453 #[serde(rename = "fullinitmarginreq-s")]
13454 pub fullinitmarginreq_s: Option<serde_json::Value>,
13455 pub fullmaintmarginreq: Option<serde_json::Value>,
13456 #[serde(rename = "fullmaintmarginreq-c")]
13457 pub fullmaintmarginreq_c: Option<serde_json::Value>,
13458 #[serde(rename = "fullmaintmarginreq-s")]
13459 pub fullmaintmarginreq_s: Option<serde_json::Value>,
13460 pub grosspositionvalue: Option<serde_json::Value>,
13461 #[serde(rename = "grosspositionvalue-s")]
13462 pub grosspositionvalue_s: Option<serde_json::Value>,
13463 pub guarantee: Option<serde_json::Value>,
13464 #[serde(rename = "guarantee-c")]
13465 pub guarantee_c: Option<serde_json::Value>,
13466 #[serde(rename = "guarantee-s")]
13467 pub guarantee_s: Option<serde_json::Value>,
13468 pub highestseverity: Option<serde_json::Value>,
13469 pub indianstockhaircut: Option<serde_json::Value>,
13470 #[serde(rename = "indianstockhaircut-c")]
13471 pub indianstockhaircut_c: Option<serde_json::Value>,
13472 #[serde(rename = "indianstockhaircut-s")]
13473 pub indianstockhaircut_s: Option<serde_json::Value>,
13474 pub initmarginreq: Option<serde_json::Value>,
13475 #[serde(rename = "initmarginreq-c")]
13476 pub initmarginreq_c: Option<serde_json::Value>,
13477 #[serde(rename = "initmarginreq-s")]
13478 pub initmarginreq_s: Option<serde_json::Value>,
13479 #[serde(rename = "leverage-s")]
13480 pub leverage_s: Option<serde_json::Value>,
13481 pub lookaheadavailablefunds: Option<serde_json::Value>,
13482 #[serde(rename = "lookaheadavailablefunds-c")]
13483 pub lookaheadavailablefunds_c: Option<serde_json::Value>,
13484 #[serde(rename = "lookaheadavailablefunds-s")]
13485 pub lookaheadavailablefunds_s: Option<serde_json::Value>,
13486 pub lookaheadexcessliquidity: Option<serde_json::Value>,
13487 #[serde(rename = "lookaheadexcessliquidity-c")]
13488 pub lookaheadexcessliquidity_c: Option<serde_json::Value>,
13489 #[serde(rename = "lookaheadexcessliquidity-s")]
13490 pub lookaheadexcessliquidity_s: Option<serde_json::Value>,
13491 pub lookaheadinitmarginreq: Option<serde_json::Value>,
13492 #[serde(rename = "lookaheadinitmarginreq-c")]
13493 pub lookaheadinitmarginreq_c: Option<serde_json::Value>,
13494 #[serde(rename = "lookaheadinitmarginreq-s")]
13495 pub lookaheadinitmarginreq_s: Option<serde_json::Value>,
13496 pub lookaheadmaintmarginreq: Option<serde_json::Value>,
13497 #[serde(rename = "lookaheadmaintmarginreq-c")]
13498 pub lookaheadmaintmarginreq_c: Option<serde_json::Value>,
13499 #[serde(rename = "lookaheadmaintmarginreq-s")]
13500 pub lookaheadmaintmarginreq_s: Option<serde_json::Value>,
13501 pub lookaheadnextchange: Option<serde_json::Value>,
13502 pub maintmarginreq: Option<serde_json::Value>,
13503 #[serde(rename = "maintmarginreq-c")]
13504 pub maintmarginreq_c: Option<serde_json::Value>,
13505 #[serde(rename = "maintmarginreq-s")]
13506 pub maintmarginreq_s: Option<serde_json::Value>,
13507 pub netliquidation: Option<serde_json::Value>,
13508 #[serde(rename = "netliquidation-c")]
13509 pub netliquidation_c: Option<serde_json::Value>,
13510 #[serde(rename = "netliquidation-s")]
13511 pub netliquidation_s: Option<serde_json::Value>,
13512 pub netliquidationuncertainty: Option<serde_json::Value>,
13513 pub nlvandmargininreview: Option<serde_json::Value>,
13514 pub pasharesvalue: Option<serde_json::Value>,
13515 #[serde(rename = "pasharesvalue-c")]
13516 pub pasharesvalue_c: Option<serde_json::Value>,
13517 #[serde(rename = "pasharesvalue-s")]
13518 pub pasharesvalue_s: Option<serde_json::Value>,
13519 pub physicalcertificatevalue: Option<serde_json::Value>,
13520 #[serde(rename = "physicalcertificatevalue-c")]
13521 pub physicalcertificatevalue_c: Option<serde_json::Value>,
13522 #[serde(rename = "physicalcertificatevalue-s")]
13523 pub physicalcertificatevalue_s: Option<serde_json::Value>,
13524 pub postexpirationexcess: Option<serde_json::Value>,
13525 #[serde(rename = "postexpirationexcess-c")]
13526 pub postexpirationexcess_c: Option<serde_json::Value>,
13527 #[serde(rename = "postexpirationexcess-s")]
13528 pub postexpirationexcess_s: Option<serde_json::Value>,
13529 pub postexpirationmargin: Option<serde_json::Value>,
13530 #[serde(rename = "postexpirationmargin-c")]
13531 pub postexpirationmargin_c: Option<serde_json::Value>,
13532 #[serde(rename = "postexpirationmargin-s")]
13533 pub postexpirationmargin_s: Option<serde_json::Value>,
13534 pub previousdayequitywithloanvalue: Option<serde_json::Value>,
13535 #[serde(rename = "previousdayequitywithloanvalue-s")]
13536 pub previousdayequitywithloanvalue_s: Option<serde_json::Value>,
13537 pub regtequity: Option<serde_json::Value>,
13538 #[serde(rename = "regtequity-s")]
13539 pub regtequity_s: Option<serde_json::Value>,
13540 pub regtmargin: Option<serde_json::Value>,
13541 #[serde(rename = "regtmargin-s")]
13542 pub regtmargin_s: Option<serde_json::Value>,
13543 #[serde(rename = "segmenttitle-c")]
13544 pub segmenttitle_c: Option<serde_json::Value>,
13545 #[serde(rename = "segmenttitle-s")]
13546 pub segmenttitle_s: Option<serde_json::Value>,
13547 pub sma: Option<serde_json::Value>,
13548 #[serde(rename = "sma-s")]
13549 pub sma_s: Option<serde_json::Value>,
13550 pub totalcashvalue: Option<serde_json::Value>,
13551 #[serde(rename = "totalcashvalue-c")]
13552 pub totalcashvalue_c: Option<serde_json::Value>,
13553 #[serde(rename = "totalcashvalue-s")]
13554 pub totalcashvalue_s: Option<serde_json::Value>,
13555 pub totaldebitcardpendingcharges: Option<serde_json::Value>,
13556 #[serde(rename = "totaldebitcardpendingcharges-c")]
13557 pub totaldebitcardpendingcharges_c: Option<serde_json::Value>,
13558 #[serde(rename = "totaldebitcardpendingcharges-s")]
13559 pub totaldebitcardpendingcharges_s: Option<serde_json::Value>,
13560 #[serde(rename = "tradingtype-s")]
13561 pub tradingtype_s: Option<serde_json::Value>,
13562 pub whatifpmenabled: Option<serde_json::Value>,
13563}
13564#[serde_with::skip_serializing_none]
13565#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, oas3_gen_support::Default)]
13566pub struct PortfolioSummaryValue {
13567 pub amount: Option<f64>,
13569 pub currency: Option<f64>,
13571 #[serde(rename = "isNull")]
13573 pub is_null: Option<bool>,
13574 pub severity: Option<i32>,
13576 pub timestamp: Option<i32>,
13578 pub value: Option<String>,
13580}
13581#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
13582pub struct Position200Response {
13583 #[serde(flatten)]
13585 pub additional_properties: std::collections::HashMap<String, IndividualPosition>,
13586}
13587pub type Position200Response2 = Vec<IndividualPosition>;
13589#[serde_with::skip_serializing_none]
13590#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
13591pub struct PositionRequestBody {
13592 pub model: Option<String>,
13594 #[serde(rename = "reqID")]
13596 pub req_id: Option<i32>,
13597 #[serde(rename = "subscriptionStatus")]
13599 pub subscription_status: Option<i32>,
13600}
13601#[serde_with::skip_serializing_none]
13602#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
13603pub struct PositionRequestBody2 {
13604 pub limit: Option<i32>,
13607 pub model: Option<String>,
13610 #[serde(rename = "reqID")]
13613 pub req_id: Option<i32>,
13614 #[serde(rename = "sortDirection")]
13618 pub sort_direction: Option<PositionRequestBody2SortDirection>,
13619 #[serde(rename = "sortField")]
13632 pub sort_field: Option<PositionRequestBody2SortField>,
13633}
13634#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
13638pub enum PositionRequestBody2SortDirection {
13639 #[serde(rename = "ASC")]
13640 #[default]
13641 Asc,
13642 #[serde(rename = "DESC")]
13643 Desc,
13644}
13645impl core::fmt::Display for PositionRequestBody2SortDirection {
13646 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13647 match self {
13648 Self::Asc => write!(f, "ASC"),
13649 Self::Desc => write!(f, "DESC"),
13650 }
13651 }
13652}
13653#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
13666pub enum PositionRequestBody2SortField {
13667 #[serde(rename = "actual")]
13668 #[default]
13669 Actual,
13670 #[serde(rename = "actualRangeMax")]
13671 ActualRangeMax,
13672 #[serde(rename = "actualRangeMin")]
13673 ActualRangeMin,
13674 #[serde(rename = "ccy")]
13675 Ccy,
13676 #[serde(rename = "conid")]
13677 Conid,
13678 #[serde(rename = "dlv")]
13679 Dlv,
13680 #[serde(rename = "instrumentImbalance")]
13681 InstrumentImbalance,
13682 #[serde(rename = "instrument")]
13683 Instrument,
13684 #[serde(rename = "mismatchType")]
13685 MismatchType,
13686 #[serde(rename = "mv")]
13687 Mv,
13688 #[serde(rename = "position")]
13689 Position,
13690 #[serde(rename = "target")]
13691 Target,
13692}
13693impl core::fmt::Display for PositionRequestBody2SortField {
13694 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13695 match self {
13696 Self::Actual => write!(f, "actual"),
13697 Self::ActualRangeMax => write!(f, "actualRangeMax"),
13698 Self::ActualRangeMin => write!(f, "actualRangeMin"),
13699 Self::Ccy => write!(f, "ccy"),
13700 Self::Conid => write!(f, "conid"),
13701 Self::Dlv => write!(f, "dlv"),
13702 Self::InstrumentImbalance => write!(f, "instrumentImbalance"),
13703 Self::Instrument => write!(f, "instrument"),
13704 Self::MismatchType => write!(f, "mismatchType"),
13705 Self::Mv => write!(f, "mv"),
13706 Self::Position => write!(f, "position"),
13707 Self::Target => write!(f, "target"),
13708 }
13709 }
13710}
13711#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13713pub struct PostGwApiV1AccountsAccountidTasksRequest {
13714 #[validate(nested)]
13715 pub path: PostGwApiV1AccountsAccountidTasksRequestPath,
13716 pub body: AccountRequestBody,
13717}
13718impl PostGwApiV1AccountsAccountidTasksRequest {
13719 pub async fn parse_response(
13721 req: reqwest::Response,
13722 ) -> anyhow::Result<PostGwApiV1AccountsAccountidTasksResponse> {
13723 let status = req.status();
13724 if status == http::StatusCode::OK {
13725 let data =
13726 oas3_gen_support::Diagnostics::<Task200Response2>::json_with_diagnostics(req)
13727 .await?;
13728 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Ok(data));
13729 }
13730 if status == http::StatusCode::BAD_REQUEST {
13731 let _ = req.bytes().await?;
13732 return Ok(PostGwApiV1AccountsAccountidTasksResponse::BadRequest);
13733 }
13734 if status == http::StatusCode::UNAUTHORIZED {
13735 let _ = req.bytes().await?;
13736 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Unauthorized);
13737 }
13738 if status == http::StatusCode::FORBIDDEN {
13739 let _ = req.bytes().await?;
13740 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Forbidden);
13741 }
13742 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
13743 let _ = req.bytes().await?;
13744 return Ok(PostGwApiV1AccountsAccountidTasksResponse::UnsupportedMediaType);
13745 }
13746 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
13747 let _ = req.bytes().await?;
13748 return Ok(PostGwApiV1AccountsAccountidTasksResponse::InternalServerError);
13749 }
13750 let _ = req.bytes().await?;
13751 return Ok(PostGwApiV1AccountsAccountidTasksResponse::Unknown);
13752 }
13753}
13754#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
13755pub struct PostGwApiV1AccountsAccountidTasksRequestPath {
13756 #[validate(length(min = 1u64))]
13757 pub account_id: String,
13758}
13759#[derive(Debug, Clone)]
13761pub enum PostGwApiV1AccountsAccountidTasksResponse {
13762 Ok(Task200Response2),
13764 BadRequest,
13766 Unauthorized,
13768 Forbidden,
13770 UnsupportedMediaType,
13772 InternalServerError,
13774 Unknown,
13776}
13777#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13779pub struct PostGwApiV1AccountsDocumentsRequest {
13780 pub body: AccountRequestBody,
13781}
13782impl PostGwApiV1AccountsDocumentsRequest {
13783 pub async fn parse_response(
13785 req: reqwest::Response,
13786 ) -> anyhow::Result<PostGwApiV1AccountsResponse> {
13787 let status = req.status();
13788 if status == http::StatusCode::OK {
13789 let data =
13790 oas3_gen_support::Diagnostics::<StatusResponse>::json_with_diagnostics(req).await?;
13791 return Ok(PostGwApiV1AccountsResponse::Ok(data));
13792 }
13793 if status == http::StatusCode::BAD_REQUEST {
13794 let _ = req.bytes().await?;
13795 return Ok(PostGwApiV1AccountsResponse::BadRequest);
13796 }
13797 if status == http::StatusCode::UNAUTHORIZED {
13798 let _ = req.bytes().await?;
13799 return Ok(PostGwApiV1AccountsResponse::Unauthorized);
13800 }
13801 if status == http::StatusCode::FORBIDDEN {
13802 let _ = req.bytes().await?;
13803 return Ok(PostGwApiV1AccountsResponse::Forbidden);
13804 }
13805 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
13806 let _ = req.bytes().await?;
13807 return Ok(PostGwApiV1AccountsResponse::UnsupportedMediaType);
13808 }
13809 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
13810 let _ = req.bytes().await?;
13811 return Ok(PostGwApiV1AccountsResponse::InternalServerError);
13812 }
13813 let _ = req.bytes().await?;
13814 return Ok(PostGwApiV1AccountsResponse::Unknown);
13815 }
13816}
13817#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13819pub struct PostGwApiV1AccountsRequest {
13820 pub body: AccountRequestBody,
13821}
13822impl PostGwApiV1AccountsRequest {
13823 pub async fn parse_response(
13825 req: reqwest::Response,
13826 ) -> anyhow::Result<PostGwApiV1AccountsResponse> {
13827 let status = req.status();
13828 if status == http::StatusCode::OK {
13829 let data =
13830 oas3_gen_support::Diagnostics::<StatusResponse>::json_with_diagnostics(req).await?;
13831 return Ok(PostGwApiV1AccountsResponse::Ok(data));
13832 }
13833 if status == http::StatusCode::BAD_REQUEST {
13834 let _ = req.bytes().await?;
13835 return Ok(PostGwApiV1AccountsResponse::BadRequest);
13836 }
13837 if status == http::StatusCode::UNAUTHORIZED {
13838 let _ = req.bytes().await?;
13839 return Ok(PostGwApiV1AccountsResponse::Unauthorized);
13840 }
13841 if status == http::StatusCode::FORBIDDEN {
13842 let _ = req.bytes().await?;
13843 return Ok(PostGwApiV1AccountsResponse::Forbidden);
13844 }
13845 if status == http::StatusCode::UNSUPPORTED_MEDIA_TYPE {
13846 let _ = req.bytes().await?;
13847 return Ok(PostGwApiV1AccountsResponse::UnsupportedMediaType);
13848 }
13849 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
13850 let _ = req.bytes().await?;
13851 return Ok(PostGwApiV1AccountsResponse::InternalServerError);
13852 }
13853 let _ = req.bytes().await?;
13854 return Ok(PostGwApiV1AccountsResponse::Unknown);
13855 }
13856}
13857#[derive(Debug, Clone)]
13859pub enum PostGwApiV1AccountsResponse {
13860 Ok(StatusResponse),
13862 BadRequest,
13864 Unauthorized,
13866 Forbidden,
13868 UnsupportedMediaType,
13870 InternalServerError,
13872 Unknown,
13874}
13875#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13877pub struct PostGwApiV1BalancesQueryRequest {
13878 pub query: PostGwApiV1BalancesQueryRequestQuery,
13879 pub body: QueryRequestBody,
13881}
13882impl PostGwApiV1BalancesQueryRequest {
13883 pub async fn parse_response(
13885 req: reqwest::Response,
13886 ) -> anyhow::Result<PostGwApiV1BalancesQueryResponse> {
13887 let status = req.status();
13888 if status == http::StatusCode::CREATED {
13889 let _ = req.bytes().await?;
13890 return Ok(PostGwApiV1BalancesQueryResponse::Created);
13891 }
13892 if status == http::StatusCode::BAD_REQUEST {
13893 let _ = req.bytes().await?;
13894 return Ok(PostGwApiV1BalancesQueryResponse::BadRequest);
13895 }
13896 if status == http::StatusCode::FORBIDDEN {
13897 let _ = req.bytes().await?;
13898 return Ok(PostGwApiV1BalancesQueryResponse::Forbidden);
13899 }
13900 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
13901 let _ = req.bytes().await?;
13902 return Ok(PostGwApiV1BalancesQueryResponse::UnprocessableEntity);
13903 }
13904 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
13905 let _ = req.bytes().await?;
13906 return Ok(PostGwApiV1BalancesQueryResponse::InternalServerError);
13907 }
13908 let _ = req.bytes().await?;
13909 return Ok(PostGwApiV1BalancesQueryResponse::Unknown);
13910 }
13911}
13912#[serde_with::skip_serializing_none]
13913#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
13914pub struct PostGwApiV1BalancesQueryRequestQuery {
13915 #[serde(rename = "client-id")]
13918 pub client_id: Option<String>,
13919}
13920#[derive(Debug, Clone)]
13922pub enum PostGwApiV1BalancesQueryResponse {
13923 Created,
13925 BadRequest,
13927 Forbidden,
13929 UnprocessableEntity,
13931 InternalServerError,
13933 Unknown,
13935}
13936#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13938pub struct PostGwApiV1BankInstructionsBulkRequest {
13939 pub query: PostGwApiV1BankInstructionsBulkRequestQuery,
13940 pub body: BankInstructionsBulkRequestBody,
13942}
13943impl PostGwApiV1BankInstructionsBulkRequest {
13944 pub async fn parse_response(
13946 req: reqwest::Response,
13947 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
13948 let status = req.status();
13949 if status == http::StatusCode::ACCEPTED {
13950 let data = oas3_gen_support::Diagnostics::<
13951 AsynchronousInstructionSetResponse,
13952 >::json_with_diagnostics(req)
13953 .await?;
13954 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
13955 }
13956 if status == http::StatusCode::BAD_REQUEST {
13957 let _ = req.bytes().await?;
13958 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
13959 }
13960 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
13961 let _ = req.bytes().await?;
13962 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
13963 }
13964 let _ = req.bytes().await?;
13965 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
13966 }
13967}
13968#[serde_with::skip_serializing_none]
13969#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
13970pub struct PostGwApiV1BankInstructionsBulkRequestQuery {
13971 #[serde(rename = "client-id")]
13974 pub client_id: Option<String>,
13975}
13976#[derive(Debug, Clone)]
13978pub enum PostGwApiV1BankInstructionsBulkResponse {
13979 Accepted(AsynchronousInstructionSetResponse),
13981 BadRequest,
13983 InternalServerError,
13985 Unknown,
13987}
13988#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
13990pub struct PostGwApiV1BankInstructionsQueryRequest {
13991 pub query: PostGwApiV1BankInstructionsQueryRequestQuery,
13992 pub body: QueryRequestBody2,
13994}
13995impl PostGwApiV1BankInstructionsQueryRequest {
13996 pub async fn parse_response(
13998 req: reqwest::Response,
13999 ) -> anyhow::Result<PostGwApiV1BankInstructionsQueryResponse> {
14000 let status = req.status();
14001 if status == http::StatusCode::CREATED {
14002 let data =
14003 oas3_gen_support::Diagnostics::<Query201Response>::json_with_diagnostics(req)
14004 .await?;
14005 return Ok(PostGwApiV1BankInstructionsQueryResponse::Created(data));
14006 }
14007 if status == http::StatusCode::BAD_REQUEST {
14008 let _ = req.bytes().await?;
14009 return Ok(PostGwApiV1BankInstructionsQueryResponse::BadRequest);
14010 }
14011 if status == http::StatusCode::FORBIDDEN {
14012 let _ = req.bytes().await?;
14013 return Ok(PostGwApiV1BankInstructionsQueryResponse::Forbidden);
14014 }
14015 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14016 let _ = req.bytes().await?;
14017 return Ok(PostGwApiV1BankInstructionsQueryResponse::UnprocessableEntity);
14018 }
14019 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14020 let _ = req.bytes().await?;
14021 return Ok(PostGwApiV1BankInstructionsQueryResponse::InternalServerError);
14022 }
14023 let _ = req.bytes().await?;
14024 return Ok(PostGwApiV1BankInstructionsQueryResponse::Unknown);
14025 }
14026}
14027#[serde_with::skip_serializing_none]
14028#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14029pub struct PostGwApiV1BankInstructionsQueryRequestQuery {
14030 #[serde(rename = "client-id")]
14033 pub client_id: Option<String>,
14034}
14035#[derive(Debug, Clone)]
14037pub enum PostGwApiV1BankInstructionsQueryResponse {
14038 Created(Query201Response),
14040 BadRequest,
14042 Forbidden,
14044 UnprocessableEntity,
14046 InternalServerError,
14048 Unknown,
14050}
14051#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14053pub struct PostGwApiV1BankInstructionsRequest {
14054 pub query: PostGwApiV1BankInstructionsRequestQuery,
14055 pub body: InstructionRequestBody,
14056}
14057impl PostGwApiV1BankInstructionsRequest {
14058 pub async fn parse_response(
14060 req: reqwest::Response,
14061 ) -> anyhow::Result<PostGwApiV1BankInstructionsResponse> {
14062 let status = req.status();
14063 if status == http::StatusCode::ACCEPTED {
14064 let data = oas3_gen_support::Diagnostics::<
14065 AsynchronousInstructionResponse,
14066 >::json_with_diagnostics(req)
14067 .await?;
14068 return Ok(PostGwApiV1BankInstructionsResponse::Accepted(data));
14069 }
14070 if status == http::StatusCode::BAD_REQUEST {
14071 let _ = req.bytes().await?;
14072 return Ok(PostGwApiV1BankInstructionsResponse::BadRequest);
14073 }
14074 if status == http::StatusCode::FORBIDDEN {
14075 let _ = req.bytes().await?;
14076 return Ok(PostGwApiV1BankInstructionsResponse::Forbidden);
14077 }
14078 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14079 let _ = req.bytes().await?;
14080 return Ok(PostGwApiV1BankInstructionsResponse::UnprocessableEntity);
14081 }
14082 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14083 let _ = req.bytes().await?;
14084 return Ok(PostGwApiV1BankInstructionsResponse::InternalServerError);
14085 }
14086 let _ = req.bytes().await?;
14087 return Ok(PostGwApiV1BankInstructionsResponse::Unknown);
14088 }
14089}
14090#[serde_with::skip_serializing_none]
14091#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14092pub struct PostGwApiV1BankInstructionsRequestQuery {
14093 #[serde(rename = "client-id")]
14096 pub client_id: Option<String>,
14097}
14098#[derive(Debug, Clone)]
14100pub enum PostGwApiV1BankInstructionsResponse {
14101 Accepted(AsynchronousInstructionResponse),
14103 BadRequest,
14105 Forbidden,
14107 UnprocessableEntity,
14109 InternalServerError,
14111 Unknown,
14113}
14114#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14116pub struct PostGwApiV1EchoSignedJwtRequest {
14117 pub body: AccountRequestBody,
14119}
14120impl PostGwApiV1EchoSignedJwtRequest {
14121 pub async fn parse_response(
14123 req: reqwest::Response,
14124 ) -> anyhow::Result<GetGwApiV1EchoHttpsResponse> {
14125 let status = req.status();
14126 if status == http::StatusCode::OK {
14127 let data =
14128 oas3_gen_support::Diagnostics::<EchoResponse>::json_with_diagnostics(req).await?;
14129 return Ok(GetGwApiV1EchoHttpsResponse::Ok(data));
14130 }
14131 if status == http::StatusCode::UNAUTHORIZED {
14132 let _ = req.bytes().await?;
14133 return Ok(GetGwApiV1EchoHttpsResponse::Unauthorized);
14134 }
14135 if status == http::StatusCode::FORBIDDEN {
14136 let _ = req.bytes().await?;
14137 return Ok(GetGwApiV1EchoHttpsResponse::Forbidden);
14138 }
14139 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14140 let _ = req.bytes().await?;
14141 return Ok(GetGwApiV1EchoHttpsResponse::InternalServerError);
14142 }
14143 let _ = req.bytes().await?;
14144 return Ok(GetGwApiV1EchoHttpsResponse::Unknown);
14145 }
14146}
14147#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14149pub struct PostGwApiV1ExternalAssetTransfersBulkRequest {
14150 pub query: PostGwApiV1ExternalAssetTransfersBulkRequestQuery,
14151 pub body: ExternalAssetTransfersBulkRequestBody,
14153}
14154impl PostGwApiV1ExternalAssetTransfersBulkRequest {
14155 pub async fn parse_response(
14157 req: reqwest::Response,
14158 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
14159 let status = req.status();
14160 if status == http::StatusCode::ACCEPTED {
14161 let data = oas3_gen_support::Diagnostics::<
14162 AsynchronousInstructionSetResponse,
14163 >::json_with_diagnostics(req)
14164 .await?;
14165 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
14166 }
14167 if status == http::StatusCode::BAD_REQUEST {
14168 let _ = req.bytes().await?;
14169 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
14170 }
14171 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14172 let _ = req.bytes().await?;
14173 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
14174 }
14175 let _ = req.bytes().await?;
14176 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
14177 }
14178}
14179#[serde_with::skip_serializing_none]
14180#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14181pub struct PostGwApiV1ExternalAssetTransfersBulkRequestQuery {
14182 #[serde(rename = "client-id")]
14185 pub client_id: Option<String>,
14186}
14187#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14189pub struct PostGwApiV1ExternalAssetTransfersRequest {
14190 pub query: PostGwApiV1ExternalAssetTransfersRequestQuery,
14191 pub body: TransferRequestBody2,
14192}
14193impl PostGwApiV1ExternalAssetTransfersRequest {
14194 pub async fn parse_response(
14196 req: reqwest::Response,
14197 ) -> anyhow::Result<PostGwApiV1BankInstructionsResponse> {
14198 let status = req.status();
14199 if status == http::StatusCode::ACCEPTED {
14200 let data = oas3_gen_support::Diagnostics::<
14201 AsynchronousInstructionResponse,
14202 >::json_with_diagnostics(req)
14203 .await?;
14204 return Ok(PostGwApiV1BankInstructionsResponse::Accepted(data));
14205 }
14206 if status == http::StatusCode::BAD_REQUEST {
14207 let _ = req.bytes().await?;
14208 return Ok(PostGwApiV1BankInstructionsResponse::BadRequest);
14209 }
14210 if status == http::StatusCode::FORBIDDEN {
14211 let _ = req.bytes().await?;
14212 return Ok(PostGwApiV1BankInstructionsResponse::Forbidden);
14213 }
14214 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14215 let _ = req.bytes().await?;
14216 return Ok(PostGwApiV1BankInstructionsResponse::UnprocessableEntity);
14217 }
14218 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14219 let _ = req.bytes().await?;
14220 return Ok(PostGwApiV1BankInstructionsResponse::InternalServerError);
14221 }
14222 let _ = req.bytes().await?;
14223 return Ok(PostGwApiV1BankInstructionsResponse::Unknown);
14224 }
14225}
14226#[serde_with::skip_serializing_none]
14227#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14228pub struct PostGwApiV1ExternalAssetTransfersRequestQuery {
14229 #[serde(rename = "client-id")]
14232 pub client_id: Option<String>,
14233}
14234#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14236pub struct PostGwApiV1ExternalCashTransfersBulkRequest {
14237 pub query: PostGwApiV1ExternalCashTransfersBulkRequestQuery,
14238 pub body: ExternalCashTransfersBulkRequestBody,
14240}
14241impl PostGwApiV1ExternalCashTransfersBulkRequest {
14242 pub async fn parse_response(
14244 req: reqwest::Response,
14245 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
14246 let status = req.status();
14247 if status == http::StatusCode::ACCEPTED {
14248 let data = oas3_gen_support::Diagnostics::<
14249 AsynchronousInstructionSetResponse,
14250 >::json_with_diagnostics(req)
14251 .await?;
14252 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
14253 }
14254 if status == http::StatusCode::BAD_REQUEST {
14255 let _ = req.bytes().await?;
14256 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
14257 }
14258 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14259 let _ = req.bytes().await?;
14260 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
14261 }
14262 let _ = req.bytes().await?;
14263 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
14264 }
14265}
14266#[serde_with::skip_serializing_none]
14267#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14268pub struct PostGwApiV1ExternalCashTransfersBulkRequestQuery {
14269 #[serde(rename = "client-id")]
14272 pub client_id: Option<String>,
14273}
14274#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14276pub struct PostGwApiV1ExternalCashTransfersQueryRequest {
14277 pub query: PostGwApiV1ExternalCashTransfersQueryRequestQuery,
14278 pub body: QueryRequestBody3,
14280}
14281impl PostGwApiV1ExternalCashTransfersQueryRequest {
14282 pub async fn parse_response(
14284 req: reqwest::Response,
14285 ) -> anyhow::Result<PostGwApiV1ExternalCashTransfersQueryResponse> {
14286 let status = req.status();
14287 if status == http::StatusCode::CREATED {
14288 let data =
14289 oas3_gen_support::Diagnostics::<Query201Response2>::json_with_diagnostics(req)
14290 .await?;
14291 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::Created(data));
14292 }
14293 if status == http::StatusCode::BAD_REQUEST {
14294 let _ = req.bytes().await?;
14295 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::BadRequest);
14296 }
14297 if status == http::StatusCode::FORBIDDEN {
14298 let _ = req.bytes().await?;
14299 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::Forbidden);
14300 }
14301 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14302 let _ = req.bytes().await?;
14303 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::UnprocessableEntity);
14304 }
14305 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14306 let _ = req.bytes().await?;
14307 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::InternalServerError);
14308 }
14309 let _ = req.bytes().await?;
14310 return Ok(PostGwApiV1ExternalCashTransfersQueryResponse::Unknown);
14311 }
14312}
14313#[serde_with::skip_serializing_none]
14314#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14315pub struct PostGwApiV1ExternalCashTransfersQueryRequestQuery {
14316 #[serde(rename = "client-id")]
14319 pub client_id: Option<String>,
14320}
14321#[derive(Debug, Clone)]
14323pub enum PostGwApiV1ExternalCashTransfersQueryResponse {
14324 Created(Query201Response2),
14326 BadRequest,
14328 Forbidden,
14330 UnprocessableEntity,
14332 InternalServerError,
14334 Unknown,
14336}
14337#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14339pub struct PostGwApiV1ExternalCashTransfersRequest {
14340 pub query: PostGwApiV1ExternalCashTransfersRequestQuery,
14341 pub body: TransferRequestBody3,
14342}
14343impl PostGwApiV1ExternalCashTransfersRequest {
14344 pub async fn parse_response(
14346 req: reqwest::Response,
14347 ) -> anyhow::Result<PostGwApiV1BankInstructionsResponse> {
14348 let status = req.status();
14349 if status == http::StatusCode::ACCEPTED {
14350 let data = oas3_gen_support::Diagnostics::<
14351 AsynchronousInstructionResponse,
14352 >::json_with_diagnostics(req)
14353 .await?;
14354 return Ok(PostGwApiV1BankInstructionsResponse::Accepted(data));
14355 }
14356 if status == http::StatusCode::BAD_REQUEST {
14357 let _ = req.bytes().await?;
14358 return Ok(PostGwApiV1BankInstructionsResponse::BadRequest);
14359 }
14360 if status == http::StatusCode::FORBIDDEN {
14361 let _ = req.bytes().await?;
14362 return Ok(PostGwApiV1BankInstructionsResponse::Forbidden);
14363 }
14364 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14365 let _ = req.bytes().await?;
14366 return Ok(PostGwApiV1BankInstructionsResponse::UnprocessableEntity);
14367 }
14368 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14369 let _ = req.bytes().await?;
14370 return Ok(PostGwApiV1BankInstructionsResponse::InternalServerError);
14371 }
14372 let _ = req.bytes().await?;
14373 return Ok(PostGwApiV1BankInstructionsResponse::Unknown);
14374 }
14375}
14376#[serde_with::skip_serializing_none]
14377#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14378pub struct PostGwApiV1ExternalCashTransfersRequestQuery {
14379 #[serde(rename = "client-id")]
14382 pub client_id: Option<String>,
14383}
14384#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14386pub struct PostGwApiV1InstructionsCancelBulkRequest {
14387 pub query: PostGwApiV1InstructionsCancelBulkRequestQuery,
14388 pub body: CancelBulkRequestBody,
14390}
14391impl PostGwApiV1InstructionsCancelBulkRequest {
14392 pub async fn parse_response(
14394 req: reqwest::Response,
14395 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
14396 let status = req.status();
14397 if status == http::StatusCode::ACCEPTED {
14398 let data = oas3_gen_support::Diagnostics::<
14399 AsynchronousInstructionSetResponse,
14400 >::json_with_diagnostics(req)
14401 .await?;
14402 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
14403 }
14404 if status == http::StatusCode::BAD_REQUEST {
14405 let _ = req.bytes().await?;
14406 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
14407 }
14408 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14409 let _ = req.bytes().await?;
14410 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
14411 }
14412 let _ = req.bytes().await?;
14413 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
14414 }
14415}
14416#[serde_with::skip_serializing_none]
14417#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14418pub struct PostGwApiV1InstructionsCancelBulkRequestQuery {
14419 #[serde(rename = "client-id")]
14422 pub client_id: Option<String>,
14423}
14424#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14426pub struct PostGwApiV1InstructionsCancelRequest {
14427 pub query: PostGwApiV1InstructionsCancelRequestQuery,
14428 #[validate(nested)]
14429 pub body: CancelRequestBody,
14430}
14431impl PostGwApiV1InstructionsCancelRequest {
14432 pub async fn parse_response(
14434 req: reqwest::Response,
14435 ) -> anyhow::Result<PostGwApiV1InstructionsCancelResponse> {
14436 let status = req.status();
14437 if status == http::StatusCode::CREATED {
14438 let data = oas3_gen_support::Diagnostics::<
14439 SynchronousInstructionResponse,
14440 >::json_with_diagnostics(req)
14441 .await?;
14442 return Ok(PostGwApiV1InstructionsCancelResponse::Created(data));
14443 }
14444 if status == http::StatusCode::BAD_REQUEST {
14445 let _ = req.bytes().await?;
14446 return Ok(PostGwApiV1InstructionsCancelResponse::BadRequest);
14447 }
14448 if status == http::StatusCode::FORBIDDEN {
14449 let _ = req.bytes().await?;
14450 return Ok(PostGwApiV1InstructionsCancelResponse::Forbidden);
14451 }
14452 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14453 let _ = req.bytes().await?;
14454 return Ok(PostGwApiV1InstructionsCancelResponse::UnprocessableEntity);
14455 }
14456 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14457 let _ = req.bytes().await?;
14458 return Ok(PostGwApiV1InstructionsCancelResponse::InternalServerError);
14459 }
14460 let _ = req.bytes().await?;
14461 return Ok(PostGwApiV1InstructionsCancelResponse::Unknown);
14462 }
14463}
14464#[serde_with::skip_serializing_none]
14465#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14466pub struct PostGwApiV1InstructionsCancelRequestQuery {
14467 #[serde(rename = "client-id")]
14470 pub client_id: Option<String>,
14471}
14472#[derive(Debug, Clone)]
14474pub enum PostGwApiV1InstructionsCancelResponse {
14475 Created(SynchronousInstructionResponse),
14477 BadRequest,
14479 Forbidden,
14481 UnprocessableEntity,
14483 InternalServerError,
14485 Unknown,
14487}
14488#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14490pub struct PostGwApiV1InstructionsQueryRequest {
14491 pub query: PostGwApiV1InstructionsQueryRequestQuery,
14492 #[validate(nested)]
14494 pub body: QueryRequestBody4,
14495}
14496impl PostGwApiV1InstructionsQueryRequest {
14497 pub async fn parse_response(
14499 req: reqwest::Response,
14500 ) -> anyhow::Result<PostGwApiV1BankInstructionsResponse> {
14501 let status = req.status();
14502 if status == http::StatusCode::ACCEPTED {
14503 let data = oas3_gen_support::Diagnostics::<
14504 AsynchronousInstructionResponse,
14505 >::json_with_diagnostics(req)
14506 .await?;
14507 return Ok(PostGwApiV1BankInstructionsResponse::Accepted(data));
14508 }
14509 if status == http::StatusCode::BAD_REQUEST {
14510 let _ = req.bytes().await?;
14511 return Ok(PostGwApiV1BankInstructionsResponse::BadRequest);
14512 }
14513 if status == http::StatusCode::FORBIDDEN {
14514 let _ = req.bytes().await?;
14515 return Ok(PostGwApiV1BankInstructionsResponse::Forbidden);
14516 }
14517 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14518 let _ = req.bytes().await?;
14519 return Ok(PostGwApiV1BankInstructionsResponse::UnprocessableEntity);
14520 }
14521 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14522 let _ = req.bytes().await?;
14523 return Ok(PostGwApiV1BankInstructionsResponse::InternalServerError);
14524 }
14525 let _ = req.bytes().await?;
14526 return Ok(PostGwApiV1BankInstructionsResponse::Unknown);
14527 }
14528}
14529#[serde_with::skip_serializing_none]
14530#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14531pub struct PostGwApiV1InstructionsQueryRequestQuery {
14532 #[serde(rename = "client-id")]
14535 pub client_id: Option<String>,
14536}
14537#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14539pub struct PostGwApiV1InternalAssetTransfersBulkRequest {
14540 pub query: PostGwApiV1InternalAssetTransfersBulkRequestQuery,
14541 pub body: InternalAssetTransfersBulkRequestBody,
14543}
14544impl PostGwApiV1InternalAssetTransfersBulkRequest {
14545 pub async fn parse_response(
14547 req: reqwest::Response,
14548 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
14549 let status = req.status();
14550 if status == http::StatusCode::ACCEPTED {
14551 let data = oas3_gen_support::Diagnostics::<
14552 AsynchronousInstructionSetResponse,
14553 >::json_with_diagnostics(req)
14554 .await?;
14555 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
14556 }
14557 if status == http::StatusCode::BAD_REQUEST {
14558 let _ = req.bytes().await?;
14559 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
14560 }
14561 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14562 let _ = req.bytes().await?;
14563 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
14564 }
14565 let _ = req.bytes().await?;
14566 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
14567 }
14568}
14569#[serde_with::skip_serializing_none]
14570#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14571pub struct PostGwApiV1InternalAssetTransfersBulkRequestQuery {
14572 #[serde(rename = "client-id")]
14575 pub client_id: Option<String>,
14576}
14577#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14579pub struct PostGwApiV1InternalAssetTransfersRequest {
14580 pub query: PostGwApiV1InternalAssetTransfersRequestQuery,
14581 #[validate(nested)]
14582 pub body: TransferRequestBody4,
14583}
14584impl PostGwApiV1InternalAssetTransfersRequest {
14585 pub async fn parse_response(
14587 req: reqwest::Response,
14588 ) -> anyhow::Result<PostGwApiV1BankInstructionsResponse> {
14589 let status = req.status();
14590 if status == http::StatusCode::ACCEPTED {
14591 let data = oas3_gen_support::Diagnostics::<
14592 AsynchronousInstructionResponse,
14593 >::json_with_diagnostics(req)
14594 .await?;
14595 return Ok(PostGwApiV1BankInstructionsResponse::Accepted(data));
14596 }
14597 if status == http::StatusCode::BAD_REQUEST {
14598 let _ = req.bytes().await?;
14599 return Ok(PostGwApiV1BankInstructionsResponse::BadRequest);
14600 }
14601 if status == http::StatusCode::FORBIDDEN {
14602 let _ = req.bytes().await?;
14603 return Ok(PostGwApiV1BankInstructionsResponse::Forbidden);
14604 }
14605 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14606 let _ = req.bytes().await?;
14607 return Ok(PostGwApiV1BankInstructionsResponse::UnprocessableEntity);
14608 }
14609 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14610 let _ = req.bytes().await?;
14611 return Ok(PostGwApiV1BankInstructionsResponse::InternalServerError);
14612 }
14613 let _ = req.bytes().await?;
14614 return Ok(PostGwApiV1BankInstructionsResponse::Unknown);
14615 }
14616}
14617#[serde_with::skip_serializing_none]
14618#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14619pub struct PostGwApiV1InternalAssetTransfersRequestQuery {
14620 #[serde(rename = "client-id")]
14623 pub client_id: Option<String>,
14624}
14625#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14627pub struct PostGwApiV1InternalCashTransfersBulkRequest {
14628 pub query: PostGwApiV1InternalCashTransfersBulkRequestQuery,
14629 pub body: InternalCashTransfersBulkRequestBody,
14631}
14632impl PostGwApiV1InternalCashTransfersBulkRequest {
14633 pub async fn parse_response(
14635 req: reqwest::Response,
14636 ) -> anyhow::Result<PostGwApiV1BankInstructionsBulkResponse> {
14637 let status = req.status();
14638 if status == http::StatusCode::ACCEPTED {
14639 let data = oas3_gen_support::Diagnostics::<
14640 AsynchronousInstructionSetResponse,
14641 >::json_with_diagnostics(req)
14642 .await?;
14643 return Ok(PostGwApiV1BankInstructionsBulkResponse::Accepted(data));
14644 }
14645 if status == http::StatusCode::BAD_REQUEST {
14646 let _ = req.bytes().await?;
14647 return Ok(PostGwApiV1BankInstructionsBulkResponse::BadRequest);
14648 }
14649 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14650 let _ = req.bytes().await?;
14651 return Ok(PostGwApiV1BankInstructionsBulkResponse::InternalServerError);
14652 }
14653 let _ = req.bytes().await?;
14654 return Ok(PostGwApiV1BankInstructionsBulkResponse::Unknown);
14655 }
14656}
14657#[serde_with::skip_serializing_none]
14658#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14659pub struct PostGwApiV1InternalCashTransfersBulkRequestQuery {
14660 #[serde(rename = "client-id")]
14663 pub client_id: Option<String>,
14664}
14665#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14667pub struct PostGwApiV1InternalCashTransfersRequest {
14668 pub query: PostGwApiV1InternalCashTransfersRequestQuery,
14669 #[validate(nested)]
14670 pub body: TransferRequestBody5,
14671}
14672impl PostGwApiV1InternalCashTransfersRequest {
14673 pub async fn parse_response(
14675 req: reqwest::Response,
14676 ) -> anyhow::Result<PostGwApiV1InstructionsCancelResponse> {
14677 let status = req.status();
14678 if status == http::StatusCode::CREATED {
14679 let data = oas3_gen_support::Diagnostics::<
14680 SynchronousInstructionResponse,
14681 >::json_with_diagnostics(req)
14682 .await?;
14683 return Ok(PostGwApiV1InstructionsCancelResponse::Created(data));
14684 }
14685 if status == http::StatusCode::BAD_REQUEST {
14686 let _ = req.bytes().await?;
14687 return Ok(PostGwApiV1InstructionsCancelResponse::BadRequest);
14688 }
14689 if status == http::StatusCode::FORBIDDEN {
14690 let _ = req.bytes().await?;
14691 return Ok(PostGwApiV1InstructionsCancelResponse::Forbidden);
14692 }
14693 if status == http::StatusCode::UNPROCESSABLE_ENTITY {
14694 let _ = req.bytes().await?;
14695 return Ok(PostGwApiV1InstructionsCancelResponse::UnprocessableEntity);
14696 }
14697 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14698 let _ = req.bytes().await?;
14699 return Ok(PostGwApiV1InstructionsCancelResponse::InternalServerError);
14700 }
14701 let _ = req.bytes().await?;
14702 return Ok(PostGwApiV1InstructionsCancelResponse::Unknown);
14703 }
14704}
14705#[serde_with::skip_serializing_none]
14706#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
14707pub struct PostGwApiV1InternalCashTransfersRequestQuery {
14708 #[serde(rename = "client-id")]
14711 pub client_id: Option<String>,
14712}
14713#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14715pub struct PostGwApiV1SsoBrowserSessionsRequest {
14716 #[validate(nested)]
14717 pub header: PostGwApiV1SsoBrowserSessionsRequestHeader,
14718 pub body: AccountRequestBody,
14720}
14721impl PostGwApiV1SsoBrowserSessionsRequest {
14722 pub async fn parse_response(
14724 req: reqwest::Response,
14725 ) -> anyhow::Result<PostGwApiV1SsoBrowserSessionsResponse> {
14726 let status = req.status();
14727 if status == http::StatusCode::OK {
14728 let data = oas3_gen_support::Diagnostics::<
14729 CreateBrowserSessionResponse,
14730 >::json_with_diagnostics(req)
14731 .await?;
14732 return Ok(PostGwApiV1SsoBrowserSessionsResponse::Ok(data));
14733 }
14734 if status == http::StatusCode::BAD_REQUEST {
14735 let _ = req.bytes().await?;
14736 return Ok(PostGwApiV1SsoBrowserSessionsResponse::BadRequest);
14737 }
14738 if status == http::StatusCode::UNAUTHORIZED {
14739 let _ = req.bytes().await?;
14740 return Ok(PostGwApiV1SsoBrowserSessionsResponse::Unauthorized);
14741 }
14742 if status == http::StatusCode::FORBIDDEN {
14743 let _ = req.bytes().await?;
14744 return Ok(PostGwApiV1SsoBrowserSessionsResponse::Forbidden);
14745 }
14746 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14747 let _ = req.bytes().await?;
14748 return Ok(PostGwApiV1SsoBrowserSessionsResponse::InternalServerError);
14749 }
14750 let _ = req.bytes().await?;
14751 return Ok(PostGwApiV1SsoBrowserSessionsResponse::Unknown);
14752 }
14753}
14754#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
14755pub struct PostGwApiV1SsoBrowserSessionsRequestHeader {
14756 #[validate(length(min = 1u64))]
14759 pub authorization: String,
14760}
14761impl core::convert::TryFrom<&PostGwApiV1SsoBrowserSessionsRequestHeader> for http::HeaderMap {
14762 type Error = http::header::InvalidHeaderValue;
14763 fn try_from(
14764 headers: &PostGwApiV1SsoBrowserSessionsRequestHeader,
14765 ) -> core::result::Result<Self, Self::Error> {
14766 let mut map = http::HeaderMap::with_capacity(1usize);
14767 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
14768 map.insert(AUTHORIZATION, header_value);
14769 Ok(map)
14770 }
14771}
14772impl core::convert::TryFrom<PostGwApiV1SsoBrowserSessionsRequestHeader> for http::HeaderMap {
14773 type Error = http::header::InvalidHeaderValue;
14774 fn try_from(
14775 headers: PostGwApiV1SsoBrowserSessionsRequestHeader,
14776 ) -> core::result::Result<Self, Self::Error> {
14777 http::HeaderMap::try_from(&headers)
14778 }
14779}
14780#[derive(Debug, Clone)]
14782pub enum PostGwApiV1SsoBrowserSessionsResponse {
14783 Ok(CreateBrowserSessionResponse),
14785 BadRequest,
14787 Unauthorized,
14789 Forbidden,
14791 InternalServerError,
14793 Unknown,
14795}
14796#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14798pub struct PostGwApiV1SsoSessionsRequest {
14799 #[validate(nested)]
14800 pub header: PostGwApiV1SsoSessionsRequestHeader,
14801 pub body: AccountRequestBody,
14803}
14804impl PostGwApiV1SsoSessionsRequest {
14805 pub async fn parse_response(
14807 req: reqwest::Response,
14808 ) -> anyhow::Result<PostGwApiV1SsoSessionsResponse> {
14809 let status = req.status();
14810 if status == http::StatusCode::OK {
14811 let data =
14812 oas3_gen_support::Diagnostics::<CreateSessionResponse>::json_with_diagnostics(req)
14813 .await?;
14814 return Ok(PostGwApiV1SsoSessionsResponse::Ok(data));
14815 }
14816 if status == http::StatusCode::BAD_REQUEST {
14817 let _ = req.bytes().await?;
14818 return Ok(PostGwApiV1SsoSessionsResponse::BadRequest);
14819 }
14820 if status == http::StatusCode::UNAUTHORIZED {
14821 let _ = req.bytes().await?;
14822 return Ok(PostGwApiV1SsoSessionsResponse::Unauthorized);
14823 }
14824 if status == http::StatusCode::FORBIDDEN {
14825 let _ = req.bytes().await?;
14826 return Ok(PostGwApiV1SsoSessionsResponse::Forbidden);
14827 }
14828 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14829 let _ = req.bytes().await?;
14830 return Ok(PostGwApiV1SsoSessionsResponse::InternalServerError);
14831 }
14832 let _ = req.bytes().await?;
14833 return Ok(PostGwApiV1SsoSessionsResponse::Unknown);
14834 }
14835}
14836#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
14837pub struct PostGwApiV1SsoSessionsRequestHeader {
14838 #[validate(length(min = 1u64))]
14841 pub authorization: String,
14842}
14843impl core::convert::TryFrom<&PostGwApiV1SsoSessionsRequestHeader> for http::HeaderMap {
14844 type Error = http::header::InvalidHeaderValue;
14845 fn try_from(
14846 headers: &PostGwApiV1SsoSessionsRequestHeader,
14847 ) -> core::result::Result<Self, Self::Error> {
14848 let mut map = http::HeaderMap::with_capacity(1usize);
14849 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
14850 map.insert(AUTHORIZATION, header_value);
14851 Ok(map)
14852 }
14853}
14854impl core::convert::TryFrom<PostGwApiV1SsoSessionsRequestHeader> for http::HeaderMap {
14855 type Error = http::header::InvalidHeaderValue;
14856 fn try_from(
14857 headers: PostGwApiV1SsoSessionsRequestHeader,
14858 ) -> core::result::Result<Self, Self::Error> {
14859 http::HeaderMap::try_from(&headers)
14860 }
14861}
14862#[derive(Debug, Clone)]
14864pub enum PostGwApiV1SsoSessionsResponse {
14865 Ok(CreateSessionResponse),
14867 BadRequest,
14869 Unauthorized,
14871 Forbidden,
14873 InternalServerError,
14875 Unknown,
14877}
14878#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14880pub struct PostGwApiV1StatementsRequest {
14881 #[validate(nested)]
14882 pub header: PostGwApiV1StatementsRequestHeader,
14883 #[validate(nested)]
14885 pub body: StmtRequest,
14886}
14887impl PostGwApiV1StatementsRequest {
14888 pub async fn parse_response(
14890 req: reqwest::Response,
14891 ) -> anyhow::Result<PostGwApiV1StatementsResponse> {
14892 let status = req.status();
14893 if status == http::StatusCode::OK {
14894 let data =
14895 oas3_gen_support::Diagnostics::<GetStatementsResponse>::json_with_diagnostics(req)
14896 .await?;
14897 return Ok(PostGwApiV1StatementsResponse::Ok(data));
14898 }
14899 if status == http::StatusCode::BAD_REQUEST {
14900 let _ = req.bytes().await?;
14901 return Ok(PostGwApiV1StatementsResponse::BadRequest);
14902 }
14903 if status == http::StatusCode::UNAUTHORIZED {
14904 let _ = req.bytes().await?;
14905 return Ok(PostGwApiV1StatementsResponse::Unauthorized);
14906 }
14907 if status == http::StatusCode::PAYMENT_REQUIRED {
14908 let _ = req.bytes().await?;
14909 return Ok(PostGwApiV1StatementsResponse::PaymentRequired);
14910 }
14911 if status == http::StatusCode::FORBIDDEN {
14912 let _ = req.bytes().await?;
14913 return Ok(PostGwApiV1StatementsResponse::Forbidden);
14914 }
14915 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
14916 let _ = req.bytes().await?;
14917 return Ok(PostGwApiV1StatementsResponse::InternalServerError);
14918 }
14919 let _ = req.bytes().await?;
14920 return Ok(PostGwApiV1StatementsResponse::Unknown);
14921 }
14922}
14923#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
14924pub struct PostGwApiV1StatementsRequestHeader {
14925 #[validate(length(min = 1u64))]
14928 pub authorization: String,
14929}
14930impl core::convert::TryFrom<&PostGwApiV1StatementsRequestHeader> for http::HeaderMap {
14931 type Error = http::header::InvalidHeaderValue;
14932 fn try_from(
14933 headers: &PostGwApiV1StatementsRequestHeader,
14934 ) -> core::result::Result<Self, Self::Error> {
14935 let mut map = http::HeaderMap::with_capacity(1usize);
14936 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
14937 map.insert(AUTHORIZATION, header_value);
14938 Ok(map)
14939 }
14940}
14941impl core::convert::TryFrom<PostGwApiV1StatementsRequestHeader> for http::HeaderMap {
14942 type Error = http::header::InvalidHeaderValue;
14943 fn try_from(
14944 headers: PostGwApiV1StatementsRequestHeader,
14945 ) -> core::result::Result<Self, Self::Error> {
14946 http::HeaderMap::try_from(&headers)
14947 }
14948}
14949#[derive(Debug, Clone)]
14951pub enum PostGwApiV1StatementsResponse {
14952 Ok(GetStatementsResponse),
14954 BadRequest,
14956 Unauthorized,
14958 PaymentRequired,
14960 Forbidden,
14962 InternalServerError,
14964 Unknown,
14966}
14967#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
14969pub struct PostGwApiV1TaxDocumentsRequest {
14970 #[validate(nested)]
14971 pub header: PostGwApiV1TaxDocumentsRequestHeader,
14972 #[validate(nested)]
14974 pub body: TaxFormRequest,
14975}
14976impl PostGwApiV1TaxDocumentsRequest {
14977 pub async fn parse_response(
14979 req: reqwest::Response,
14980 ) -> anyhow::Result<PostGwApiV1TaxDocumentsResponse> {
14981 let status = req.status();
14982 if status == http::StatusCode::OK {
14983 let data = oas3_gen_support::Diagnostics::<TaxFormResponse>::json_with_diagnostics(req)
14984 .await?;
14985 return Ok(PostGwApiV1TaxDocumentsResponse::Ok(data));
14986 }
14987 if status == http::StatusCode::BAD_REQUEST {
14988 let _ = req.bytes().await?;
14989 return Ok(PostGwApiV1TaxDocumentsResponse::BadRequest);
14990 }
14991 if status == http::StatusCode::UNAUTHORIZED {
14992 let _ = req.bytes().await?;
14993 return Ok(PostGwApiV1TaxDocumentsResponse::Unauthorized);
14994 }
14995 if status == http::StatusCode::PAYMENT_REQUIRED {
14996 let _ = req.bytes().await?;
14997 return Ok(PostGwApiV1TaxDocumentsResponse::PaymentRequired);
14998 }
14999 if status == http::StatusCode::FORBIDDEN {
15000 let _ = req.bytes().await?;
15001 return Ok(PostGwApiV1TaxDocumentsResponse::Forbidden);
15002 }
15003 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
15004 let _ = req.bytes().await?;
15005 return Ok(PostGwApiV1TaxDocumentsResponse::InternalServerError);
15006 }
15007 let _ = req.bytes().await?;
15008 return Ok(PostGwApiV1TaxDocumentsResponse::Unknown);
15009 }
15010}
15011#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
15012pub struct PostGwApiV1TaxDocumentsRequestHeader {
15013 #[validate(length(min = 1u64))]
15016 pub authorization: String,
15017}
15018impl core::convert::TryFrom<&PostGwApiV1TaxDocumentsRequestHeader> for http::HeaderMap {
15019 type Error = http::header::InvalidHeaderValue;
15020 fn try_from(
15021 headers: &PostGwApiV1TaxDocumentsRequestHeader,
15022 ) -> core::result::Result<Self, Self::Error> {
15023 let mut map = http::HeaderMap::with_capacity(1usize);
15024 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
15025 map.insert(AUTHORIZATION, header_value);
15026 Ok(map)
15027 }
15028}
15029impl core::convert::TryFrom<PostGwApiV1TaxDocumentsRequestHeader> for http::HeaderMap {
15030 type Error = http::header::InvalidHeaderValue;
15031 fn try_from(
15032 headers: PostGwApiV1TaxDocumentsRequestHeader,
15033 ) -> core::result::Result<Self, Self::Error> {
15034 http::HeaderMap::try_from(&headers)
15035 }
15036}
15037#[derive(Debug, Clone)]
15039pub enum PostGwApiV1TaxDocumentsResponse {
15040 Ok(TaxFormResponse),
15042 BadRequest,
15044 Unauthorized,
15046 PaymentRequired,
15048 Forbidden,
15050 InternalServerError,
15052 Unknown,
15054}
15055#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
15057pub struct PostGwApiV1TradeConfirmationsRequest {
15058 #[validate(nested)]
15059 pub header: PostGwApiV1TradeConfirmationsRequestHeader,
15060 #[validate(nested)]
15062 pub body: TradeConfirmationRequest,
15063}
15064impl PostGwApiV1TradeConfirmationsRequest {
15065 pub async fn parse_response(
15067 req: reqwest::Response,
15068 ) -> anyhow::Result<PostGwApiV1TradeConfirmationsResponse> {
15069 let status = req.status();
15070 if status == http::StatusCode::OK {
15071 let data =
15072 oas3_gen_support::Diagnostics::<TradeConfirmationResponse>::json_with_diagnostics(
15073 req,
15074 )
15075 .await?;
15076 return Ok(PostGwApiV1TradeConfirmationsResponse::Ok(data));
15077 }
15078 if status == http::StatusCode::BAD_REQUEST {
15079 let _ = req.bytes().await?;
15080 return Ok(PostGwApiV1TradeConfirmationsResponse::BadRequest);
15081 }
15082 if status == http::StatusCode::UNAUTHORIZED {
15083 let _ = req.bytes().await?;
15084 return Ok(PostGwApiV1TradeConfirmationsResponse::Unauthorized);
15085 }
15086 if status == http::StatusCode::PAYMENT_REQUIRED {
15087 let _ = req.bytes().await?;
15088 return Ok(PostGwApiV1TradeConfirmationsResponse::PaymentRequired);
15089 }
15090 if status == http::StatusCode::FORBIDDEN {
15091 let _ = req.bytes().await?;
15092 return Ok(PostGwApiV1TradeConfirmationsResponse::Forbidden);
15093 }
15094 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
15095 let _ = req.bytes().await?;
15096 return Ok(PostGwApiV1TradeConfirmationsResponse::InternalServerError);
15097 }
15098 let _ = req.bytes().await?;
15099 return Ok(PostGwApiV1TradeConfirmationsResponse::Unknown);
15100 }
15101}
15102#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
15103pub struct PostGwApiV1TradeConfirmationsRequestHeader {
15104 #[validate(length(min = 1u64))]
15107 pub authorization: String,
15108}
15109impl core::convert::TryFrom<&PostGwApiV1TradeConfirmationsRequestHeader> for http::HeaderMap {
15110 type Error = http::header::InvalidHeaderValue;
15111 fn try_from(
15112 headers: &PostGwApiV1TradeConfirmationsRequestHeader,
15113 ) -> core::result::Result<Self, Self::Error> {
15114 let mut map = http::HeaderMap::with_capacity(1usize);
15115 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
15116 map.insert(AUTHORIZATION, header_value);
15117 Ok(map)
15118 }
15119}
15120impl core::convert::TryFrom<PostGwApiV1TradeConfirmationsRequestHeader> for http::HeaderMap {
15121 type Error = http::header::InvalidHeaderValue;
15122 fn try_from(
15123 headers: PostGwApiV1TradeConfirmationsRequestHeader,
15124 ) -> core::result::Result<Self, Self::Error> {
15125 http::HeaderMap::try_from(&headers)
15126 }
15127}
15128#[derive(Debug, Clone)]
15130pub enum PostGwApiV1TradeConfirmationsResponse {
15131 Ok(TradeConfirmationResponse),
15133 BadRequest,
15135 Unauthorized,
15137 PaymentRequired,
15139 Forbidden,
15141 InternalServerError,
15143 Unknown,
15145}
15146#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
15148pub struct PostNewWatchlistRequest {
15149 #[validate(nested)]
15151 pub body: WatchlistRequestBody,
15152}
15153impl PostNewWatchlistRequest {
15154 pub async fn parse_response(
15156 req: reqwest::Response,
15157 ) -> anyhow::Result<PostNewWatchlistResponse> {
15158 let status = req.status();
15159 if status == http::StatusCode::OK {
15160 let data =
15161 oas3_gen_support::Diagnostics::<Watchlist200Response>::json_with_diagnostics(req)
15162 .await?;
15163 return Ok(PostNewWatchlistResponse::Ok(data));
15164 }
15165 if status == http::StatusCode::BAD_REQUEST {
15166 let _ = req.bytes().await?;
15167 return Ok(PostNewWatchlistResponse::BadRequest);
15168 }
15169 if status == http::StatusCode::UNAUTHORIZED {
15170 let _ = req.bytes().await?;
15171 return Ok(PostNewWatchlistResponse::Unauthorized);
15172 }
15173 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
15174 let _ = req.bytes().await?;
15175 return Ok(PostNewWatchlistResponse::InternalServerError);
15176 }
15177 if status == http::StatusCode::SERVICE_UNAVAILABLE {
15178 let _ = req.bytes().await?;
15179 return Ok(PostNewWatchlistResponse::ServiceUnavailable);
15180 }
15181 let _ = req.bytes().await?;
15182 return Ok(PostNewWatchlistResponse::Unknown);
15183 }
15184}
15185#[derive(Debug, Clone)]
15187pub enum PostNewWatchlistResponse {
15188 Ok(Watchlist200Response),
15190 BadRequest,
15192 Unauthorized,
15194 InternalServerError,
15197 ServiceUnavailable,
15200 Unknown,
15202}
15203#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15204pub struct PredefinedDestinationInstruction {
15205 #[serde(rename = "accountId")]
15207 #[validate(length(min = 1u64, max = 10u64))]
15208 pub account_id: String,
15209 #[serde(rename = "bankInstructionMethod")]
15211 pub bank_instruction_method: PredefinedDestinationInstructionBankInstructionMethod,
15212 #[serde(rename = "bankInstructionName")]
15214 #[validate(length(min = 1u64, max = 100u64))]
15215 pub bank_instruction_name: String,
15216 #[serde(rename = "clientInstructionId")]
15218 pub client_instruction_id: f64,
15219 #[validate(length(min = 3u64, max = 3u64))]
15221 pub currency: String,
15222 #[serde(rename = "financialInstitution")]
15223 #[validate(nested)]
15224 pub financial_institution: PredefinedDestinationInstructionFinancialInstitution,
15225}
15226#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15227pub enum PredefinedDestinationInstructionBankInstructionMethod {
15228 #[serde(rename = "LVP")]
15229 #[default]
15230 Lvp,
15231 #[serde(rename = "SEPA")]
15232 Sepa,
15233 #[serde(rename = "WIRE")]
15234 Wire,
15235 #[serde(rename = "ACH")]
15236 Ach,
15237 #[serde(rename = "CPA")]
15238 Cpa,
15239}
15240impl core::fmt::Display for PredefinedDestinationInstructionBankInstructionMethod {
15241 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15242 match self {
15243 Self::Lvp => write!(f, "LVP"),
15244 Self::Sepa => write!(f, "SEPA"),
15245 Self::Wire => write!(f, "WIRE"),
15246 Self::Ach => write!(f, "ACH"),
15247 Self::Cpa => write!(f, "CPA"),
15248 }
15249 }
15250}
15251#[serde_with::skip_serializing_none]
15252#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15253pub struct PredefinedDestinationInstructionFinancialInstitution {
15254 #[serde(rename = "branchCode")]
15255 #[validate(length(min = 0u64, max = 32u64))]
15256 pub branch_code: Option<String>,
15257 #[serde(rename = "branchCodeType")]
15259 pub branch_code_type:
15260 Option<PredefinedDestinationInstructionFinancialInstitutionBranchCodeType>,
15261 #[serde(rename = "clientAccountId")]
15263 #[validate(length(min = 1u64, max = 32u64))]
15264 pub client_account_id: String,
15265 #[validate(length(min = 1u64, max = 24u64))]
15267 pub identifier: String,
15268 #[serde(rename = "identifierType")]
15270 pub identifier_type: PredefinedDestinationInstructionFinancialInstitutionIdentifierType,
15271 #[validate(length(min = 1u64, max = 100u64))]
15273 pub name: String,
15274}
15275#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15276pub enum PredefinedDestinationInstructionFinancialInstitutionBranchCodeType {
15277 #[serde(rename = "BSB_AUD")]
15278 #[default]
15279 BsbAud,
15280 #[serde(rename = "BANK_CODE_CAD")]
15281 BankCodeCad,
15282 #[serde(rename = "NONE")]
15283 None,
15284}
15285impl core::fmt::Display for PredefinedDestinationInstructionFinancialInstitutionBranchCodeType {
15286 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15287 match self {
15288 Self::BsbAud => write!(f, "BSB_AUD"),
15289 Self::BankCodeCad => write!(f, "BANK_CODE_CAD"),
15290 Self::None => write!(f, "NONE"),
15291 }
15292 }
15293}
15294#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15295pub enum PredefinedDestinationInstructionFinancialInstitutionIdentifierType {
15296 #[serde(rename = "BIC")]
15297 #[default]
15298 Bic,
15299 #[serde(rename = "IFSC")]
15300 Ifsc,
15301}
15302impl core::fmt::Display for PredefinedDestinationInstructionFinancialInstitutionIdentifierType {
15303 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15304 match self {
15305 Self::Bic => write!(f, "BIC"),
15306 Self::Ifsc => write!(f, "IFSC"),
15307 }
15308 }
15309}
15310#[serde_with::skip_serializing_none]
15311#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, oas3_gen_support::Default)]
15312pub struct Presets {
15313 pub default_method_for_all: Option<PresetsDefaultMethodForAll>,
15324 pub group_auto_close_positions: Option<bool>,
15326 pub group_proportional_allocation: Option<bool>,
15328 pub profiles_auto_close_positions: Option<bool>,
15330 pub strict_credit_check: Option<bool>,
15332}
15333#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
15344pub enum PresetsDefaultMethodForAll {
15345 #[default]
15346 AvailableEquity,
15347 E,
15348 N,
15349 C,
15350 P,
15351 R,
15352 S,
15353}
15354impl core::fmt::Display for PresetsDefaultMethodForAll {
15355 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15356 match self {
15357 Self::AvailableEquity => write!(f, "AvailableEquity"),
15358 Self::E => write!(f, "E"),
15359 Self::N => write!(f, "N"),
15360 Self::C => write!(f, "C"),
15361 Self::P => write!(f, "P"),
15362 Self::R => write!(f, "R"),
15363 Self::S => write!(f, "S"),
15364 }
15365 }
15366}
15367#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
15369pub struct PreviewMarginImpactRequest {
15370 #[validate(nested)]
15371 pub path: PreviewMarginImpactRequestPath,
15372 #[validate(nested)]
15373 pub body: OrdersSubmissionRequest,
15374}
15375impl PreviewMarginImpactRequest {
15376 pub async fn parse_response(
15378 req: reqwest::Response,
15379 ) -> anyhow::Result<PreviewMarginImpactResponse> {
15380 let status = req.status();
15381 if status == http::StatusCode::OK {
15382 let data =
15383 oas3_gen_support::Diagnostics::<OrderPreview>::json_with_diagnostics(req).await?;
15384 return Ok(PreviewMarginImpactResponse::Ok(data));
15385 }
15386 if status == http::StatusCode::BAD_REQUEST {
15387 let _ = req.bytes().await?;
15388 return Ok(PreviewMarginImpactResponse::BadRequest);
15389 }
15390 if status == http::StatusCode::UNAUTHORIZED {
15391 let _ = req.bytes().await?;
15392 return Ok(PreviewMarginImpactResponse::Unauthorized);
15393 }
15394 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
15395 let _ = req.bytes().await?;
15396 return Ok(PreviewMarginImpactResponse::InternalServerError);
15397 }
15398 if status == http::StatusCode::SERVICE_UNAVAILABLE {
15399 let _ = req.bytes().await?;
15400 return Ok(PreviewMarginImpactResponse::ServiceUnavailable);
15401 }
15402 let _ = req.bytes().await?;
15403 return Ok(PreviewMarginImpactResponse::Unknown);
15404 }
15405}
15406#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
15407pub struct PreviewMarginImpactRequestPath {
15408 #[validate(length(min = 1u64))]
15411 pub account_id: String,
15412}
15413#[derive(Debug, Clone)]
15415pub enum PreviewMarginImpactResponse {
15416 Ok(OrderPreview),
15418 BadRequest,
15420 Unauthorized,
15422 InternalServerError,
15425 ServiceUnavailable,
15428 Unknown,
15430}
15431#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15432#[serde(untagged)]
15433pub enum Query201Response {
15434 #[default]
15435 RecentRecurringEvent(QueryRecentRecurringEventResponse),
15436 BankInstruction(QueryBankInstructionResponse),
15437 RecurringInstructions(QueryRecurringInstructionsResponse),
15438}
15439#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15440#[serde(untagged)]
15441pub enum Query201Response2 {
15442 #[default]
15443 QueryWithdrawableAmountsResponse(QueryWithdrawableAmountsResponse),
15444 WithoutOriginHold(QueryWithdrawableAmountsWithoutOriginHoldResponse),
15445}
15446#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15447pub struct QueryBankInstruction {
15448 #[serde(rename = "accountId")]
15450 #[validate(length(min = 1u64))]
15451 pub account_id: String,
15452 #[serde(rename = "bankInstructionMethod")]
15454 pub bank_instruction_method: BankInstructionMethod,
15455 #[serde(rename = "clientInstructionId")]
15457 pub client_instruction_id: f64,
15458}
15459#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15460pub struct QueryBankInstructionResponse {
15461 #[serde(rename = "instructionResult")]
15462 pub instruction_result: Option<QueryBankInstructionResult>,
15463 #[serde(rename = "instructionSetId")]
15465 pub instruction_set_id: f64,
15466 pub status: f64,
15468}
15469#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15470pub struct QueryBankInstructionResult {
15471 #[serde(rename = "accountId")]
15472 pub account_id: String,
15473 #[serde(rename = "bankInstructionDetails")]
15474 pub bank_instruction_details: Vec<QueryBankInstructionResultBankInstructionDetail>,
15475 #[serde(rename = "bankInstructionMethod")]
15476 pub bank_instruction_method: BankInstructionMethod,
15477 #[serde(rename = "clientInstructionId")]
15479 pub client_instruction_id: f64,
15480 pub description: Option<String>,
15482 #[serde(rename = "ibReferenceId")]
15484 pub ib_reference_id: Option<f64>,
15485 #[serde(rename = "instructionId")]
15487 pub instruction_id: f64,
15488 #[serde(rename = "instructionStatus")]
15490 pub instruction_status: InstructionResultInstructionStatus,
15491 #[serde(rename = "instructionType")]
15493 pub instruction_type: InstructionResultInstructionType,
15494}
15495#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15496pub struct QueryBankInstructionResultBankInstructionDetail {
15497 #[serde(rename = "bankAccountNumber")]
15499 pub bank_account_number: String,
15500 #[serde(rename = "bankRoutingNumber")]
15502 pub bank_routing_number: String,
15503 pub currency: String,
15505 #[serde(rename = "instructionName")]
15507 pub instruction_name: String,
15508 #[serde(rename = "instructionStatus")]
15510 pub instruction_status: String,
15511 #[serde(rename = "type")]
15513 pub r#type: String,
15514}
15515#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15516pub struct QueryIRAContributions {
15517 #[serde(rename = "accountId")]
15519 #[validate(length(min = 1u64))]
15520 pub account_id: String,
15521 #[serde(rename = "clientInstructionId")]
15523 pub client_instruction_id: f64,
15524 #[validate(length(min = 4u64, max = 4u64))]
15526 pub year: String,
15527}
15528#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15529pub struct QueryIRAContributionsResponse {
15530 #[serde(rename = "instructionResult")]
15531 pub instruction_result: Option<QueryIRAContributionsResult>,
15532 #[serde(rename = "instructionSetId")]
15534 pub instruction_set_id: f64,
15535 pub status: f64,
15537}
15538#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15539pub struct QueryIRAContributionsResult {
15540 #[serde(rename = "accountId")]
15541 pub account_id: String,
15542 #[serde(rename = "clientInstructionId")]
15544 pub client_instruction_id: f64,
15545 pub contributions: Vec<QueryIRAContributionsResultContribution>,
15546 pub description: Option<String>,
15548 pub error: Option<ResultError>,
15549 #[serde(rename = "ibReferenceId")]
15551 pub ib_reference_id: Option<f64>,
15552 #[serde(rename = "instructionId")]
15554 pub instruction_id: f64,
15555 #[serde(rename = "instructionStatus")]
15557 pub instruction_status: PollingInstructionResultInstructionStatus,
15558 #[serde(rename = "instructionType")]
15560 pub instruction_type: InstructionResultInstructionType,
15561 #[serde(rename = "iraType")]
15562 pub ira_type: String,
15563 pub year: String,
15564}
15565#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15566pub struct QueryIRAContributionsResultContribution {
15567 #[serde(rename = "allowedContributionLimit")]
15568 pub allowed_contribution_limit: f64,
15569 #[serde(rename = "maximumContributionLimit")]
15570 pub maximum_contribution_limit: f64,
15571 #[serde(rename = "yearToDateContribution")]
15572 pub year_to_date_contribution: f64,
15573}
15574#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15575#[serde(untagged)]
15576pub enum QueryInstructionKind {
15577 #[default]
15578 BankInstruction(QueryBankInstruction),
15579 RecentRecurringEvents(QueryRecentRecurringEvents),
15580 RecurringInstructions(QueryRecurringInstructions),
15581}
15582#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15583#[serde(untagged)]
15584pub enum QueryInstructionKind2 {
15585 #[default]
15586 WithdrawableFunds(QueryWithdrawableFunds),
15587 IRAContributions(QueryIRAContributions),
15588}
15589#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15590pub struct QueryRecentInstructionResponse {
15591 #[serde(rename = "instructionResult")]
15592 pub instruction_result: Option<QueryRecentInstructionResult>,
15593 #[serde(rename = "instructionSetId")]
15595 pub instruction_set_id: f64,
15596 pub status: f64,
15598}
15599#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15600pub struct QueryRecentInstructionResult {
15601 #[serde(rename = "clientInstructionId")]
15603 pub client_instruction_id: f64,
15604 pub description: Option<String>,
15606 pub error: Option<ResultError>,
15607 #[serde(rename = "ibReferenceId")]
15609 pub ib_reference_id: Option<f64>,
15610 #[serde(rename = "instructionHistory")]
15611 pub instruction_history: QueryRecentInstructionResultInstructionHistory,
15612 #[serde(rename = "instructionId")]
15614 pub instruction_id: f64,
15615 #[serde(rename = "instructionStatus")]
15617 pub instruction_status: PollingInstructionResultInstructionStatus,
15618 #[serde(rename = "instructionType")]
15620 pub instruction_type: InstructionResultInstructionType,
15621}
15622#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15623pub struct QueryRecentInstructionResultInstructionHistory {
15624 #[serde(rename = "historyMaxDepthNumberOfDays")]
15625 pub history_max_depth_number_of_days: i32,
15626 #[serde(rename = "historyMaxDepthNumberOfInstruction")]
15627 pub history_max_depth_number_of_instruction: i32,
15628 pub result: Vec<serde_json::Value>,
15629}
15630#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15631pub struct QueryRecentInstructions {
15632 #[serde(rename = "accountId")]
15634 #[validate(length(min = 1u64))]
15635 pub account_id: String,
15636 #[serde(rename = "clientInstructionId")]
15638 pub client_instruction_id: f64,
15639 #[serde(rename = "transactionHistory")]
15640 #[validate(nested)]
15641 pub transaction_history: QueryRecentInstructionsTransactionHistory,
15642}
15643#[serde_with::skip_serializing_none]
15644#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15645pub struct QueryRecentInstructionsTransactionHistory {
15646 #[serde(rename = "daysToGoBack")]
15648 #[validate(range(min = 1.0))]
15649 pub days_to_go_back: f64,
15650 #[serde(rename = "transactionType")]
15652 pub transaction_type: Option<QueryRecentInstructionsTransactionHistoryTransactionType>,
15653}
15654#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15655pub enum QueryRecentInstructionsTransactionHistoryTransactionType {
15656 #[serde(rename = "ALL")]
15657 #[default]
15658 All,
15659 #[serde(rename = "ACH_INSTRUCTION")]
15660 AchInstruction,
15661 #[serde(rename = "PREDEFINED_DESTINATION_INSTRUCTION")]
15662 PredefinedDestinationInstruction,
15663 #[serde(rename = "WITHDRAWAL")]
15664 Withdrawal,
15665 #[serde(rename = "DEPOSIT")]
15666 Deposit,
15667 #[serde(rename = "DWAC")]
15668 Dwac,
15669 #[serde(rename = "FOP")]
15670 Fop,
15671 #[serde(rename = "EDDA_INSTRUCTION")]
15672 EddaInstruction,
15673 #[serde(rename = "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")]
15674 TraditionalBankInstructionVerification,
15675 #[serde(rename = "CANCEL_INSTRUCTION")]
15676 CancelInstruction,
15677 #[serde(rename = "DELETE_BANK_INSTRUCTION")]
15678 DeleteBankInstruction,
15679 #[serde(rename = "EXTERNAL_POSITION_TRANSFER")]
15680 ExternalPositionTransfer,
15681 #[serde(rename = "INTERNAL_CASH_TRANSFER")]
15682 InternalCashTransfer,
15683 #[serde(rename = "INTERNAL_POSITION_TRANSFER")]
15684 InternalPositionTransfer,
15685 #[serde(rename = "COMPLEX_ASSET_TRANSFER")]
15686 ComplexAssetTransfer,
15687}
15688impl core::fmt::Display for QueryRecentInstructionsTransactionHistoryTransactionType {
15689 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15690 match self {
15691 Self::All => write!(f, "ALL"),
15692 Self::AchInstruction => write!(f, "ACH_INSTRUCTION"),
15693 Self::PredefinedDestinationInstruction => {
15694 write!(f, "PREDEFINED_DESTINATION_INSTRUCTION")
15695 }
15696 Self::Withdrawal => write!(f, "WITHDRAWAL"),
15697 Self::Deposit => write!(f, "DEPOSIT"),
15698 Self::Dwac => write!(f, "DWAC"),
15699 Self::Fop => write!(f, "FOP"),
15700 Self::EddaInstruction => write!(f, "EDDA_INSTRUCTION"),
15701 Self::TraditionalBankInstructionVerification => {
15702 write!(f, "TRADITIONAL_BANK_INSTRUCTION_VERIFICATION")
15703 }
15704 Self::CancelInstruction => write!(f, "CANCEL_INSTRUCTION"),
15705 Self::DeleteBankInstruction => write!(f, "DELETE_BANK_INSTRUCTION"),
15706 Self::ExternalPositionTransfer => write!(f, "EXTERNAL_POSITION_TRANSFER"),
15707 Self::InternalCashTransfer => write!(f, "INTERNAL_CASH_TRANSFER"),
15708 Self::InternalPositionTransfer => write!(f, "INTERNAL_POSITION_TRANSFER"),
15709 Self::ComplexAssetTransfer => write!(f, "COMPLEX_ASSET_TRANSFER"),
15710 }
15711 }
15712}
15713#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15714pub struct QueryRecentRecurringEventResponse {
15715 #[serde(rename = "instructionResult")]
15716 pub instruction_result: Option<QueryRecentRecurringEventResult>,
15717 #[serde(rename = "instructionSetId")]
15719 pub instruction_set_id: f64,
15720 pub status: f64,
15722}
15723#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15724pub struct QueryRecentRecurringEventResult {
15725 pub amount: f64,
15726 #[serde(rename = "clientInstructionId")]
15728 pub client_instruction_id: f64,
15729 pub currency: String,
15730 pub description: Option<String>,
15732 #[serde(rename = "ibReferenceId")]
15734 pub ib_reference_id: Option<f64>,
15735 #[serde(rename = "instructionId")]
15737 pub instruction_id: f64,
15738 #[serde(rename = "instructionStatus")]
15740 pub instruction_status: InstructionResultInstructionStatus,
15741 #[serde(rename = "instructionType")]
15743 pub instruction_type: InstructionResultInstructionType,
15744 pub method: String,
15745 #[serde(rename = "recurringInstructionName")]
15746 pub recurring_instruction_name: String,
15747 #[serde(rename = "recurringTransactionStatus")]
15748 pub recurring_transaction_status: String,
15749 #[serde(rename = "recurringTransactionType")]
15750 pub recurring_transaction_type: String,
15751 #[serde(rename = "transactionHistory")]
15752 pub transaction_history: QueryRecentRecurringEventResultTransactionHistory,
15753}
15754#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15755pub struct QueryRecentRecurringEventResultTransactionHistory {
15756 #[serde(rename = "maxNumberOfTransactions")]
15757 pub max_number_of_transactions: Option<i32>,
15758 pub result: Option<Vec<QueryRecentRecurringEventResultTransactionHistoryResult>>,
15759}
15760#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15761pub struct QueryRecentRecurringEventResultTransactionHistoryResult {
15762 #[serde(rename = "ibRequestId")]
15763 pub ib_request_id: Option<i32>,
15764 pub status: Option<String>,
15765}
15766#[serde_with::skip_serializing_none]
15767#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15768pub struct QueryRecentRecurringEvents {
15769 #[serde(rename = "clientInstructionId")]
15771 pub client_instruction_id: f64,
15772 #[serde(rename = "ibReferenceId")]
15774 #[validate(range(min = 0.0))]
15775 pub ib_reference_id: f64,
15776 #[serde(rename = "numberOfTransactions")]
15778 #[validate(range(min = 1.0))]
15779 pub number_of_transactions: Option<f64>,
15780}
15781#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15782pub struct QueryRecurringInstructions {
15783 #[serde(rename = "accountId")]
15785 #[validate(length(min = 1u64))]
15786 pub account_id: String,
15787 #[serde(rename = "clientInstructionId")]
15789 pub client_instruction_id: f64,
15790}
15791#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15792pub struct QueryRecurringInstructionsResponse {
15793 #[serde(rename = "instructionResult")]
15794 pub instruction_result: Option<QueryRecurringInstructionsResult>,
15795}
15796#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15797pub struct QueryRecurringInstructionsResult {
15798 #[serde(rename = "accountId")]
15799 pub account_id: String,
15800 #[serde(rename = "clientInstructionId")]
15802 pub client_instruction_id: f64,
15803 pub description: Option<String>,
15805 #[serde(rename = "ibReferenceId")]
15807 pub ib_reference_id: Option<f64>,
15808 #[serde(rename = "instructionId")]
15810 pub instruction_id: f64,
15811 #[serde(rename = "instructionStatus")]
15813 pub instruction_status: InstructionResultInstructionStatus,
15814 #[serde(rename = "instructionType")]
15816 pub instruction_type: InstructionResultInstructionType,
15817 #[serde(rename = "recurringInstructions")]
15818 pub recurring_instructions: Vec<QueryRecurringInstructionsResultRecurringInstruction>,
15819}
15820#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15821pub struct QueryRecurringInstructionsResultRecurringInstruction {
15822 pub amount: Option<f64>,
15823 #[serde(rename = "bankInstructionMethod")]
15824 pub bank_instruction_method: Option<String>,
15825 #[serde(rename = "bankInstructionName")]
15826 pub bank_instruction_name: Option<String>,
15827 pub currency: Option<String>,
15828 #[serde(rename = "endDate")]
15829 pub end_date: Option<String>,
15830 pub frequency: Option<String>,
15831 #[serde(rename = "requestId")]
15832 pub request_id: Option<i32>,
15833 #[serde(rename = "startDate")]
15834 pub start_date: Option<String>,
15835 #[serde(rename = "transactionType")]
15836 pub transaction_type: Option<String>,
15837}
15838#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15839#[serde(default)]
15840pub struct QueryRequestBody {
15841 pub instruction: QueryRequestBodyInstruction,
15842 #[serde(rename = "instructionType")]
15843 #[default("QUERY_WITHDRAWABLE_CASH_EQUITY".to_string())]
15844 pub instruction_type: String,
15845}
15846#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15847pub struct QueryRequestBody2 {
15848 pub instruction: QueryInstructionKind,
15849 #[serde(rename = "instructionType")]
15850 pub instruction_type: QueryRequestBody2InstructionType,
15851}
15852#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15853pub enum QueryRequestBody2InstructionType {
15854 #[serde(rename = "QUERY_BANK_INSTRUCTION")]
15855 #[default]
15856 QueryBankInstruction,
15857 #[serde(rename = "QUERY_RECENT_RECURRING_EVENTS")]
15858 QueryRecentRecurringEvents,
15859 #[serde(rename = "QUERY_RECURRING_INSTRUCTIONS")]
15860 QueryRecurringInstructions,
15861}
15862impl core::fmt::Display for QueryRequestBody2InstructionType {
15863 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15864 match self {
15865 Self::QueryBankInstruction => write!(f, "QUERY_BANK_INSTRUCTION"),
15866 Self::QueryRecentRecurringEvents => {
15867 write!(f, "QUERY_RECENT_RECURRING_EVENTS")
15868 }
15869 Self::QueryRecurringInstructions => write!(f, "QUERY_RECURRING_INSTRUCTIONS"),
15870 }
15871 }
15872}
15873#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15874pub struct QueryRequestBody3 {
15875 pub instruction: QueryInstructionKind2,
15876 #[serde(rename = "instructionType")]
15877 pub instruction_type: QueryRequestBody3InstructionType,
15878}
15879#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
15880pub enum QueryRequestBody3InstructionType {
15881 #[serde(rename = "QUERY_WITHDRAWABLE_FUNDS")]
15882 #[default]
15883 QueryWithdrawableFunds,
15884 #[serde(rename = "QUERY_IRA_CONTRIBUTIONS")]
15885 QueryIraContributions,
15886}
15887impl core::fmt::Display for QueryRequestBody3InstructionType {
15888 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15889 match self {
15890 Self::QueryWithdrawableFunds => write!(f, "QUERY_WITHDRAWABLE_FUNDS"),
15891 Self::QueryIraContributions => write!(f, "QUERY_IRA_CONTRIBUTIONS"),
15892 }
15893 }
15894}
15895#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15896#[serde(default)]
15897pub struct QueryRequestBody4 {
15898 #[validate(nested)]
15899 pub instruction: QueryRecentInstructions,
15900 #[serde(rename = "instructionType")]
15901 #[default("QUERY_RECENT_INSTRUCTIONS".to_string())]
15902 pub instruction_type: String,
15903}
15904#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
15905#[serde(untagged)]
15906pub enum QueryRequestBodyInstruction {
15907 #[default]
15908 QueryWithdrawableCashEquity(QueryWithdrawableCashEquity),
15909}
15910#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15911pub struct QueryWithdrawableAmountsInstructionResult {
15912 #[serde(rename = "accountId")]
15913 pub account_id: String,
15914 #[serde(rename = "allowedTransferAmountToMaster")]
15915 pub allowed_transfer_amount_to_master: f64,
15916 #[serde(rename = "allowedTransferAmountToMasterNoBorrow")]
15917 pub allowed_transfer_amount_to_master_no_borrow: f64,
15918 #[serde(rename = "clientInstructionId")]
15920 pub client_instruction_id: f64,
15921 pub currency: String,
15922 pub description: Option<String>,
15924 pub error: Option<ResultError>,
15925 #[serde(rename = "ibReferenceId")]
15927 pub ib_reference_id: Option<f64>,
15928 #[serde(rename = "instructionId")]
15930 pub instruction_id: f64,
15931 #[serde(rename = "instructionStatus")]
15933 pub instruction_status: PollingInstructionResultInstructionStatus,
15934 #[serde(rename = "instructionType")]
15936 pub instruction_type: InstructionResultInstructionType,
15937 #[serde(rename = "withdrawableAmount")]
15938 pub withdrawable_amount: f64,
15939 #[serde(rename = "withdrawableAmountNoBorrow")]
15940 pub withdrawable_amount_no_borrow: f64,
15941}
15942#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15943pub struct QueryWithdrawableAmountsResponse {
15944 #[serde(rename = "instructionResult")]
15945 pub instruction_result: Option<QueryWithdrawableAmountsInstructionResult>,
15946 #[serde(rename = "instructionSetId")]
15948 pub instruction_set_id: f64,
15949 pub status: f64,
15951}
15952#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15953pub struct QueryWithdrawableAmountsWithoutOriginHoldResponse {
15954 #[serde(rename = "instructionResult")]
15955 pub instruction_result: Option<QueryWithdrawableAmountsWithoutOriginHoldResult>,
15956 #[serde(rename = "instructionSetId")]
15958 pub instruction_set_id: f64,
15959 pub status: f64,
15961}
15962#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
15963pub struct QueryWithdrawableAmountsWithoutOriginHoldResult {
15964 #[serde(rename = "accountId")]
15965 pub account_id: String,
15966 #[serde(rename = "clientInstructionId")]
15968 pub client_instruction_id: f64,
15969 pub currency: String,
15970 pub description: Option<String>,
15972 pub error: Option<ResultError>,
15973 #[serde(rename = "ibReferenceId")]
15975 pub ib_reference_id: Option<f64>,
15976 #[serde(rename = "instructionId")]
15978 pub instruction_id: f64,
15979 #[serde(rename = "instructionStatus")]
15981 pub instruction_status: PollingInstructionResultInstructionStatus,
15982 #[serde(rename = "instructionType")]
15984 pub instruction_type: InstructionResultInstructionType,
15985 #[serde(rename = "withdrawableAmountWithoutOriginationHold")]
15986 pub withdrawable_amount_without_origination_hold: f64,
15987 #[serde(rename = "withdrawableAmountWithoutOriginationHoldNoBorrow")]
15988 pub withdrawable_amount_without_origination_hold_no_borrow: f64,
15989}
15990#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
15991pub struct QueryWithdrawableCashEquity {
15992 #[serde(rename = "accountId")]
15994 #[validate(length(min = 1u64))]
15995 pub account_id: String,
15996 #[serde(rename = "clientInstructionId")]
15998 pub client_instruction_id: f64,
15999 #[validate(length(min = 3u64, max = 3u64))]
16001 pub currency: String,
16002}
16003#[serde_with::skip_serializing_none]
16004#[derive(
16005 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
16006)]
16007pub struct QueryWithdrawableCashEquityResponse {
16008 #[serde(rename = "instructionResult")]
16009 #[validate(nested)]
16010 pub instruction_result: Option<QueryWithdrawableCashEquityResult>,
16011 #[serde(rename = "instructionSetId")]
16013 pub instruction_set_id: f64,
16014 pub status: f64,
16016}
16017#[serde_with::skip_serializing_none]
16018#[derive(
16019 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
16020)]
16021pub struct QueryWithdrawableCashEquityResult {
16022 #[serde(rename = "accountId")]
16023 #[validate(length(min = 1u64))]
16024 pub account_id: String,
16025 #[serde(rename = "availableEquityValue")]
16026 pub available_equity_value: f64,
16027 #[serde(rename = "clientInstructionId")]
16029 pub client_instruction_id: f64,
16030 #[validate(length(min = 1u64))]
16031 pub currency: String,
16032 pub description: Option<String>,
16034 #[validate(nested)]
16035 pub error: Option<ResultError>,
16036 #[serde(rename = "ibReferenceId")]
16038 pub ib_reference_id: Option<f64>,
16039 #[serde(rename = "instructionId")]
16041 pub instruction_id: f64,
16042 #[serde(rename = "instructionStatus")]
16044 pub instruction_status: PollingInstructionResultInstructionStatus,
16045 #[serde(rename = "instructionType")]
16047 pub instruction_type: InstructionResultInstructionType,
16048 #[serde(rename = "withdrawableCashAmount")]
16049 pub withdrawable_cash_amount: f64,
16050}
16051#[serde_with::skip_serializing_none]
16052#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
16053pub struct QueryWithdrawableFunds {
16054 #[serde(rename = "accountId")]
16056 #[validate(length(min = 1u64))]
16057 pub account_id: String,
16058 #[serde(rename = "bankAccountNumber")]
16061 #[validate(length(min = 1u64))]
16062 pub bank_account_number: Option<String>,
16063 #[serde(rename = "bankInstructionName")]
16066 #[validate(length(min = 1u64))]
16067 pub bank_instruction_name: Option<String>,
16068 #[serde(rename = "bankRoutingNumber")]
16071 #[validate(length(min = 1u64))]
16072 pub bank_routing_number: Option<String>,
16073 #[serde(rename = "clientInstructionId")]
16075 pub client_instruction_id: f64,
16076 #[validate(length(min = 1u64))]
16078 pub currency: String,
16079}
16080#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16081pub struct QuestionnaireResponse {
16082 pub answers: Option<Vec<AnswerResponse>>,
16083 #[serde(rename = "isMandatoryToAnswer")]
16084 pub is_mandatory_to_answer: Option<bool>,
16085 pub question: Option<String>,
16086 #[serde(rename = "questionId")]
16087 pub question_id: Option<i64>,
16088 #[serde(rename = "questionType")]
16089 pub question_type: Option<String>,
16090}
16091#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16092pub struct RateResponse {
16093 pub rate: Option<f64>,
16095}
16096#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16098pub struct ReadFyiDisclaimerRequest {
16099 pub path: ReadFyiDisclaimerRequestPath,
16100}
16101impl ReadFyiDisclaimerRequest {
16102 pub async fn parse_response(
16104 req: reqwest::Response,
16105 ) -> anyhow::Result<ModifyFyiDeliveryResponse> {
16106 let status = req.status();
16107 if status == http::StatusCode::OK {
16108 let data = oas3_gen_support::Diagnostics::<FyiVT>::json_with_diagnostics(req).await?;
16109 return Ok(ModifyFyiDeliveryResponse::Ok(data));
16110 }
16111 if status == http::StatusCode::BAD_REQUEST {
16112 let _ = req.bytes().await?;
16113 return Ok(ModifyFyiDeliveryResponse::BadRequest);
16114 }
16115 if status == http::StatusCode::UNAUTHORIZED {
16116 let _ = req.bytes().await?;
16117 return Ok(ModifyFyiDeliveryResponse::Unauthorized);
16118 }
16119 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
16120 let _ = req.bytes().await?;
16121 return Ok(ModifyFyiDeliveryResponse::InternalServerError);
16122 }
16123 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16124 let _ = req.bytes().await?;
16125 return Ok(ModifyFyiDeliveryResponse::ServiceUnavailable);
16126 }
16127 let _ = req.bytes().await?;
16128 return Ok(ModifyFyiDeliveryResponse::Unknown);
16129 }
16130}
16131#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
16132pub struct ReadFyiDisclaimerRequestPath {
16133 pub typecode: Typecodes,
16158}
16159#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16161pub struct ReadFyiNotificationRequest {
16162 pub path: ReadFyiNotificationRequestPath,
16163}
16164impl ReadFyiNotificationRequest {
16165 pub async fn parse_response(
16167 req: reqwest::Response,
16168 ) -> anyhow::Result<ReadFyiNotificationResponse> {
16169 let status = req.status();
16170 if status == http::StatusCode::OK {
16171 let data = oas3_gen_support::Diagnostics::<
16172 NotificationReadAcknowledge,
16173 >::json_with_diagnostics(req)
16174 .await?;
16175 return Ok(ReadFyiNotificationResponse::Ok(data));
16176 }
16177 if status == http::StatusCode::BAD_REQUEST {
16178 let _ = req.bytes().await?;
16179 return Ok(ReadFyiNotificationResponse::BadRequest);
16180 }
16181 if status == http::StatusCode::UNAUTHORIZED {
16182 let _ = req.bytes().await?;
16183 return Ok(ReadFyiNotificationResponse::Unauthorized);
16184 }
16185 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
16186 let _ = req.bytes().await?;
16187 return Ok(ReadFyiNotificationResponse::InternalServerError);
16188 }
16189 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16190 let _ = req.bytes().await?;
16191 return Ok(ReadFyiNotificationResponse::ServiceUnavailable);
16192 }
16193 let _ = req.bytes().await?;
16194 return Ok(ReadFyiNotificationResponse::Unknown);
16195 }
16196}
16197#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
16198pub struct ReadFyiNotificationRequestPath {
16199 pub notification_id: serde_json::Value,
16201}
16202#[derive(Debug, Clone)]
16204pub enum ReadFyiNotificationResponse {
16205 Ok(NotificationReadAcknowledge),
16207 BadRequest,
16209 Unauthorized,
16211 InternalServerError,
16214 ServiceUnavailable,
16217 Unknown,
16219}
16220#[serde_with::skip_serializing_none]
16221#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
16222pub struct RecurringInstructionDetail {
16223 #[serde(rename = "endDate")]
16225 pub end_date: Option<String>,
16226 pub frequency: RecurringInstructionDetailFrequency,
16228 #[serde(rename = "instructionName")]
16230 #[validate(length(min = 1u64, max = 64u64))]
16231 pub instruction_name: String,
16232 #[serde(rename = "startDate")]
16234 #[validate(length(min = 1u64))]
16235 pub start_date: String,
16236}
16237#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
16238pub enum RecurringInstructionDetailFrequency {
16239 #[serde(rename = "MONTHLY")]
16240 #[default]
16241 Monthly,
16242 #[serde(rename = "QUARTERLY")]
16243 Quarterly,
16244 #[serde(rename = "YEARLY")]
16245 Yearly,
16246}
16247impl core::fmt::Display for RecurringInstructionDetailFrequency {
16248 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16249 match self {
16250 Self::Monthly => write!(f, "MONTHLY"),
16251 Self::Quarterly => write!(f, "QUARTERLY"),
16252 Self::Yearly => write!(f, "YEARLY"),
16253 }
16254 }
16255}
16256#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16257pub struct RegistrationTask {
16258 pub action: Option<String>,
16259 #[serde(rename = "dateCompleted")]
16260 pub date_completed: Option<chrono::DateTime<chrono::Utc>>,
16261 #[serde(rename = "externalId")]
16262 pub external_id: Option<String>,
16263 #[serde(rename = "formName")]
16264 pub form_name: Option<String>,
16265 #[serde(rename = "formNumber")]
16266 pub form_number: Option<i32>,
16267 #[serde(rename = "isCompleted")]
16268 pub is_completed: Option<bool>,
16269 #[serde(rename = "isDeclined")]
16270 pub is_declined: Option<bool>,
16271 #[serde(rename = "isRequiredForApproval")]
16272 pub is_required_for_approval: Option<bool>,
16273 #[serde(rename = "questionIds")]
16274 pub question_ids: Option<Vec<i32>>,
16275 pub state: Option<String>,
16276 pub warning: Option<String>,
16277}
16278#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16279pub struct RegistrationTasksResponse {
16280 #[serde(rename = "accountId")]
16281 pub account_id: Option<String>,
16282 pub description: Option<String>,
16283 pub error: Option<Box<ErrorResponse>>,
16284 #[serde(rename = "errorDescription")]
16285 pub error_description: Option<String>,
16286 #[serde(rename = "hasError")]
16287 pub has_error: Option<bool>,
16288 #[serde(rename = "registrationTaskPresent")]
16289 pub registration_task_present: Option<bool>,
16290 #[serde(rename = "registrationTasks")]
16291 pub registration_tasks: Option<Vec<RegistrationTask>>,
16292 pub state: Option<String>,
16293 pub status: Option<String>,
16294}
16295#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16296#[serde(untagged)]
16297pub enum Reply200Response {
16298 #[default]
16300 OrderSubmitSuccess(OrderSubmitSuccess),
16301 OrderReplyMessage(OrderReplyMessage),
16303 OrderSubmitError(OrderSubmitError),
16305 OrderReplyNotFound(OrderReplyNotFound),
16307 AdvancedOrderReject(AdvancedOrderReject),
16309}
16310impl Reply200Response {
16311 pub fn order_submit_error(error: Option<String>) -> Self {
16313 Self::OrderSubmitError(OrderSubmitError {
16314 error,
16315 ..Default::default()
16316 })
16317 }
16318 pub fn order_reply_not_found(error: Option<String>) -> Self {
16320 Self::OrderReplyNotFound(OrderReplyNotFound {
16321 error,
16322 ..Default::default()
16323 })
16324 }
16325 pub fn advanced_order_reject() -> Self {
16327 Self::AdvancedOrderReject(AdvancedOrderReject::default())
16328 }
16329}
16330#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16332pub struct ReqAccessTokenRequest {
16333 pub header: ReqAccessTokenRequestHeader,
16334}
16335impl ReqAccessTokenRequest {
16336 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ReqAccessTokenResponse> {
16338 let status = req.status();
16339 if status == http::StatusCode::OK {
16340 let data =
16341 oas3_gen_support::Diagnostics::<AccessToken200Response>::json_with_diagnostics(req)
16342 .await?;
16343 return Ok(ReqAccessTokenResponse::Ok(data));
16344 }
16345 if status == http::StatusCode::UNAUTHORIZED {
16346 let _ = req.bytes().await?;
16347 return Ok(ReqAccessTokenResponse::Unauthorized);
16348 }
16349 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16350 let _ = req.bytes().await?;
16351 return Ok(ReqAccessTokenResponse::ServiceUnavailable);
16352 }
16353 let _ = req.bytes().await?;
16354 return Ok(ReqAccessTokenResponse::Unknown);
16355 }
16356}
16357#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
16358pub struct ReqAccessTokenRequestHeader {
16359 pub authorization: Option<String>,
16362}
16363impl core::convert::TryFrom<&ReqAccessTokenRequestHeader> for http::HeaderMap {
16364 type Error = http::header::InvalidHeaderValue;
16365 fn try_from(headers: &ReqAccessTokenRequestHeader) -> core::result::Result<Self, Self::Error> {
16366 let mut map = http::HeaderMap::with_capacity(1usize);
16367 if let Some(value) = &headers.authorization {
16368 let header_value = http::HeaderValue::try_from(value)?;
16369 map.insert(AUTHORIZATION, header_value);
16370 }
16371 Ok(map)
16372 }
16373}
16374impl core::convert::TryFrom<ReqAccessTokenRequestHeader> for http::HeaderMap {
16375 type Error = http::header::InvalidHeaderValue;
16376 fn try_from(headers: ReqAccessTokenRequestHeader) -> core::result::Result<Self, Self::Error> {
16377 http::HeaderMap::try_from(&headers)
16378 }
16379}
16380#[derive(Debug, Clone)]
16382pub enum ReqAccessTokenResponse {
16383 Ok(AccessToken200Response),
16385 Unauthorized,
16387 ServiceUnavailable,
16390 Unknown,
16392}
16393#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
16394pub struct ReqIDRequestBody {
16395 #[serde(rename = "reqID")]
16398 pub req_id: i32,
16399}
16400#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16402pub struct ReqLiveSessionTokenRequest {
16403 pub header: ReqLiveSessionTokenRequestHeader,
16404}
16405impl ReqLiveSessionTokenRequest {
16406 pub async fn parse_response(
16408 req: reqwest::Response,
16409 ) -> anyhow::Result<ReqLiveSessionTokenResponse> {
16410 let status = req.status();
16411 if status == http::StatusCode::OK {
16412 let data = oas3_gen_support::Diagnostics::<
16413 LiveSessionToken200Response,
16414 >::json_with_diagnostics(req)
16415 .await?;
16416 return Ok(ReqLiveSessionTokenResponse::Ok(data));
16417 }
16418 if status == http::StatusCode::UNAUTHORIZED {
16419 let _ = req.bytes().await?;
16420 return Ok(ReqLiveSessionTokenResponse::Unauthorized);
16421 }
16422 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16423 let _ = req.bytes().await?;
16424 return Ok(ReqLiveSessionTokenResponse::ServiceUnavailable);
16425 }
16426 let _ = req.bytes().await?;
16427 return Ok(ReqLiveSessionTokenResponse::Unknown);
16428 }
16429}
16430#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
16431pub struct ReqLiveSessionTokenRequestHeader {
16432 pub authorization: Option<String>,
16435}
16436impl core::convert::TryFrom<&ReqLiveSessionTokenRequestHeader> for http::HeaderMap {
16437 type Error = http::header::InvalidHeaderValue;
16438 fn try_from(
16439 headers: &ReqLiveSessionTokenRequestHeader,
16440 ) -> core::result::Result<Self, Self::Error> {
16441 let mut map = http::HeaderMap::with_capacity(1usize);
16442 if let Some(value) = &headers.authorization {
16443 let header_value = http::HeaderValue::try_from(value)?;
16444 map.insert(AUTHORIZATION, header_value);
16445 }
16446 Ok(map)
16447 }
16448}
16449impl core::convert::TryFrom<ReqLiveSessionTokenRequestHeader> for http::HeaderMap {
16450 type Error = http::header::InvalidHeaderValue;
16451 fn try_from(
16452 headers: ReqLiveSessionTokenRequestHeader,
16453 ) -> core::result::Result<Self, Self::Error> {
16454 http::HeaderMap::try_from(&headers)
16455 }
16456}
16457#[derive(Debug, Clone)]
16459pub enum ReqLiveSessionTokenResponse {
16460 Ok(LiveSessionToken200Response),
16462 Unauthorized,
16464 ServiceUnavailable,
16467 Unknown,
16469}
16470#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16472pub struct ReqTempTokenRequest {
16473 pub header: ReqTempTokenRequestHeader,
16474}
16475impl ReqTempTokenRequest {
16476 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ReqTempTokenResponse> {
16478 let status = req.status();
16479 if status == http::StatusCode::OK {
16480 let data =
16481 oas3_gen_support::Diagnostics::<OauthTokenResponse>::json_with_diagnostics(req)
16482 .await?;
16483 return Ok(ReqTempTokenResponse::Ok(data));
16484 }
16485 if status == http::StatusCode::UNAUTHORIZED {
16486 let _ = req.bytes().await?;
16487 return Ok(ReqTempTokenResponse::Unauthorized);
16488 }
16489 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16490 let _ = req.bytes().await?;
16491 return Ok(ReqTempTokenResponse::ServiceUnavailable);
16492 }
16493 let _ = req.bytes().await?;
16494 return Ok(ReqTempTokenResponse::Unknown);
16495 }
16496}
16497#[derive(Debug, Clone, PartialEq, oas3_gen_support::Default)]
16498pub struct ReqTempTokenRequestHeader {
16499 pub authorization: Option<String>,
16502}
16503impl core::convert::TryFrom<&ReqTempTokenRequestHeader> for http::HeaderMap {
16504 type Error = http::header::InvalidHeaderValue;
16505 fn try_from(headers: &ReqTempTokenRequestHeader) -> core::result::Result<Self, Self::Error> {
16506 let mut map = http::HeaderMap::with_capacity(1usize);
16507 if let Some(value) = &headers.authorization {
16508 let header_value = http::HeaderValue::try_from(value)?;
16509 map.insert(AUTHORIZATION, header_value);
16510 }
16511 Ok(map)
16512 }
16513}
16514impl core::convert::TryFrom<ReqTempTokenRequestHeader> for http::HeaderMap {
16515 type Error = http::header::InvalidHeaderValue;
16516 fn try_from(headers: ReqTempTokenRequestHeader) -> core::result::Result<Self, Self::Error> {
16517 http::HeaderMap::try_from(&headers)
16518 }
16519}
16520#[derive(Debug, Clone)]
16522pub enum ReqTempTokenResponse {
16523 Ok(OauthTokenResponse),
16525 Unauthorized,
16527 ServiceUnavailable,
16530 Unknown,
16532}
16533#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16534pub struct RequestDetail {
16535 #[serde(rename = "accountID")]
16536 pub account_id: Option<String>,
16537 #[serde(rename = "dateSubmitted")]
16538 pub date_submitted: Option<String>,
16539 #[serde(rename = "requestId")]
16540 pub request_id: Option<i64>,
16541 #[serde(rename = "requestType")]
16542 pub request_type: Option<String>,
16543 pub status: Option<String>,
16544}
16545#[serde_with::skip_serializing_none]
16546#[derive(
16547 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
16548)]
16549pub struct RequestDetailsRequest {
16550 #[serde(rename = "endDate")]
16551 pub end_date: chrono::NaiveDate,
16552 #[validate(range(min = 1i32, max = 1_000i32))]
16553 pub limit: Option<i32>,
16554 #[validate(range(min = 0i32))]
16555 pub offset: Option<i32>,
16556 #[serde(rename = "startDate")]
16557 pub start_date: chrono::NaiveDate,
16558 pub status: Option<RequestStatus>,
16559}
16560#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16561pub struct RequestDetailsResponse {
16562 pub limit: Option<i32>,
16563 pub offset: Option<i32>,
16564 #[serde(rename = "requestDetails")]
16565 pub request_details: Option<Vec<RequestDetail>>,
16566 pub total: Option<i32>,
16567}
16568#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
16569pub enum RequestStatus {
16570 #[default]
16571 N,
16572 O,
16573 P,
16574 C,
16575 A,
16576 E,
16577 F,
16578 I,
16579 J,
16580 L,
16581 M,
16582 R,
16583 W,
16584 Q,
16585}
16586impl core::fmt::Display for RequestStatus {
16587 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16588 match self {
16589 Self::N => write!(f, "N"),
16590 Self::O => write!(f, "O"),
16591 Self::P => write!(f, "P"),
16592 Self::C => write!(f, "C"),
16593 Self::A => write!(f, "A"),
16594 Self::E => write!(f, "E"),
16595 Self::F => write!(f, "F"),
16596 Self::I => write!(f, "I"),
16597 Self::J => write!(f, "J"),
16598 Self::L => write!(f, "L"),
16599 Self::M => write!(f, "M"),
16600 Self::R => write!(f, "R"),
16601 Self::W => write!(f, "W"),
16602 Self::Q => write!(f, "Q"),
16603 }
16604 }
16605}
16606#[serde_with::skip_serializing_none]
16607#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, oas3_gen_support::Default)]
16608pub struct RequiredFormsRequest {
16609 #[serde(rename = "accountType")]
16610 pub account_type: Option<String>,
16611 #[serde(rename = "additionalAccount")]
16612 pub additional_account: Option<bool>,
16613 #[serde(rename = "additionalApplicant")]
16614 pub additional_applicant: Option<bool>,
16615 #[serde(rename = "applicantType")]
16616 pub applicant_type: Option<String>,
16617 pub capability: Option<Vec<String>>,
16618 #[serde(rename = "faTradingAccount")]
16619 pub fa_trading_account: Option<bool>,
16620 pub ira: Option<bool>,
16621 #[serde(rename = "iraType")]
16622 pub ira_type: Option<String>,
16623 #[serde(rename = "mifidCategory")]
16624 pub mifid_category: Option<String>,
16625 #[serde(rename = "processType")]
16626 pub process_type: Option<String>,
16627 #[serde(rename = "requestedFCBP")]
16628 pub requested_fcbp: Option<bool>,
16629 #[serde(rename = "requestedSYEP")]
16630 pub requested_syep: Option<bool>,
16631 #[serde(rename = "residenceCountry")]
16632 pub residence_country: Option<String>,
16633 #[serde(rename = "tradingPermissions")]
16634 pub trading_permissions: Option<Vec<String>>,
16635}
16636#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16637pub struct RequiredFormsResponse {
16638 pub error: Option<Box<ErrorResponse>>,
16639 #[serde(rename = "errorDescription")]
16640 pub error_description: Option<String>,
16641 pub forms: Option<Vec<String>>,
16642 #[serde(rename = "hasError")]
16643 pub has_error: Option<bool>,
16644}
16645#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
16647pub struct ResetOrderSuppressionRequest {}
16648impl ResetOrderSuppressionRequest {
16649 pub async fn parse_response(
16651 req: reqwest::Response,
16652 ) -> anyhow::Result<ResetOrderSuppressionResponse> {
16653 let status = req.status();
16654 if status == http::StatusCode::OK {
16655 let data = oas3_gen_support::Diagnostics::<StatusResponse3>::json_with_diagnostics(req)
16656 .await?;
16657 return Ok(ResetOrderSuppressionResponse::Ok(data));
16658 }
16659 if status == http::StatusCode::UNAUTHORIZED {
16660 let _ = req.bytes().await?;
16661 return Ok(ResetOrderSuppressionResponse::Unauthorized);
16662 }
16663 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
16664 let _ = req.bytes().await?;
16665 return Ok(ResetOrderSuppressionResponse::InternalServerError);
16666 }
16667 if status == http::StatusCode::SERVICE_UNAVAILABLE {
16668 let _ = req.bytes().await?;
16669 return Ok(ResetOrderSuppressionResponse::ServiceUnavailable);
16670 }
16671 let _ = req.bytes().await?;
16672 return Ok(ResetOrderSuppressionResponse::Unknown);
16673 }
16674}
16675#[derive(Debug, Clone)]
16677pub enum ResetOrderSuppressionResponse {
16678 Ok(StatusResponse3),
16680 Unauthorized,
16682 InternalServerError,
16685 ServiceUnavailable,
16688 Unknown,
16690}
16691#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16692pub struct ResponseData {
16693 pub accept: Option<String>,
16695 #[serde(rename = "dataType")]
16697 pub data_type: Option<String>,
16698 pub encoding: Option<String>,
16700 pub gzip: Option<bool>,
16702 #[serde(rename = "mimeType")]
16704 pub mime_type: Option<String>,
16705 pub value: Option<String>,
16707}
16708#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16709pub struct ResponseFileResponse {
16710 pub data: Option<serde_json::Value>,
16711 pub error: Option<Box<ErrorResponse>>,
16712 #[serde(rename = "errorDescription")]
16713 pub error_description: Option<String>,
16714 #[serde(rename = "hasError")]
16715 pub has_error: Option<bool>,
16716 #[serde(rename = "isProcessed")]
16717 pub is_processed: Option<bool>,
16718 pub name: Option<String>,
16719}
16720#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16721pub struct RestrictionInfo {
16722 #[serde(rename = "byIB")]
16723 pub by_ib: Option<bool>,
16724 pub id: Option<i32>,
16725 pub name: Option<String>,
16726}
16727pub type RestrictionRequestBody = String;
16729#[derive(
16730 Debug, Clone, PartialEq, Serialize, Deserialize, validator::Validate, oas3_gen_support::Default,
16731)]
16732pub struct ResultError {
16733 #[serde(rename = "errorCode")]
16734 #[validate(length(min = 1u64))]
16735 pub error_code: String,
16736 #[serde(rename = "errorMessage")]
16737 #[validate(length(min = 1u64))]
16738 pub error_message: String,
16739}
16740#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16741pub struct Rule200Response {
16742 pub allow_sell_long: Option<bool>,
16744 pub category: Option<String>,
16746 pub cfi_code: Option<String>,
16748 pub classifier: Option<String>,
16749 pub company_name: Option<String>,
16751 pub con_id: Option<i32>,
16753 pub contract_clarification_type: Option<String>,
16754 pub contract_month: Option<String>,
16756 pub currency: Option<String>,
16758 pub cusip: Option<String>,
16760 pub exchange: Option<String>,
16762 pub expiry_full: Option<String>,
16764 pub industry: Option<String>,
16766 pub instrument_type: Option<String>,
16768 pub is_zero_commission_security: Option<bool>,
16770 pub local_symbol: Option<String>,
16772 pub maturity_date: Option<String>,
16774 pub multiplier: Option<String>,
16776 pub r_t_h: Option<bool>,
16778 pub rules: Option<ContractRules>,
16780 pub smart_available: Option<bool>,
16782 pub symbol: Option<String>,
16784 pub text: Option<String>,
16786 pub trading_class: Option<String>,
16788 pub underlying_con_id: Option<i32>,
16790 pub underlying_issuer: Option<String>,
16792 pub valid_exchanges: Option<String>,
16794}
16795#[serde_with::skip_serializing_none]
16796#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
16797#[serde(default)]
16798pub struct RuleRequestBody {
16799 pub conid: i32,
16801 #[serde(rename = "isBuy")]
16803 #[default(Some(true))]
16804 pub is_buy: Option<bool>,
16805 #[serde(rename = "modifyOrder")]
16807 #[default(Some(false))]
16808 pub modify_order: Option<bool>,
16809 #[serde(rename = "orderId")]
16811 pub order_id: Option<i32>,
16812}
16813#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16814pub struct Save200Response {
16815 pub error: Option<String>,
16817 #[serde(rename = "reqID")]
16819 pub req_id: Option<i32>,
16820 #[serde(rename = "subscriptionStatus")]
16822 pub subscription_status: Option<i32>,
16823 pub success: Option<bool>,
16825}
16826#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16827pub struct Save200Response2 {
16828 #[serde(rename = "reqID")]
16831 pub req_id: Option<i32>,
16832 pub success: Option<bool>,
16834}
16835#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
16836pub struct SaveRequestBody {
16837 #[serde(rename = "cashTargets")]
16839 pub cash_targets: Vec<SaveRequestBodyCashTarget>,
16840 #[validate(length(min = 1u64))]
16842 pub desc: String,
16843 #[serde(rename = "isStatic")]
16847 pub is_static: bool,
16848 #[validate(length(min = 1u64))]
16851 pub model: String,
16852 #[serde(rename = "positionTargets")]
16854 pub position_targets: Vec<SaveRequestBodyPositionTarget>,
16855 #[serde(rename = "reqID")]
16858 pub req_id: i32,
16859}
16860#[serde_with::skip_serializing_none]
16861#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
16862pub struct SaveRequestBodyCashTarget {
16863 pub ccy: Option<String>,
16866 pub target: Option<f64>,
16869}
16870#[serde_with::skip_serializing_none]
16871#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
16872pub struct SaveRequestBodyPositionTarget {
16873 pub conid: Option<i32>,
16876 pub target: Option<f64>,
16879}
16880#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16881pub struct ScheduleResponse {
16882 pub exchange_time_zone: Option<String>,
16884 pub schedules: Option<ScheduleResponseSchedules>,
16886}
16887#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16889pub struct ScheduleResponseSchedules {
16890 pub date: Option<ScheduleResponseSchedulesDate>,
16892}
16893#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16895pub struct ScheduleResponseSchedulesDate {
16896 pub extended_hours: Option<Vec<ScheduleResponseSchedulesDateExtendedHour>>,
16897 pub liquid_hours: Option<Vec<ScheduleResponseSchedulesDateLiquidHour>>,
16898}
16899#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16900pub struct ScheduleResponseSchedulesDateExtendedHour {
16901 pub cancel_daily_orders: Option<bool>,
16903 pub closing: Option<i32>,
16905 pub opening: Option<i32>,
16907}
16908#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16909pub struct ScheduleResponseSchedulesDateLiquidHour {
16910 pub closing: Option<i32>,
16912 pub opening: Option<i32>,
16914}
16915#[serde_with::skip_serializing_none]
16916#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
16917#[serde(default)]
16918pub struct SearchRequestBody {
16919 pub fund: Option<bool>,
16921 #[serde(rename = "fundFamilyConidEx")]
16922 pub fund_family_conid_ex: Option<String>,
16923 pub more: Option<bool>,
16924 pub name: Option<bool>,
16926 pub pattern: Option<bool>,
16928 pub referrer: Option<String>,
16929 #[serde(rename = "secType")]
16934 #[default(Some(Default::default()))]
16935 pub sec_type: Option<GetContractSymbolsRequestQuerySecType>,
16936 #[validate(length(min = 1u64))]
16939 pub symbol: String,
16940}
16941#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16942pub struct SecDefInfoResponse {
16943 #[serde(rename = "companyName")]
16945 pub company_name: Option<String>,
16946 pub conid: Option<i32>,
16948 pub currency: Option<String>,
16950 pub exchange: Option<String>,
16952 #[serde(rename = "listingExchange")]
16954 pub listing_exchange: Option<String>,
16955 #[serde(rename = "maturityDate")]
16957 pub maturity_date: Option<String>,
16958 #[serde(rename = "priceRendering")]
16959 pub price_rendering: Option<String>,
16960 pub right: Option<IndividualPositionPutOrCall>,
16962 #[serde(rename = "secType")]
16964 pub sec_type: Option<String>,
16965 pub strike: Option<f64>,
16967 pub ticker: Option<String>,
16969 #[serde(rename = "validExchanges")]
16971 pub valid_exchanges: Option<String>,
16972}
16973pub type SecdefSearchResponse = Vec<SecdefSearchResponseSecdefSearchResponse>;
16974#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
16975pub struct SecdefSearchResponseSecdefSearchResponse {
16976 pub bondid: Option<i32>,
16978 #[serde(rename = "companyHeader")]
16980 pub company_header: Option<String>,
16981 #[serde(rename = "companyName")]
16983 pub company_name: Option<String>,
16984 pub conid: Option<String>,
16986 pub description: Option<String>,
16988 pub fop: Option<String>,
16990 pub issuers: Option<Vec<SecdefSearchResponseSecdefSearchResponseIssuer>>,
16991 pub opt: Option<String>,
16993 pub restricted: Option<bool>,
16995 pub sections: Option<Vec<SecdefSearchResponseSecdefSearchResponseSection>>,
16996 pub symbol: Option<String>,
16998 pub war: Option<String>,
17000}
17001#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17002pub struct SecdefSearchResponseSecdefSearchResponseIssuer {
17003 pub id: Option<String>,
17004 pub name: Option<String>,
17005}
17006#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17007pub struct SecdefSearchResponseSecdefSearchResponseSection {
17008 pub exchange: Option<String>,
17010 pub months: Option<String>,
17012 #[serde(rename = "secType")]
17013 pub sec_type: Option<String>,
17014}
17015#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17016pub struct SetAccountResponse {
17017 #[serde(rename = "acctId")]
17019 pub acct_id: Option<String>,
17020 pub set: Option<bool>,
17022}
17023#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17025pub struct SetAccountinvestmentInModelRequest {
17026 pub body: InvestDivestRequestBody,
17027}
17028impl SetAccountinvestmentInModelRequest {
17029 pub async fn parse_response(
17031 req: reqwest::Response,
17032 ) -> anyhow::Result<SetAccountinvestmentInModelResponse> {
17033 let status = req.status();
17034 if status == http::StatusCode::OK {
17035 let data =
17036 oas3_gen_support::Diagnostics::<InvestDivest200Response>::json_with_diagnostics(
17037 req,
17038 )
17039 .await?;
17040 return Ok(SetAccountinvestmentInModelResponse::Ok(data));
17041 }
17042 if status == http::StatusCode::UNAUTHORIZED {
17043 let _ = req.bytes().await?;
17044 return Ok(SetAccountinvestmentInModelResponse::Unauthorized);
17045 }
17046 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17047 let _ = req.bytes().await?;
17048 return Ok(SetAccountinvestmentInModelResponse::InternalServerError);
17049 }
17050 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17051 let _ = req.bytes().await?;
17052 return Ok(SetAccountinvestmentInModelResponse::ServiceUnavailable);
17053 }
17054 let _ = req.bytes().await?;
17055 return Ok(SetAccountinvestmentInModelResponse::Unknown);
17056 }
17057}
17058#[derive(Debug, Clone)]
17060pub enum SetAccountinvestmentInModelResponse {
17061 Ok(InvestDivest200Response),
17063 Unauthorized,
17065 InternalServerError,
17068 ServiceUnavailable,
17071 Unknown,
17073}
17074#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17076pub struct SetActiveAccountRequest {
17077 pub body: AcctIdRequestBody,
17078}
17079impl SetActiveAccountRequest {
17080 pub async fn parse_response(
17082 req: reqwest::Response,
17083 ) -> anyhow::Result<SetActiveAccountResponse> {
17084 let status = req.status();
17085 if status == http::StatusCode::OK {
17086 let data =
17087 oas3_gen_support::Diagnostics::<SetAccountResponse>::json_with_diagnostics(req)
17088 .await?;
17089 return Ok(SetActiveAccountResponse::Ok(data));
17090 }
17091 if status == http::StatusCode::UNAUTHORIZED {
17092 let _ = req.bytes().await?;
17093 return Ok(SetActiveAccountResponse::Unauthorized);
17094 }
17095 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17096 let _ = req.bytes().await?;
17097 return Ok(SetActiveAccountResponse::InternalServerError);
17098 }
17099 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17100 let _ = req.bytes().await?;
17101 return Ok(SetActiveAccountResponse::ServiceUnavailable);
17102 }
17103 let _ = req.bytes().await?;
17104 return Ok(SetActiveAccountResponse::Unknown);
17105 }
17106}
17107#[derive(Debug, Clone)]
17109pub enum SetActiveAccountResponse {
17110 Ok(SetAccountResponse),
17112 Unauthorized,
17114 InternalServerError,
17117 ServiceUnavailable,
17120 Unknown,
17122}
17123#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17125pub struct SetAllocationPresetRequest {
17126 pub body: Presets,
17127}
17128impl SetAllocationPresetRequest {
17129 pub async fn parse_response(
17131 req: reqwest::Response,
17132 ) -> anyhow::Result<SetAllocationPresetResponse> {
17133 let status = req.status();
17134 if status == http::StatusCode::OK {
17135 let data =
17136 oas3_gen_support::Diagnostics::<SuccessResponse2>::json_with_diagnostics(req)
17137 .await?;
17138 return Ok(SetAllocationPresetResponse::Ok(data));
17139 }
17140 if status == http::StatusCode::UNAUTHORIZED {
17141 let _ = req.bytes().await?;
17142 return Ok(SetAllocationPresetResponse::Unauthorized);
17143 }
17144 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17145 let _ = req.bytes().await?;
17146 return Ok(SetAllocationPresetResponse::InternalServerError);
17147 }
17148 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17149 let _ = req.bytes().await?;
17150 return Ok(SetAllocationPresetResponse::ServiceUnavailable);
17151 }
17152 let _ = req.bytes().await?;
17153 return Ok(SetAllocationPresetResponse::Unknown);
17154 }
17155}
17156#[derive(Debug, Clone)]
17158pub enum SetAllocationPresetResponse {
17159 Ok(SuccessResponse2),
17161 Unauthorized,
17163 InternalServerError,
17166 ServiceUnavailable,
17169 Unknown,
17171}
17172#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17174pub struct SetDynamicAccountRequest {
17175 #[validate(nested)]
17176 pub body: AcctIdRequestBody2,
17177}
17178impl SetDynamicAccountRequest {
17179 pub async fn parse_response(
17181 req: reqwest::Response,
17182 ) -> anyhow::Result<SetActiveAccountResponse> {
17183 let status = req.status();
17184 if status == http::StatusCode::OK {
17185 let data =
17186 oas3_gen_support::Diagnostics::<SetAccountResponse>::json_with_diagnostics(req)
17187 .await?;
17188 return Ok(SetActiveAccountResponse::Ok(data));
17189 }
17190 if status == http::StatusCode::UNAUTHORIZED {
17191 let _ = req.bytes().await?;
17192 return Ok(SetActiveAccountResponse::Unauthorized);
17193 }
17194 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17195 let _ = req.bytes().await?;
17196 return Ok(SetActiveAccountResponse::InternalServerError);
17197 }
17198 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17199 let _ = req.bytes().await?;
17200 return Ok(SetActiveAccountResponse::ServiceUnavailable);
17201 }
17202 let _ = req.bytes().await?;
17203 return Ok(SetActiveAccountResponse::Unknown);
17204 }
17205}
17206#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17208pub struct SetModelPresetsRequest {
17209 pub body: ModelPresetsResponse,
17210}
17211impl SetModelPresetsRequest {
17212 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<SetModelPresetsResponse> {
17214 let status = req.status();
17215 if status == http::StatusCode::OK {
17216 let data = oas3_gen_support::Diagnostics::<Save200Response>::json_with_diagnostics(req)
17217 .await?;
17218 return Ok(SetModelPresetsResponse::Ok(data));
17219 }
17220 if status == http::StatusCode::UNAUTHORIZED {
17221 let _ = req.bytes().await?;
17222 return Ok(SetModelPresetsResponse::Unauthorized);
17223 }
17224 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17225 let _ = req.bytes().await?;
17226 return Ok(SetModelPresetsResponse::InternalServerError);
17227 }
17228 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17229 let _ = req.bytes().await?;
17230 return Ok(SetModelPresetsResponse::ServiceUnavailable);
17231 }
17232 let _ = req.bytes().await?;
17233 return Ok(SetModelPresetsResponse::Unknown);
17234 }
17235}
17236#[derive(Debug, Clone)]
17238pub enum SetModelPresetsResponse {
17239 Ok(Save200Response),
17241 Unauthorized,
17243 InternalServerError,
17246 ServiceUnavailable,
17249 Unknown,
17251}
17252#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17254pub struct SetModelTargetPositionsRequest {
17255 #[validate(nested)]
17256 pub body: SaveRequestBody,
17257}
17258impl SetModelTargetPositionsRequest {
17259 pub async fn parse_response(
17261 req: reqwest::Response,
17262 ) -> anyhow::Result<SetModelTargetPositionsResponse> {
17263 let status = req.status();
17264 if status == http::StatusCode::OK {
17265 let data =
17266 oas3_gen_support::Diagnostics::<Save200Response2>::json_with_diagnostics(req)
17267 .await?;
17268 return Ok(SetModelTargetPositionsResponse::Ok(data));
17269 }
17270 if status == http::StatusCode::UNAUTHORIZED {
17271 let _ = req.bytes().await?;
17272 return Ok(SetModelTargetPositionsResponse::Unauthorized);
17273 }
17274 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17275 let _ = req.bytes().await?;
17276 return Ok(SetModelTargetPositionsResponse::InternalServerError);
17277 }
17278 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17279 let _ = req.bytes().await?;
17280 return Ok(SetModelTargetPositionsResponse::ServiceUnavailable);
17281 }
17282 let _ = req.bytes().await?;
17283 return Ok(SetModelTargetPositionsResponse::Unknown);
17284 }
17285}
17286#[derive(Debug, Clone)]
17288pub enum SetModelTargetPositionsResponse {
17289 Ok(Save200Response2),
17291 Unauthorized,
17293 InternalServerError,
17296 ServiceUnavailable,
17299 Unknown,
17301}
17302#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, oas3_gen_support::Default)]
17304pub enum Side {
17305 #[serde(rename = "BUY")]
17306 #[default]
17307 Buy,
17308 #[serde(rename = "SELL")]
17309 Sell,
17310}
17311impl core::fmt::Display for Side {
17312 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17313 match self {
17314 Self::Buy => write!(f, "BUY"),
17315 Self::Sell => write!(f, "SELL"),
17316 }
17317 }
17318}
17319#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17320pub struct SignatureAndOwners {
17321 #[serde(rename = "accountId")]
17323 pub account_id: Option<String>,
17324 pub applicant: Option<SignatureAndOwnersApplicant>,
17325 pub users: Option<Vec<User>>,
17326}
17327#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17328pub struct SignatureAndOwnersApplicant {
17329 pub signatures: Option<Vec<String>>,
17331}
17332#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17334pub struct SingleHistoricalBarBidAsk {
17335 pub c: Option<f64>,
17337 pub h: Option<f64>,
17339 pub l: Option<f64>,
17341 pub o: Option<f64>,
17343 pub t: Option<i32>,
17345 pub v: Option<f64>,
17347}
17348#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17350pub struct SingleHistoricalBarLast {
17351 pub c: Option<f64>,
17353 pub h: Option<f64>,
17355 pub l: Option<f64>,
17357 pub o: Option<f64>,
17359 pub t: Option<i32>,
17361 pub v: Option<f64>,
17363}
17364#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17366pub struct SingleHistoricalBarMidpoint {
17367 pub c: Option<f64>,
17369 pub h: Option<f64>,
17371 pub l: Option<f64>,
17373 pub o: Option<f64>,
17375 pub t: Option<i32>,
17377 pub v: Option<f64>,
17379}
17380#[serde_with::skip_serializing_none]
17382#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
17383pub struct SingleOrderSubmissionRequest {
17384 #[serde(rename = "acctId")]
17386 pub acct_id: Option<String>,
17387 #[serde(rename = "allOrNone")]
17389 pub all_or_none: Option<bool>,
17390 #[serde(rename = "auxPrice")]
17392 pub aux_price: Option<f64>,
17393 #[serde(rename = "cOID")]
17395 pub c_oid: Option<String>,
17396 #[serde(rename = "cashQty")]
17398 pub cash_qty: Option<f64>,
17399 pub conid: i32,
17401 pub conidex: Option<String>,
17403 #[serde(rename = "extOperator")]
17405 pub ext_operator: Option<String>,
17406 #[serde(rename = "isCcyConv")]
17408 pub is_ccy_conv: Option<bool>,
17409 #[serde(rename = "isSingleGroup")]
17411 pub is_single_group: Option<bool>,
17412 #[serde(rename = "jsonPayload")]
17413 pub json_payload: Option<SingleOrderSubmissionRequestJsonPayload>,
17414 #[serde(rename = "listingExchange")]
17416 pub listing_exchange: Option<String>,
17417 #[serde(rename = "manualIndicator")]
17419 pub manual_indicator: Option<bool>,
17420 #[serde(rename = "orderType")]
17422 #[validate(length(min = 1u64))]
17423 pub order_type: String,
17424 #[serde(rename = "outsideRTH")]
17426 pub outside_rth: Option<bool>,
17427 #[serde(rename = "parentId")]
17429 pub parent_id: Option<String>,
17430 pub price: Option<f64>,
17432 pub quantity: f64,
17434 pub referrer: Option<String>,
17436 #[serde(rename = "secType")]
17438 pub sec_type: Option<String>,
17439 pub side: Side,
17441 pub strategy: Option<String>,
17443 #[serde(rename = "strategyParameters")]
17445 pub strategy_parameters: Option<SingleOrderSubmissionRequestStrategyParameters>,
17446 #[serde(rename = "taxOptimizerId")]
17448 pub tax_optimizer_id: Option<String>,
17449 pub ticker: Option<String>,
17451 pub tif: OrderStatusTif,
17453 #[serde(rename = "trailingAmt")]
17455 pub trailing_amt: Option<f64>,
17456 #[serde(rename = "trailingType")]
17458 pub trailing_type: Option<SingleOrderSubmissionRequestTrailingType>,
17459 #[serde(rename = "useAdaptive")]
17461 pub use_adaptive: Option<bool>,
17462}
17463#[serde_with::skip_serializing_none]
17464#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
17465pub struct SingleOrderSubmissionRequestJsonPayload {
17466 pub allocation_profile: Option<SingleOrderSubmissionRequestJsonPayloadAllocationProfile>,
17468}
17469#[serde_with::skip_serializing_none]
17471#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
17472pub struct SingleOrderSubmissionRequestJsonPayloadAllocationProfile {
17473 pub alloc_type: Option<SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocType>,
17477 pub allocations:
17479 Option<Vec<SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocation>>,
17480}
17481#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
17485pub enum SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocType {
17486 #[serde(rename = "SHARE")]
17487 #[default]
17488 Share,
17489 #[serde(rename = "CASH")]
17490 Cash,
17491}
17492impl core::fmt::Display for SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocType {
17493 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17494 match self {
17495 Self::Share => write!(f, "SHARE"),
17496 Self::Cash => write!(f, "CASH"),
17497 }
17498 }
17499}
17500#[serde_with::skip_serializing_none]
17501#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
17502pub struct SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocation {
17503 pub account: Option<String>,
17505 pub amount: Option<f64>,
17507}
17508#[serde_with::skip_serializing_none]
17510#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
17511pub struct SingleOrderSubmissionRequestStrategyParameters {
17512 #[serde(rename = "PLACEHOLDER")]
17514 pub placeholder: Option<String>,
17515}
17516#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
17518pub enum SingleOrderSubmissionRequestTrailingType {
17519 #[serde(rename = "amt")]
17520 #[default]
17521 Amt,
17522 #[serde(rename = "%")]
17523 Unnamed,
17524}
17525impl core::fmt::Display for SingleOrderSubmissionRequestTrailingType {
17526 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17527 match self {
17528 Self::Amt => write!(f, "amt"),
17529 Self::Unnamed => write!(f, "%"),
17530 }
17531 }
17532}
17533#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17535pub struct SingleWatchlist {
17536 pub hash: Option<String>,
17538 pub id: Option<String>,
17540 pub instruments: Option<Vec<SingleWatchlistEntry>>,
17542 pub name: Option<String>,
17544 #[serde(rename = "readOnly")]
17546 pub read_only: Option<bool>,
17547}
17548#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17550pub struct SingleWatchlistEntry {
17551 #[serde(rename = "C")]
17553 pub c: Option<String>,
17554 #[serde(rename = "ST")]
17556 pub st: Option<SingleWatchlistEntryAssetClass>,
17557 #[serde(rename = "assetClass")]
17559 pub asset_class: Option<SingleWatchlistEntryAssetClass>,
17560 #[serde(rename = "chineseName")]
17562 pub chinese_name: Option<String>,
17563 pub conid: Option<i32>,
17565 #[serde(rename = "fullName")]
17567 pub full_name: Option<String>,
17568 pub name: Option<String>,
17570 pub ticker: Option<String>,
17572}
17573#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
17575pub enum SingleWatchlistEntryAssetClass {
17576 #[serde(rename = "STK")]
17577 #[default]
17578 Stk,
17579 #[serde(rename = "OPT")]
17580 Opt,
17581 #[serde(rename = "FUT")]
17582 Fut,
17583 #[serde(rename = "BOND")]
17584 Bond,
17585 #[serde(rename = "FUND")]
17586 Fund,
17587 #[serde(rename = "WAR")]
17588 War,
17589 #[serde(rename = "CASH")]
17590 Cash,
17591 #[serde(rename = "CRYPTO")]
17592 Crypto,
17593}
17594impl core::fmt::Display for SingleWatchlistEntryAssetClass {
17595 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17596 match self {
17597 Self::Stk => write!(f, "STK"),
17598 Self::Opt => write!(f, "OPT"),
17599 Self::Fut => write!(f, "FUT"),
17600 Self::Bond => write!(f, "BOND"),
17601 Self::Fund => write!(f, "FUND"),
17602 Self::War => write!(f, "WAR"),
17603 Self::Cash => write!(f, "CASH"),
17604 Self::Crypto => write!(f, "CRYPTO"),
17605 }
17606 }
17607}
17608#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17609pub struct SsoValidateResponse {
17610 #[serde(rename = "AUTH_TIME")]
17612 pub auth_time: Option<i32>,
17613 #[serde(rename = "CREDENTIAL")]
17615 pub credential: Option<String>,
17616 #[serde(rename = "EXPIRES")]
17618 pub expires: Option<i32>,
17619 #[serde(rename = "IP")]
17621 pub ip: Option<String>,
17622 #[serde(rename = "IS_FREE_TRIAL")]
17624 pub is_free_trial: Option<bool>,
17625 #[serde(rename = "IS_MASTER")]
17627 pub is_master: Option<bool>,
17628 #[serde(rename = "LANDING_APP")]
17630 pub landing_app: Option<String>,
17631 #[serde(rename = "PAPER_USER_NAME")]
17633 pub paper_user_name: Option<String>,
17634 #[serde(rename = "QUALIFIED_FOR_MOBILE_AUTH")]
17636 pub qualified_for_mobile_auth: Option<bool>,
17637 #[serde(rename = "RESULT")]
17639 pub result: Option<bool>,
17640 #[serde(rename = "SF_ENABLED")]
17642 pub sf_enabled: Option<bool>,
17643 #[serde(rename = "USER_ID")]
17645 pub user_id: Option<i32>,
17646 #[serde(rename = "USER_NAME")]
17648 pub user_name: Option<String>,
17649 pub features: Option<SsoValidateResponseFeatures>,
17651 #[serde(rename = "lastAccessed")]
17653 pub last_accessed: Option<i32>,
17654 #[serde(rename = "loginType")]
17656 pub login_type: Option<i32>,
17657 pub region: Option<String>,
17659}
17660#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17662pub struct SsoValidateResponseFeatures {
17663 pub bond: Option<bool>,
17665 pub calendar: Option<bool>,
17667 pub envs: Option<String>,
17669 #[serde(rename = "newMf")]
17671 pub new_mf: Option<bool>,
17672 #[serde(rename = "optionChains")]
17674 pub option_chains: Option<bool>,
17675 pub realtime: Option<bool>,
17677 pub wlms: Option<bool>,
17679}
17680#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17681pub struct StatusResponse {
17682 #[serde(rename = "dateSubmitted")]
17683 pub date_submitted: Option<chrono::DateTime<chrono::Utc>>,
17684 #[serde(rename = "fileData")]
17685 pub file_data: Option<FileData>,
17686 #[serde(rename = "requestId")]
17687 pub request_id: Option<i64>,
17688}
17689#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17691pub struct StatusResponse2 {
17692 pub status: Option<String>,
17694}
17695#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17697pub struct StatusResponse3 {
17698 pub status: Option<String>,
17700}
17701#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17702pub struct StatusResponse4 {
17703 pub status: Option<bool>,
17705}
17706#[serde_with::skip_serializing_none]
17707#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
17708#[serde(default)]
17709pub struct StmtRequest {
17710 #[serde(rename = "accountId")]
17712 #[validate(length(min = 1u64))]
17713 pub account_id: String,
17714 #[serde(rename = "accountIds")]
17717 pub account_ids: Option<Vec<String>>,
17718 #[serde(rename = "cryptoConsolIfAvailable")]
17720 #[default(Some(false))]
17721 pub crypto_consol_if_available: Option<bool>,
17722 #[serde(rename = "endDate")]
17724 #[validate(length(min = 1u64))]
17725 pub end_date: String,
17726 #[default(Some(false))]
17728 pub gzip: Option<bool>,
17729 #[default(Some("en".to_string()))]
17732 pub language: Option<String>,
17733 #[serde(rename = "mimeType")]
17736 pub mime_type: Option<String>,
17737 #[serde(rename = "multiAccountFormat")]
17739 pub multi_account_format: Option<String>,
17740 #[serde(rename = "startDate")]
17742 #[validate(length(min = 1u64))]
17743 pub start_date: String,
17744}
17745#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17746pub struct Stocks {
17747 #[serde(flatten)]
17749 pub additional_properties: std::collections::HashMap<String, Vec<serde_json::Value>>,
17750}
17751#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17752pub struct Strike200Response {
17753 pub call: Option<Vec<f64>>,
17755 pub put: Option<Vec<f64>>,
17757}
17758#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17759pub struct SubAccounts {
17760 pub accounts: Option<Vec<SubAccountsAccount>>,
17762}
17763#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17764pub struct SubAccountsAccount {
17765 pub data: Option<Vec<SubAccountsAccountDatum>>,
17767 pub name: Option<String>,
17769}
17770#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17771pub struct SubAccountsAccountDatum {
17772 pub key: Option<SubAccountsAccountDatumKey>,
17776 pub value: Option<String>,
17778}
17779#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
17783pub enum SubAccountsAccountDatumKey {
17784 #[default]
17785 AvailableEquity,
17786 NetLiquidation,
17787}
17788impl core::fmt::Display for SubAccountsAccountDatumKey {
17789 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17790 match self {
17791 Self::AvailableEquity => write!(f, "AvailableEquity"),
17792 Self::NetLiquidation => write!(f, "NetLiquidation"),
17793 }
17794 }
17795}
17796#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
17797pub enum SubType {
17798 #[serde(rename = "ACATS")]
17799 #[default]
17800 Acats,
17801 #[serde(rename = "ATON")]
17802 Aton,
17803}
17804impl core::fmt::Display for SubType {
17805 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17806 match self {
17807 Self::Acats => write!(f, "ACATS"),
17808 Self::Aton => write!(f, "ATON"),
17809 }
17810 }
17811}
17812pub type Subaccount200Response = Vec<AccountAttributes>;
17813#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17814pub struct Subaccounts2Response {
17815 pub metadata: Option<Subaccounts2ResponseMetadata>,
17817 pub subaccounts: Option<Vec<AccountAttributes>>,
17819}
17820#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17822pub struct Subaccounts2ResponseMetadata {
17823 #[serde(rename = "pageNum")]
17825 pub page_num: Option<i32>,
17826 #[serde(rename = "pageSize")]
17828 pub page_size: Option<i32>,
17829 pub total: Option<i32>,
17831}
17832#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17834pub struct SubmitModelOrdersRequest {
17835 pub body: TransferRequestBody,
17836}
17837impl SubmitModelOrdersRequest {
17838 pub async fn parse_response(
17840 req: reqwest::Response,
17841 ) -> anyhow::Result<SubmitModelOrdersResponse> {
17842 let status = req.status();
17843 if status == http::StatusCode::OK {
17844 let data =
17845 oas3_gen_support::Diagnostics::<Transfer200Response>::json_with_diagnostics(req)
17846 .await?;
17847 return Ok(SubmitModelOrdersResponse::Ok(data));
17848 }
17849 if status == http::StatusCode::UNAUTHORIZED {
17850 let _ = req.bytes().await?;
17851 return Ok(SubmitModelOrdersResponse::Unauthorized);
17852 }
17853 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17854 let _ = req.bytes().await?;
17855 return Ok(SubmitModelOrdersResponse::InternalServerError);
17856 }
17857 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17858 let _ = req.bytes().await?;
17859 return Ok(SubmitModelOrdersResponse::ServiceUnavailable);
17860 }
17861 let _ = req.bytes().await?;
17862 return Ok(SubmitModelOrdersResponse::Unknown);
17863 }
17864}
17865#[derive(Debug, Clone)]
17867pub enum SubmitModelOrdersResponse {
17868 Ok(Transfer200Response),
17870 Unauthorized,
17872 InternalServerError,
17875 ServiceUnavailable,
17878 Unknown,
17880}
17881#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
17883pub struct SubmitNewOrderRequest {
17884 #[validate(nested)]
17885 pub path: SubmitNewOrderRequestPath,
17886 #[validate(nested)]
17887 pub body: OrdersSubmissionRequest,
17888}
17889impl SubmitNewOrderRequest {
17890 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<SubmitNewOrderResponse> {
17892 let status = req.status();
17893 if status == http::StatusCode::OK {
17894 let data =
17895 oas3_gen_support::Diagnostics::<Order200Response3>::json_with_diagnostics(req)
17896 .await?;
17897 return Ok(SubmitNewOrderResponse::Ok(data));
17898 }
17899 if status == http::StatusCode::UNAUTHORIZED {
17900 let _ = req.bytes().await?;
17901 return Ok(SubmitNewOrderResponse::Unauthorized);
17902 }
17903 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
17904 let _ = req.bytes().await?;
17905 return Ok(SubmitNewOrderResponse::InternalServerError);
17906 }
17907 if status == http::StatusCode::SERVICE_UNAVAILABLE {
17908 let _ = req.bytes().await?;
17909 return Ok(SubmitNewOrderResponse::ServiceUnavailable);
17910 }
17911 let _ = req.bytes().await?;
17912 return Ok(SubmitNewOrderResponse::Unknown);
17913 }
17914}
17915#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
17916pub struct SubmitNewOrderRequestPath {
17917 #[validate(length(min = 1u64))]
17920 pub account_id: String,
17921}
17922#[derive(Debug, Clone)]
17924pub enum SubmitNewOrderResponse {
17925 Ok(Order200Response3),
17927 Unauthorized,
17929 InternalServerError,
17932 ServiceUnavailable,
17935 Unknown,
17937}
17938#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17939pub struct SuccessResponse {
17940 pub success: Option<bool>,
17941}
17942#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17943pub struct SuccessResponse2 {
17944 pub success: Option<bool>,
17946}
17947#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17949pub struct SuccessResponse3 {
17950 pub success: Option<bool>,
17952}
17953#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17954pub struct SuccessfulTickleResponse {
17955 pub collission: Option<bool>,
17957 pub hmds: Option<SuccessfulTickleResponseHmds>,
17959 pub iserver: Option<SuccessfulTickleResponseIserver>,
17960 pub session: Option<String>,
17962 #[serde(rename = "ssoExpires")]
17964 pub sso_expires: Option<i32>,
17965 #[serde(rename = "userId")]
17967 pub user_id: Option<i32>,
17968}
17969#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17971pub struct SuccessfulTickleResponseHmds {
17972 #[serde(rename = "authStatus")]
17974 pub auth_status: Option<Vec<serde_json::Value>>,
17975 pub error: Option<String>,
17977}
17978#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17979pub struct SuccessfulTickleResponseIserver {
17980 #[serde(rename = "authStatus")]
17981 pub auth_status: Option<BrokerageSessionStatus>,
17982}
17983#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17984pub struct SummaryMarketValueResponse {
17985 pub currency: Option<SummaryMarketValueResponseCurrency>,
17987}
17988#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
17990pub struct SummaryMarketValueResponseCurrency {
17991 #[serde(rename = "Cryptocurrency")]
17993 pub cryptocurrency: Option<String>,
17994 #[serde(rename = "Exchange Rate")]
17996 pub exchange_rate: Option<String>,
17997 #[serde(rename = "Govt Bonds")]
17999 pub govt_bonds: Option<String>,
18000 #[serde(rename = "MTD Interest")]
18002 pub mtd_interest: Option<String>,
18003 #[serde(rename = "Notional CFD")]
18005 pub notional_cfd: Option<String>,
18006 pub bonds: Option<String>,
18008 pub cfd: Option<String>,
18010 pub commodity: Option<String>,
18012 pub dividends_receivable: Option<String>,
18014 pub funds: Option<String>,
18016 pub future_options: Option<String>,
18018 pub futures: Option<String>,
18020 pub issuer_option: Option<String>,
18022 pub money_market: Option<String>,
18024 pub mutual_funds: Option<String>,
18026 pub net_liquidation: Option<String>,
18028 pub options: Option<String>,
18030 pub realized_pnl: Option<String>,
18032 pub settled_cash: Option<String>,
18034 pub stock: Option<String>,
18036 pub t_bills: Option<String>,
18038 pub total_cash: Option<String>,
18040 pub unrealized_pnl: Option<String>,
18042 pub warrants: Option<String>,
18044}
18045#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18046pub struct SummaryOfAccountBalancesResponse {
18047 pub commodities: Option<SummaryOfAccountBalancesResponseCommodities>,
18049 pub securities: Option<SummaryOfAccountBalancesResponseSecurities>,
18051 pub total: Option<SummaryOfAccountBalancesResponseTotal>,
18053}
18054#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18056pub struct SummaryOfAccountBalancesResponseCommodities {
18057 #[serde(rename = "MTD Interest")]
18059 pub mtd_interest: Option<String>,
18060 #[serde(rename = "Pndng Dbt Crd Chrgs")]
18062 pub pndng_dbt_crd_chrgs: Option<String>,
18063 pub cash: Option<String>,
18065 pub equity_with_loan: Option<String>,
18068 pub net_liquidation: Option<String>,
18070}
18071#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18073pub struct SummaryOfAccountBalancesResponseSecurities {
18074 #[serde(rename = "MTD Interest")]
18076 pub mtd_interest: Option<String>,
18077 #[serde(rename = "Pndng Dbt Crd Chrgs")]
18079 pub pndng_dbt_crd_chrgs: Option<String>,
18080 #[serde(rename = "Prvs Dy Eqty Wth Ln Vl")]
18082 pub prvs_dy_eqty_wth_ln_vl: Option<String>,
18083 pub cash: Option<String>,
18085 pub equity_with_loan: Option<String>,
18088 pub net_liquidation: Option<String>,
18090 pub sec_gross_pos_val: Option<String>,
18092}
18093#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18095pub struct SummaryOfAccountBalancesResponseTotal {
18096 #[serde(rename = "MTD Interest")]
18098 pub mtd_interest: Option<String>,
18099 #[serde(rename = "Nt Lqdtn Uncrtnty")]
18101 pub nt_lqdtn_uncrtnty: Option<String>,
18102 #[serde(rename = "Pndng Dbt Crd Chrgs")]
18104 pub pndng_dbt_crd_chrgs: Option<String>,
18105 #[serde(rename = "Prvs Dy Eqty Wth Ln Vl")]
18107 pub prvs_dy_eqty_wth_ln_vl: Option<String>,
18108 pub cash: Option<String>,
18110 pub equity_with_loan: Option<String>,
18113 pub net_liquidation: Option<String>,
18115 pub sec_gross_pos_val: Option<String>,
18117}
18118#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18119pub struct SummaryOfAccountMarginResponse {
18120 #[serde(rename = "Crypto at Paxos")]
18121 pub crypto_at_paxos: Option<SummaryOfAccountMarginResponseCryptoAtPaxos>,
18122 pub commodities: Option<SummaryOfAccountMarginResponseCommodities>,
18123 pub securities: Option<SummaryOfAccountMarginResponseSecurities>,
18124 pub total: Option<SummaryOfAccountMarginResponseCryptoAtPaxos>,
18125}
18126#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18127pub struct SummaryOfAccountMarginResponseCommodities {
18128 #[serde(rename = "Prdctd Pst-xpry Mrgn @ Opn")]
18130 pub prdctd_pst_xpry_mrgn_opn: Option<String>,
18131 #[serde(rename = "Prjctd Lk Ahd Mntnnc Mrgn")]
18135 pub prjctd_lk_ahd_mntnnc_mrgn: Option<String>,
18136 #[serde(rename = "Prjctd Ovrnght Mntnnc Mrgn")]
18140 pub prjctd_ovrnght_mntnnc_mrgn: Option<String>,
18141 #[serde(rename = "RegT Margin")]
18143 pub reg_t_margin: Option<String>,
18144 pub current_initial: Option<String>,
18146 pub current_maint: Option<String>,
18148 pub projected_liquidity_inital_margin: Option<String>,
18150 pub projected_overnight_initial_margin: Option<String>,
18154}
18155#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18156pub struct SummaryOfAccountMarginResponseCryptoAtPaxos {
18157 #[serde(rename = "Prdctd Pst-xpry Mrgn @ Opn")]
18159 pub prdctd_pst_xpry_mrgn_opn: Option<String>,
18160 #[serde(rename = "Prjctd Lk Ahd Mntnnc Mrgn")]
18164 pub prjctd_lk_ahd_mntnnc_mrgn: Option<String>,
18165 #[serde(rename = "Prjctd Ovrnght Mntnnc Mrgn")]
18169 pub prjctd_ovrnght_mntnnc_mrgn: Option<String>,
18170 pub current_initial: Option<String>,
18172 pub current_maint: Option<String>,
18174 pub projected_liquidity_inital_margin: Option<String>,
18176 pub projected_overnight_initial_margin: Option<String>,
18180}
18181#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18182pub struct SummaryOfAccountMarginResponseSecurities {
18183 #[serde(rename = "Prdctd Pst-xpry Mrgn @ Opn")]
18185 pub prdctd_pst_xpry_mrgn_opn: Option<String>,
18186 #[serde(rename = "Prjctd Lk Ahd Mntnnc Mrgn")]
18190 pub prjctd_lk_ahd_mntnnc_mrgn: Option<String>,
18191 #[serde(rename = "Prjctd Ovrnght Mntnnc Mrgn")]
18195 pub prjctd_ovrnght_mntnnc_mrgn: Option<String>,
18196 pub current_initial: Option<String>,
18198 pub current_maint: Option<String>,
18200 pub projected_liquidity_inital_margin: Option<String>,
18202 pub projected_overnight_initial_margin: Option<String>,
18206}
18207#[serde_with::skip_serializing_none]
18208#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18209pub struct SummaryRequestBody {
18210 pub model: Option<String>,
18213 #[serde(rename = "reqID")]
18216 pub req_id: Option<i32>,
18217}
18218#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
18220pub struct SuppressOrderRepliesRequest {
18221 pub body: MessageIdRequestBody,
18222}
18223impl SuppressOrderRepliesRequest {
18224 pub async fn parse_response(
18226 req: reqwest::Response,
18227 ) -> anyhow::Result<SuppressOrderRepliesResponse> {
18228 let status = req.status();
18229 if status == http::StatusCode::OK {
18230 let data = oas3_gen_support::Diagnostics::<StatusResponse2>::json_with_diagnostics(req)
18231 .await?;
18232 return Ok(SuppressOrderRepliesResponse::Ok(data));
18233 }
18234 if status == http::StatusCode::UNAUTHORIZED {
18235 let _ = req.bytes().await?;
18236 return Ok(SuppressOrderRepliesResponse::Unauthorized);
18237 }
18238 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
18239 let _ = req.bytes().await?;
18240 return Ok(SuppressOrderRepliesResponse::InternalServerError);
18241 }
18242 if status == http::StatusCode::SERVICE_UNAVAILABLE {
18243 let _ = req.bytes().await?;
18244 return Ok(SuppressOrderRepliesResponse::ServiceUnavailable);
18245 }
18246 let _ = req.bytes().await?;
18247 return Ok(SuppressOrderRepliesResponse::Unknown);
18248 }
18249}
18250#[derive(Debug, Clone)]
18252pub enum SuppressOrderRepliesResponse {
18253 Ok(StatusResponse2),
18255 Unauthorized,
18257 InternalServerError,
18260 ServiceUnavailable,
18263 Unknown,
18265}
18266#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18267pub struct SynchronousInstructionResponse {
18268 #[serde(rename = "instructionResult")]
18269 pub instruction_result: Option<InstructionResult>,
18270 #[serde(rename = "instructionSetId")]
18272 pub instruction_set_id: f64,
18273 pub status: f64,
18275}
18276#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18277#[serde(untagged)]
18278pub enum Task200Response {
18279 #[default]
18280 Registration(RegistrationTasksResponse),
18281 Pending(PendingTasksResponse),
18282}
18283impl Task200Response {
18284 pub fn registration() -> Self {
18285 Self::Registration(RegistrationTasksResponse::default())
18286 }
18287 pub fn pending() -> Self {
18288 Self::Pending(PendingTasksResponse::default())
18289 }
18290}
18291pub type Task200Response2 = Vec<TaskActionResponse>;
18292#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18293pub struct TaskActionResponse {
18294 #[serde(rename = "accountId")]
18295 pub account_id: Option<String>,
18296 #[serde(rename = "formNumber")]
18297 pub form_number: Option<i32>,
18298 pub message: Option<String>,
18299 pub status: Option<String>,
18300}
18301#[serde_with::skip_serializing_none]
18302#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18303#[serde(default)]
18304pub struct TaxFormRequest {
18305 #[serde(rename = "accountId")]
18308 #[validate(length(min = 1u64))]
18309 pub account_id: String,
18310 #[validate(length(min = 1u64))]
18313 pub format: String,
18314 #[default(Some(false))]
18316 pub gzip: Option<bool>,
18317 #[serde(rename = "type")]
18320 #[validate(length(min = 1u64))]
18321 pub r#type: String,
18322 pub year: i32,
18325}
18326#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18327pub struct TaxFormResponse {
18328 pub data: Option<ResponseData>,
18329}
18330#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18331pub struct TaxFormType {
18332 pub formats: Option<Vec<String>>,
18334 #[serde(rename = "isForm")]
18335 pub is_form: Option<bool>,
18336 #[serde(rename = "taxFormName")]
18338 pub tax_form_name: Option<String>,
18339}
18340#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18341#[serde(untagged)]
18342pub enum TickleResponse {
18343 #[default]
18344 Successful(SuccessfulTickleResponse),
18345 Failed(FailedTickleResponse),
18346}
18347impl TickleResponse {
18348 pub fn successful() -> Self {
18349 Self::Successful(SuccessfulTickleResponse::default())
18350 }
18351 pub fn failed(error: Option<String>) -> Self {
18352 Self::Failed(FailedTickleResponse {
18353 error,
18354 ..Default::default()
18355 })
18356 }
18357}
18358#[serde_with::skip_serializing_none]
18359#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18360pub struct TokenRequest {
18361 #[serde(rename = "clientAssertion")]
18362 pub client_assertion: Option<String>,
18363 #[serde(rename = "clientAssertionType")]
18364 pub client_assertion_type: Option<String>,
18365 #[serde(rename = "clientAuthenticationMethod")]
18366 pub client_authentication_method: Option<TokenRequestClientAuthenticationMethod>,
18367 #[serde(rename = "clientId")]
18368 pub client_id: Option<String>,
18369 #[serde(rename = "clientSecret")]
18370 pub client_secret: Option<String>,
18371}
18372#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18373pub enum TokenRequestClientAuthenticationMethod {
18374 #[serde(rename = "private_key_jwt")]
18375 #[default]
18376 PrivateKeyJwt,
18377 #[serde(rename = "client_secret_basic")]
18378 ClientSecretBasic,
18379 #[serde(rename = "client_secret_post")]
18380 ClientSecretPost,
18381}
18382impl core::fmt::Display for TokenRequestClientAuthenticationMethod {
18383 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18384 match self {
18385 Self::PrivateKeyJwt => write!(f, "private_key_jwt"),
18386 Self::ClientSecretBasic => write!(f, "client_secret_basic"),
18387 Self::ClientSecretPost => write!(f, "client_secret_post"),
18388 }
18389 }
18390}
18391#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18392pub struct TokenResponse {
18393 pub access_token: Option<String>,
18395 pub expires_in: Option<i64>,
18397 pub id_token: Option<String>,
18399 pub refresh_token: Option<String>,
18401 pub scope: Option<String>,
18403 pub token_type: Option<String>,
18405}
18406#[serde_with::skip_serializing_none]
18407#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18408pub struct TradeConfirmationRequest {
18409 #[serde(rename = "accountId")]
18412 #[validate(length(min = 1u64))]
18413 pub account_id: String,
18414 #[serde(rename = "endDate")]
18417 #[validate(length(min = 1u64))]
18418 pub end_date: String,
18419 #[serde(rename = "mimeType")]
18422 pub mime_type: Option<String>,
18423 #[serde(rename = "startDate")]
18426 #[validate(length(min = 1u64))]
18427 pub start_date: String,
18428}
18429#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18430pub struct TradeConfirmationResponse {
18431 pub data: Option<ResponseData>,
18432}
18433pub type TradesResponse = Vec<TradesResponseTradesResponse>;
18435#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18437pub struct TradesResponseTradesResponse {
18438 pub account: Option<String>,
18440 #[serde(rename = "accountCode")]
18442 pub account_code: Option<String>,
18443 pub account_allocation_name: Option<String>,
18445 pub clearing_id: Option<String>,
18447 pub clearing_name: Option<String>,
18449 pub commission: Option<String>,
18451 pub company_name: Option<String>,
18453 pub conid: Option<String>,
18455 #[serde(rename = "conidEx")]
18457 pub conid_ex: Option<String>,
18458 pub contract_description_1: Option<String>,
18460 pub exchange: Option<String>,
18462 pub execution_id: Option<String>,
18464 pub is_event_trading: Option<AlertActivationRequestAlertActive>,
18466 pub liquidation_trade: Option<AlertActivationRequestAlertActive>,
18468 pub listing_exchange: Option<String>,
18470 pub net_amount: Option<f64>,
18472 pub order_description: Option<String>,
18474 pub order_id: Option<f64>,
18476 pub order_ref: Option<String>,
18478 pub price: Option<String>,
18480 pub sec_type: Option<OrderStatusSecType>,
18482 pub side: Option<TradesResponseTradesResponseSide>,
18484 pub size: Option<f64>,
18486 pub submitter: Option<String>,
18488 pub supports_tax_opt: Option<AlertActivationRequestAlertActive>,
18490 pub symbol: Option<String>,
18492 pub trade_time: Option<String>,
18494 pub trade_time_r: Option<i64>,
18496}
18497#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
18499pub enum TradesResponseTradesResponseSide {
18500 #[default]
18501 B,
18502 S,
18503}
18504impl core::fmt::Display for TradesResponseTradesResponseSide {
18505 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18506 match self {
18507 Self::B => write!(f, "B"),
18508 Self::S => write!(f, "S"),
18509 }
18510 }
18511}
18512#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18513#[serde(untagged)]
18514pub enum TradingInstrument {
18515 #[default]
18516 Variant0(TradingInstrumentVariant0),
18517 TradingInstrumentDescription(TradingInstrumentTradingInstrumentDescription),
18518}
18519impl TradingInstrument {
18520 pub fn variant0(conid: f64) -> Self {
18521 Self::Variant0(TradingInstrumentVariant0 {
18522 conid,
18523 ..Default::default()
18524 })
18525 }
18526 pub fn description(
18527 trading_instrument_description: TradingInstrumentTradingInstrumentDescriptionDescription,
18528 ) -> Self {
18529 Self::TradingInstrumentDescription(TradingInstrumentTradingInstrumentDescription {
18530 trading_instrument_description,
18531 ..Default::default()
18532 })
18533 }
18534}
18535#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18536pub struct TradingInstrumentTradingInstrumentDescription {
18537 #[serde(rename = "tradingInstrumentDescription")]
18538 #[validate(nested)]
18539 pub trading_instrument_description: TradingInstrumentTradingInstrumentDescriptionDescription,
18540}
18541#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18542pub struct TradingInstrumentTradingInstrumentDescriptionDescription {
18543 #[serde(rename = "assetType")]
18545 pub asset_type: TradingInstrumentTradingInstrumentDescriptionDescriptionAssetType,
18546 #[serde(rename = "securityId")]
18548 #[validate(length(min = 1u64))]
18549 pub security_id: String,
18550 #[serde(rename = "securityIdType")]
18552 pub security_id_type: TradingInstrumentTradingInstrumentDescriptionDescriptionSecurityIdType,
18553}
18554#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18555pub enum TradingInstrumentTradingInstrumentDescriptionDescriptionAssetType {
18556 #[serde(rename = "STK")]
18557 #[default]
18558 Stk,
18559 #[serde(rename = "CASH")]
18560 Cash,
18561 #[serde(rename = "UNKNOWN")]
18562 Unknown,
18563 #[serde(rename = "BILL")]
18564 Bill,
18565 #[serde(rename = "BOND")]
18566 Bond,
18567 #[serde(rename = "FUND")]
18568 Fund,
18569 #[serde(rename = "OPT")]
18570 Opt,
18571 #[serde(rename = "WAR")]
18572 War,
18573}
18574impl core::fmt::Display for TradingInstrumentTradingInstrumentDescriptionDescriptionAssetType {
18575 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18576 match self {
18577 Self::Stk => write!(f, "STK"),
18578 Self::Cash => write!(f, "CASH"),
18579 Self::Unknown => write!(f, "UNKNOWN"),
18580 Self::Bill => write!(f, "BILL"),
18581 Self::Bond => write!(f, "BOND"),
18582 Self::Fund => write!(f, "FUND"),
18583 Self::Opt => write!(f, "OPT"),
18584 Self::War => write!(f, "WAR"),
18585 }
18586 }
18587}
18588#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18589pub enum TradingInstrumentTradingInstrumentDescriptionDescriptionSecurityIdType {
18590 #[serde(rename = "CUSIP")]
18591 #[default]
18592 Cusip,
18593 #[serde(rename = "ISIN")]
18594 Isin,
18595 #[serde(rename = "CASH")]
18596 Cash,
18597}
18598impl core::fmt::Display for TradingInstrumentTradingInstrumentDescriptionDescriptionSecurityIdType {
18599 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18600 match self {
18601 Self::Cusip => write!(f, "CUSIP"),
18602 Self::Isin => write!(f, "ISIN"),
18603 Self::Cash => write!(f, "CASH"),
18604 }
18605 }
18606}
18607#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18608pub struct TradingInstrumentVariant0 {
18609 pub conid: f64,
18611}
18612pub type TradingSchedule = Vec<TradingScheduleTradingSchedule>;
18614#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18615pub struct TradingScheduleTradingSchedule {
18616 pub description: Option<String>,
18618 pub exchange: Option<String>,
18620 pub id: Option<String>,
18622 pub schedules: Option<Vec<TradingScheduleTradingScheduleSchedule>>,
18624 pub timezone: Option<String>,
18626 #[serde(rename = "tradeVenueId")]
18628 pub trade_venue_id: Option<String>,
18629}
18630#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18631pub struct TradingScheduleTradingScheduleSchedule {
18632 #[serde(rename = "clearingCycleEndTime")]
18634 pub clearing_cycle_end_time: Option<String>,
18635 pub sessions: Option<Vec<TradingScheduleTradingScheduleScheduleSession>>,
18637 #[serde(rename = "tradingScheduleDate")]
18639 pub trading_schedule_date: Option<String>,
18640 #[serde(rename = "tradingTimes")]
18642 pub trading_times: Option<Vec<TradingScheduleTradingScheduleScheduleTime>>,
18643}
18644#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18645pub struct TradingScheduleTradingScheduleScheduleSession {
18646 #[serde(rename = "closingTime")]
18648 pub closing_time: Option<String>,
18649 #[serde(rename = "openingTime")]
18651 pub opening_time: Option<String>,
18652 pub prop: Option<String>,
18655}
18656#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18657pub struct TradingScheduleTradingScheduleScheduleTime {
18658 #[serde(rename = "cancelDayOrders")]
18661 pub cancel_day_orders: Option<String>,
18662 #[serde(rename = "closingTime")]
18664 pub closing_time: Option<String>,
18665 #[serde(rename = "openingTime")]
18667 pub opening_time: Option<String>,
18668 pub prop: Option<String>,
18670}
18671#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18672pub struct TraditionalBankInstructionVerification {
18673 #[serde(rename = "accountId")]
18675 #[validate(length(min = 1u64, max = 32u64))]
18676 pub account_id: String,
18677 #[serde(rename = "bankInstructionCode")]
18679 pub bank_instruction_code: TraditionalBankInstructionVerificationBankInstructionCode,
18680 #[serde(rename = "bankInstructionName")]
18682 #[validate(length(min = 1u64, max = 100u64))]
18683 pub bank_instruction_name: String,
18684 #[serde(rename = "clientInstructionId")]
18686 pub client_instruction_id: f64,
18687 #[serde(rename = "creditAmount1")]
18689 pub credit_amount1: f64,
18690 #[serde(rename = "creditAmount2")]
18692 pub credit_amount2: f64,
18693 #[serde(rename = "pendingInstructionId")]
18695 pub pending_instruction_id: f64,
18696}
18697#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18698pub enum TraditionalBankInstructionVerificationBankInstructionCode {
18699 #[serde(rename = "USACH")]
18700 #[default]
18701 Usach,
18702 #[serde(rename = "CAACH")]
18703 Caach,
18704 #[serde(rename = "ACHUS")]
18705 Achus,
18706 #[serde(rename = "WIRE")]
18707 Wire,
18708}
18709impl core::fmt::Display for TraditionalBankInstructionVerificationBankInstructionCode {
18710 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18711 match self {
18712 Self::Usach => write!(f, "USACH"),
18713 Self::Caach => write!(f, "CAACH"),
18714 Self::Achus => write!(f, "ACHUS"),
18715 Self::Wire => write!(f, "WIRE"),
18716 }
18717 }
18718}
18719#[serde_with::skip_serializing_none]
18720#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18721#[serde(default)]
18722pub struct TransactionRequestBody {
18723 #[serde(rename = "acctIds")]
18724 pub acct_ids: Option<Vec<String>>,
18725 pub conids: Option<Vec<i32>>,
18726 #[default(Some("USD".to_string()))]
18728 pub currency: Option<String>,
18729 #[default(Some(90i32))]
18731 pub days: Option<i32>,
18732}
18733#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18734pub struct TransactionsResponse {
18735 pub currency: Option<String>,
18737 pub from: Option<i32>,
18739 pub id: Option<String>,
18741 #[serde(rename = "includesRealTime")]
18743 pub includes_real_time: Option<bool>,
18744 pub nd: Option<i32>,
18746 pub rc: Option<i32>,
18748 pub rpnl: Option<TransactionsResponseRpnl>,
18750 pub to: Option<i32>,
18752 pub transactions: Option<Vec<TransactionsResponseTransaction>>,
18754}
18755#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18757pub struct TransactionsResponseRpnl {
18758 pub amt: Option<String>,
18760 pub data: Option<Vec<serde_json::Value>>,
18762 pub items: Option<TransactionsResponseRpnlItems>,
18763}
18764#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18765pub struct TransactionsResponseRpnlItems {
18766 pub acctid: Option<String>,
18768 pub amt: Option<String>,
18770 pub conid: Option<String>,
18772 pub cur: Option<String>,
18774 pub date: Option<String>,
18776 #[serde(rename = "fxRate")]
18778 pub fx_rate: Option<i32>,
18779 pub side: Option<TransactionsResponseRpnlItemsSide>,
18781}
18782#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
18784pub enum TransactionsResponseRpnlItemsSide {
18785 #[default]
18786 L,
18787 G,
18788}
18789impl core::fmt::Display for TransactionsResponseRpnlItemsSide {
18790 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18791 match self {
18792 Self::L => write!(f, "L"),
18793 Self::G => write!(f, "G"),
18794 }
18795 }
18796}
18797#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18798pub struct TransactionsResponseTransaction {
18799 pub acctid: Option<String>,
18801 pub amt: Option<f64>,
18803 pub conid: Option<i32>,
18805 pub cur: Option<String>,
18807 pub date: Option<String>,
18809 pub desc: Option<String>,
18811 #[serde(rename = "fxRate")]
18813 pub fx_rate: Option<i32>,
18814 pub pr: Option<f64>,
18816 pub qty: Option<i32>,
18818 #[serde(rename = "type")]
18820 pub r#type: Option<String>,
18821}
18822#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18823pub struct Transfer200Response {
18824 #[serde(rename = "reqID")]
18827 pub req_id: Option<i32>,
18828 pub success: Option<bool>,
18830}
18831#[serde_with::skip_serializing_none]
18832#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18833pub struct TransferRequestBody {
18834 #[serde(rename = "fpOrderId")]
18836 pub fp_order_id: Option<i32>,
18837 #[serde(rename = "reqID")]
18839 pub req_id: Option<i32>,
18840}
18841#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18842pub struct TransferRequestBody2 {
18843 pub instruction: TransferRequestBody2Instruction,
18844 #[serde(rename = "instructionType")]
18845 pub instruction_type: TransferRequestBody2InstructionType,
18846}
18847#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18848#[serde(untagged)]
18849pub enum TransferRequestBody2Instruction {
18850 #[default]
18851 FopInstruction(FopInstruction),
18852 DwacInstruction(DwacInstruction),
18853 ComplexAssetTransferInstruction(ComplexAssetTransferInstruction),
18854 ExternalPositionTransfer(ExternalPositionTransfer),
18855}
18856#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18857pub enum TransferRequestBody2InstructionType {
18858 #[serde(rename = "DWAC")]
18859 #[default]
18860 Dwac,
18861 #[serde(rename = "FOP")]
18862 Fop,
18863 #[serde(rename = "COMPLEX_ASSET_TRANSFER")]
18864 ComplexAssetTransfer,
18865 #[serde(rename = "EXTERNAL_POSITION_TRANSFER")]
18866 ExternalPositionTransfer,
18867}
18868impl core::fmt::Display for TransferRequestBody2InstructionType {
18869 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18870 match self {
18871 Self::Dwac => write!(f, "DWAC"),
18872 Self::Fop => write!(f, "FOP"),
18873 Self::ComplexAssetTransfer => write!(f, "COMPLEX_ASSET_TRANSFER"),
18874 Self::ExternalPositionTransfer => write!(f, "EXTERNAL_POSITION_TRANSFER"),
18875 }
18876 }
18877}
18878#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18879pub struct TransferRequestBody3 {
18880 pub instruction: TransferRequestBody3Instruction,
18881 #[serde(rename = "instructionType")]
18882 pub instruction_type: TransferRequestBody3InstructionType,
18883}
18884#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
18885#[serde(untagged)]
18886pub enum TransferRequestBody3Instruction {
18887 #[default]
18888 Deposit(DepositFundsInstruction),
18889 Withdraw(WithdrawFundsInstruction),
18890}
18891#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
18892pub enum TransferRequestBody3InstructionType {
18893 #[serde(rename = "DEPOSIT")]
18894 #[default]
18895 Deposit,
18896 #[serde(rename = "WITHDRAWAL")]
18897 Withdrawal,
18898}
18899impl core::fmt::Display for TransferRequestBody3InstructionType {
18900 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18901 match self {
18902 Self::Deposit => write!(f, "DEPOSIT"),
18903 Self::Withdrawal => write!(f, "WITHDRAWAL"),
18904 }
18905 }
18906}
18907#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18908#[serde(default)]
18909pub struct TransferRequestBody4 {
18910 #[validate(nested)]
18911 pub instruction: InternalPositionTransferInstruction,
18912 #[serde(rename = "instructionType")]
18913 #[default("INTERNAL_POSITION_TRANSFER".to_string())]
18914 pub instruction_type: String,
18915}
18916#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
18917#[serde(default)]
18918pub struct TransferRequestBody5 {
18919 #[validate(nested)]
18920 pub instruction: InternalCashTransferInstruction,
18921 #[serde(rename = "instructionType")]
18922 #[default("INTERNAL_CASH_TRANSFER".to_string())]
18923 pub instruction_type: String,
18924}
18925#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18927pub struct TrsrvSecDefResponse {
18928 pub secdef: Option<Vec<TrsrvSecDefResponseSecdef>>,
18929}
18930#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
18931pub struct TrsrvSecDefResponseSecdef {
18932 #[serde(rename = "allExchanges")]
18934 pub all_exchanges: Option<String>,
18935 #[serde(rename = "assetClass")]
18937 pub asset_class: Option<String>,
18938 #[serde(rename = "chineseName")]
18940 pub chinese_name: Option<String>,
18941 pub conid: Option<i32>,
18943 #[serde(rename = "countryCode")]
18945 pub country_code: Option<String>,
18946 pub currency: Option<String>,
18948 #[serde(rename = "displayRule")]
18950 pub display_rule: Option<Vec<TrsrvSecDefResponseSecdefDisplayRule>>,
18951 pub expiry: Option<String>,
18953 #[serde(rename = "fullName")]
18955 pub full_name: Option<String>,
18956 pub group: Option<String>,
18958 #[serde(rename = "hasOptions")]
18960 pub has_options: Option<bool>,
18961 #[serde(rename = "incrementRules")]
18963 pub increment_rules: Option<Vec<TrsrvSecDefResponseSecdefIncrementRule>>,
18964 #[serde(rename = "isEventContract")]
18966 pub is_event_contract: Option<bool>,
18967 #[serde(rename = "isUS")]
18969 pub is_us: Option<bool>,
18970 #[serde(rename = "lastTradingDay")]
18972 pub last_trading_day: Option<String>,
18973 #[serde(rename = "listingExchange")]
18975 pub listing_exchange: Option<String>,
18976 pub multiplier: Option<f64>,
18978 pub name: Option<String>,
18980 #[serde(rename = "pageSize")]
18982 pub page_size: Option<i32>,
18983 #[serde(rename = "putOrCall")]
18985 pub put_or_call: Option<String>,
18986 pub sector: Option<String>,
18988 #[serde(rename = "sectorGroup")]
18990 pub sector_group: Option<String>,
18991 pub strike: Option<String>,
18993 pub ticker: Option<String>,
18995 pub time: Option<i32>,
18997 #[serde(rename = "type")]
18999 pub r#type: Option<String>,
19000 #[serde(rename = "undConid")]
19002 pub und_conid: Option<i32>,
19003}
19004#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19005pub struct TrsrvSecDefResponseSecdefDisplayRule {
19006 #[serde(rename = "displayRuleStep")]
19007 pub display_rule_step: Option<Vec<TrsrvSecDefResponseSecdefDisplayRuleDisplayRuleStep>>,
19008 pub magnification: Option<i32>,
19010}
19011#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19012pub struct TrsrvSecDefResponseSecdefDisplayRuleDisplayRuleStep {
19013 #[serde(rename = "decimalDigits")]
19015 pub decimal_digits: Option<i32>,
19016 #[serde(rename = "lowerEdge")]
19018 pub lower_edge: Option<f64>,
19019 #[serde(rename = "wholeDigits")]
19021 pub whole_digits: Option<i32>,
19022}
19023#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19024pub struct TrsrvSecDefResponseSecdefIncrementRule {
19025 pub increment: Option<f64>,
19028 #[serde(rename = "lowerEdge")]
19031 pub lower_edge: Option<f64>,
19032}
19033#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
19058pub enum Typecodes {
19059 #[serde(rename = "BA")]
19060 #[default]
19061 Ba,
19062 #[serde(rename = "CA")]
19063 Ca,
19064 #[serde(rename = "DA")]
19065 Da,
19066 #[serde(rename = "EA")]
19067 Ea,
19068 #[serde(rename = "MF")]
19069 Mf,
19070 #[serde(rename = "OE")]
19071 Oe,
19072 #[serde(rename = "PR")]
19073 Pr,
19074 #[serde(rename = "SE")]
19075 Se,
19076 #[serde(rename = "SG")]
19077 Sg,
19078 #[serde(rename = "SM")]
19079 Sm,
19080 T2,
19081 #[serde(rename = "TO")]
19082 To,
19083 #[serde(rename = "UA")]
19084 Ua,
19085 M8,
19086 #[serde(rename = "PS")]
19087 Ps,
19088 #[serde(rename = "DL")]
19089 Dl,
19090 #[serde(rename = "PT")]
19091 Pt,
19092 #[serde(rename = "CB")]
19093 Cb,
19094 #[serde(rename = "MS")]
19095 Ms,
19096 #[serde(rename = "TD")]
19097 Td,
19098 #[serde(rename = "ST")]
19099 St,
19100 #[serde(rename = "TI")]
19101 Ti,
19102 #[serde(rename = "CT")]
19103 Ct,
19104}
19105impl core::fmt::Display for Typecodes {
19106 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19107 match self {
19108 Self::Ba => write!(f, "BA"),
19109 Self::Ca => write!(f, "CA"),
19110 Self::Da => write!(f, "DA"),
19111 Self::Ea => write!(f, "EA"),
19112 Self::Mf => write!(f, "MF"),
19113 Self::Oe => write!(f, "OE"),
19114 Self::Pr => write!(f, "PR"),
19115 Self::Se => write!(f, "SE"),
19116 Self::Sg => write!(f, "SG"),
19117 Self::Sm => write!(f, "SM"),
19118 Self::T2 => write!(f, "T2"),
19119 Self::To => write!(f, "TO"),
19120 Self::Ua => write!(f, "UA"),
19121 Self::M8 => write!(f, "M8"),
19122 Self::Ps => write!(f, "PS"),
19123 Self::Dl => write!(f, "DL"),
19124 Self::Pt => write!(f, "PT"),
19125 Self::Cb => write!(f, "CB"),
19126 Self::Ms => write!(f, "MS"),
19127 Self::Td => write!(f, "TD"),
19128 Self::St => write!(f, "ST"),
19129 Self::Ti => write!(f, "TI"),
19130 Self::Ct => write!(f, "CT"),
19131 }
19132 }
19133}
19134#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19136pub struct UnsubscribedResponse {
19137 pub unsubscribed: Option<bool>,
19139}
19140#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19141pub struct User {
19142 pub entity: Option<UserEntity>,
19144 #[serde(rename = "hasRightCodeInd")]
19146 pub has_right_code_ind: Option<bool>,
19147 #[serde(rename = "roleId")]
19149 pub role_id: Option<String>,
19150 #[serde(rename = "userName")]
19152 pub user_name: Option<String>,
19153}
19154#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19155pub struct UserAccountsResponse {
19156 pub accounts: Option<Vec<String>>,
19158 #[serde(rename = "acctProps")]
19160 pub acct_props: Option<UserAccountsResponseAcctProps>,
19161 pub aliases: Option<UserAccountsResponseAliases>,
19162 #[serde(rename = "allowFeatures")]
19163 pub allow_features: Option<UserAccountsResponseAllowFeatures>,
19164 #[serde(rename = "chartPeriods")]
19165 pub chart_periods: Option<UserAccountsResponseChartPeriods>,
19166 pub groups: Option<Vec<String>>,
19167 #[serde(rename = "isFt")]
19168 pub is_ft: Option<bool>,
19169 #[serde(rename = "isPaper")]
19170 pub is_paper: Option<bool>,
19171 pub profiles: Option<Vec<String>>,
19172 #[serde(rename = "selectedAccount")]
19173 pub selected_account: Option<String>,
19174 #[serde(rename = "serverInfo")]
19175 pub server_info: Option<UserAccountsResponseServerInfo>,
19176 #[serde(rename = "sessionId")]
19177 pub session_id: Option<String>,
19178}
19179#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19181pub struct UserAccountsResponseAcctProps {
19182 #[serde(rename = "U1234567")]
19183 pub u1234567: Option<UserAccountsResponseAcctPropsU1234567>,
19184}
19185#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19186pub struct UserAccountsResponseAcctPropsU1234567 {
19187 #[serde(rename = "allowCustomerTime")]
19188 pub allow_customer_time: Option<bool>,
19189 #[serde(rename = "autoFx")]
19190 pub auto_fx: Option<bool>,
19191 #[serde(rename = "hasChildAccounts")]
19192 pub has_child_accounts: Option<bool>,
19193 #[serde(rename = "isProp")]
19194 pub is_prop: Option<bool>,
19195 #[serde(rename = "liteUnderPro")]
19196 pub lite_under_pro: Option<bool>,
19197 #[serde(rename = "noFXConv")]
19198 pub no_fxconv: Option<bool>,
19199 #[serde(rename = "supportsCashQty")]
19200 pub supports_cash_qty: Option<bool>,
19201 #[serde(rename = "supportsFractions")]
19202 pub supports_fractions: Option<bool>,
19203}
19204#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19205pub struct UserAccountsResponseAliases {
19206 #[serde(rename = "U1234567")]
19207 pub u1234567: Option<String>,
19208}
19209#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19210pub struct UserAccountsResponseAllowFeatures {
19211 #[serde(rename = "allowCrypto")]
19212 pub allow_crypto: Option<bool>,
19213 #[serde(rename = "allowDynAccount")]
19214 pub allow_dyn_account: Option<bool>,
19215 #[serde(rename = "allowEventContract")]
19216 pub allow_event_contract: Option<bool>,
19217 #[serde(rename = "allowEventTrading")]
19218 pub allow_event_trading: Option<bool>,
19219 #[serde(rename = "allowFXConv")]
19220 pub allow_fxconv: Option<bool>,
19221 #[serde(rename = "allowFinancialLens")]
19222 pub allow_financial_lens: Option<bool>,
19223 #[serde(rename = "allowMTA")]
19224 pub allow_mta: Option<bool>,
19225 #[serde(rename = "allowTypeAhead")]
19226 pub allow_type_ahead: Option<bool>,
19227 #[serde(rename = "allowedAssetTypes")]
19228 pub allowed_asset_types: Option<String>,
19229 #[serde(rename = "debugPnl")]
19230 pub debug_pnl: Option<bool>,
19231 #[serde(rename = "liteUser")]
19232 pub lite_user: Option<bool>,
19233 pub research: Option<bool>,
19234 #[serde(rename = "restrictTradeSubscription")]
19235 pub restrict_trade_subscription: Option<bool>,
19236 #[serde(rename = "showEUCostReport")]
19237 pub show_eucost_report: Option<bool>,
19238 #[serde(rename = "showGFIS")]
19239 pub show_gfis: Option<bool>,
19240 #[serde(rename = "showImpactDashboard")]
19241 pub show_impact_dashboard: Option<bool>,
19242 #[serde(rename = "showTaxOpt")]
19243 pub show_tax_opt: Option<bool>,
19244 #[serde(rename = "showUkUserLabels")]
19245 pub show_uk_user_labels: Option<bool>,
19246 #[serde(rename = "showWebNews")]
19247 pub show_web_news: Option<bool>,
19248 #[serde(rename = "sideBySide")]
19249 pub side_by_side: Option<bool>,
19250 #[serde(rename = "snapshotRefreshTimeout")]
19252 pub snapshot_refresh_timeout: Option<i64>,
19253}
19254#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19255pub struct UserAccountsResponseChartPeriods {
19256 #[serde(rename = "BOND")]
19257 pub bond: Option<Vec<String>>,
19258 #[serde(rename = "CASH")]
19259 pub cash: Option<Vec<String>>,
19260 #[serde(rename = "CFD")]
19261 pub cfd: Option<Vec<String>>,
19262 #[serde(rename = "CMDTY")]
19263 pub cmdty: Option<Vec<String>>,
19264 #[serde(rename = "CRYPTO")]
19265 pub crypto: Option<Vec<String>>,
19266 #[serde(rename = "FOP")]
19267 pub fop: Option<Vec<String>>,
19268 #[serde(rename = "FUND")]
19269 pub fund: Option<Vec<String>>,
19270 #[serde(rename = "FUT")]
19271 pub fut: Option<Vec<String>>,
19272 #[serde(rename = "IND")]
19273 pub ind: Option<Vec<String>>,
19274 #[serde(rename = "IOPT")]
19275 pub iopt: Option<Vec<String>>,
19276 #[serde(rename = "OPT")]
19277 pub opt: Option<Vec<String>>,
19278 #[serde(rename = "PHYSS")]
19279 pub physs: Option<Vec<String>>,
19280 #[serde(rename = "STK")]
19281 pub stk: Option<Vec<String>>,
19282 #[serde(rename = "WAR")]
19283 pub war: Option<Vec<String>>,
19284}
19285#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19286pub struct UserAccountsResponseServerInfo {
19287 #[serde(rename = "serverName")]
19288 pub server_name: Option<String>,
19289 #[serde(rename = "serverVersion")]
19290 pub server_version: Option<String>,
19291}
19292#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19294pub struct UserEntity {
19295 #[serde(rename = "entityName")]
19297 pub entity_name: Option<String>,
19298 #[serde(rename = "entityType")]
19300 pub entity_type: Option<UserEntityEntityType>,
19301 #[serde(rename = "firstName")]
19303 pub first_name: Option<String>,
19304 #[serde(rename = "lastName")]
19306 pub last_name: Option<String>,
19307}
19308#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, oas3_gen_support::Default)]
19310pub enum UserEntityEntityType {
19311 #[serde(rename = "INDIVIDUAL")]
19312 #[default]
19313 Individual,
19314 Joint,
19315 #[serde(rename = "ORG")]
19316 Org,
19317}
19318impl core::fmt::Display for UserEntityEntityType {
19319 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19320 match self {
19321 Self::Individual => write!(f, "INDIVIDUAL"),
19322 Self::Joint => write!(f, "Joint"),
19323 Self::Org => write!(f, "ORG"),
19324 }
19325 }
19326}
19327#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19328pub struct UserNameAvailableResponse {
19329 pub error: Option<Box<ErrorResponse>>,
19330 #[serde(rename = "errorDescription")]
19331 pub error_description: Option<String>,
19332 #[serde(rename = "hasError")]
19333 pub has_error: Option<bool>,
19334 #[serde(rename = "isAvailable")]
19335 pub is_available: Option<bool>,
19336 #[serde(rename = "isValid")]
19337 pub is_valid: Option<bool>,
19338 #[serde(rename = "suggestedUserName")]
19339 pub suggested_user_name: Option<Vec<String>>,
19340}
19341pub type UtcDateTime = String;
19343#[derive(Debug, Clone, validator::Validate, oas3_gen_support::Default)]
19345pub struct VerifyCsvRequest {
19346 #[validate(nested)]
19347 pub header: VerifyCsvRequestHeader,
19348 #[validate(nested)]
19350 pub body: VerifyRequest,
19351}
19352impl VerifyCsvRequest {
19353 pub async fn parse_response(req: reqwest::Response) -> anyhow::Result<ApplyCsvResponse> {
19355 let status = req.status();
19356 if status == http::StatusCode::OK {
19357 let data =
19358 oas3_gen_support::Diagnostics::<CSVResponse>::json_with_diagnostics(req).await?;
19359 return Ok(ApplyCsvResponse::Ok(data));
19360 }
19361 if status == http::StatusCode::BAD_REQUEST {
19362 let _ = req.bytes().await?;
19363 return Ok(ApplyCsvResponse::BadRequest);
19364 }
19365 if status == http::StatusCode::UNAUTHORIZED {
19366 let _ = req.bytes().await?;
19367 return Ok(ApplyCsvResponse::Unauthorized);
19368 }
19369 if status == http::StatusCode::FORBIDDEN {
19370 let _ = req.bytes().await?;
19371 return Ok(ApplyCsvResponse::Forbidden);
19372 }
19373 if status == http::StatusCode::INTERNAL_SERVER_ERROR {
19374 let _ = req.bytes().await?;
19375 return Ok(ApplyCsvResponse::InternalServerError);
19376 }
19377 let _ = req.bytes().await?;
19378 return Ok(ApplyCsvResponse::Unknown);
19379 }
19380}
19381#[derive(Debug, Clone, PartialEq, validator::Validate, oas3_gen_support::Default)]
19382pub struct VerifyCsvRequestHeader {
19383 #[validate(length(min = 1u64))]
19386 pub authorization: String,
19387}
19388impl core::convert::TryFrom<&VerifyCsvRequestHeader> for http::HeaderMap {
19389 type Error = http::header::InvalidHeaderValue;
19390 fn try_from(headers: &VerifyCsvRequestHeader) -> core::result::Result<Self, Self::Error> {
19391 let mut map = http::HeaderMap::with_capacity(1usize);
19392 let header_value = http::HeaderValue::try_from(&headers.authorization)?;
19393 map.insert(AUTHORIZATION, header_value);
19394 Ok(map)
19395 }
19396}
19397impl core::convert::TryFrom<VerifyCsvRequestHeader> for http::HeaderMap {
19398 type Error = http::header::InvalidHeaderValue;
19399 fn try_from(headers: VerifyCsvRequestHeader) -> core::result::Result<Self, Self::Error> {
19400 http::HeaderMap::try_from(&headers)
19401 }
19402}
19403#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
19404pub struct VerifyRequest {
19405 pub payload: Vec<u8>,
19407 #[serde(rename = "requestId")]
19410 #[validate(range(min = 1i32))]
19411 pub request_id: i32,
19412 #[serde(rename = "userName")]
19415 #[validate(length(min = 1u64, max = 64u64))]
19416 pub user_name: String,
19417}
19418#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19419pub struct Watchlist200Response {
19420 pub hash: Option<String>,
19422 pub id: Option<String>,
19424 pub instruments: Option<Vec<serde_json::Value>>,
19426 pub name: Option<String>,
19428 #[serde(rename = "readOnly")]
19430 pub read_only: Option<bool>,
19431}
19432#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19434#[serde(default)]
19435pub struct WatchlistDeleteSuccess {
19436 #[serde(rename = "MID")]
19438 pub mid: Option<String>,
19439 #[default(Some("context".to_string()))]
19441 pub action: Option<String>,
19442 pub data: Option<WatchlistDeleteSuccessData>,
19443}
19444#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19445pub struct WatchlistDeleteSuccessData {
19446 pub deleted: Option<String>,
19448}
19449#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
19450pub struct WatchlistRequestBody {
19451 #[validate(length(min = 1u64))]
19453 pub id: String,
19454 #[validate(length(min = 1u64))]
19456 pub name: String,
19457 pub rows: Vec<WatchlistRequestBodyRow>,
19459}
19460#[serde_with::skip_serializing_none]
19461#[derive(Debug, Clone, PartialEq, Serialize, oas3_gen_support::Default)]
19462pub struct WatchlistRequestBodyRow {
19463 #[serde(rename = "C")]
19465 pub c: Option<String>,
19466}
19467#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19469#[serde(default)]
19470pub struct WatchlistsResponse {
19471 #[serde(rename = "MID")]
19473 pub mid: Option<String>,
19474 #[default(Some("content".to_string()))]
19476 pub action: Option<String>,
19477 pub data: Option<WatchlistsResponseData>,
19479}
19480#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19482pub struct WatchlistsResponseData {
19483 pub bulk_delete: Option<bool>,
19485 pub scanners_only: Option<bool>,
19487 pub show_scanners: Option<bool>,
19489 pub user_lists: Option<Vec<WatchlistsResponseDataUserList>>,
19491}
19492#[derive(Debug, Clone, PartialEq, Deserialize, oas3_gen_support::Default)]
19494#[serde(default)]
19495pub struct WatchlistsResponseDataUserList {
19496 pub id: Option<String>,
19498 pub is_open: Option<bool>,
19500 pub modified: Option<i32>,
19502 pub name: Option<String>,
19504 pub read_only: Option<bool>,
19506 #[serde(rename = "type")]
19508 #[default(Some("watchlist".to_string()))]
19509 pub r#type: Option<String>,
19510}
19511#[serde_with::skip_serializing_none]
19512#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
19513pub struct WithdrawFundsInstruction {
19514 #[serde(rename = "accountId")]
19516 #[validate(length(min = 1u64, max = 32u64))]
19517 pub account_id: String,
19518 pub amount: f64,
19520 #[serde(rename = "bankInstructionMethod")]
19522 pub bank_instruction_method: WithdrawFundsInstructionBankInstructionMethod,
19523 #[serde(rename = "bankInstructionName")]
19525 #[validate(length(min = 1u64, max = 150u64))]
19526 pub bank_instruction_name: String,
19527 #[serde(rename = "clientInstructionId")]
19529 pub client_instruction_id: f64,
19530 #[validate(length(min = 1u64, max = 3u64))]
19532 pub currency: String,
19533 #[serde(rename = "dateTimeToOccur")]
19534 pub date_time_to_occur: Option<chrono::DateTime<chrono::Utc>>,
19535 #[serde(rename = "iraWithdrawalDetail")]
19536 #[validate(nested)]
19537 pub ira_withdrawal_detail: Option<WithdrawFundsInstructionIraWithdrawalDetail>,
19538 #[serde(rename = "recurringInstructionDetail")]
19539 #[validate(nested)]
19540 pub recurring_instruction_detail: Option<RecurringInstructionDetail>,
19541}
19542#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
19543pub enum WithdrawFundsInstructionBankInstructionMethod {
19544 #[serde(rename = "ACH")]
19545 #[default]
19546 Ach,
19547 #[serde(rename = "WIRE")]
19548 Wire,
19549 #[serde(rename = "SEPA")]
19550 Sepa,
19551}
19552impl core::fmt::Display for WithdrawFundsInstructionBankInstructionMethod {
19553 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19554 match self {
19555 Self::Ach => write!(f, "ACH"),
19556 Self::Wire => write!(f, "WIRE"),
19557 Self::Sepa => write!(f, "SEPA"),
19558 }
19559 }
19560}
19561#[derive(Debug, Clone, PartialEq, Serialize, validator::Validate, oas3_gen_support::Default)]
19562pub struct WithdrawFundsInstructionIraWithdrawalDetail {
19563 #[serde(rename = "fedIncomeTaxPercentage")]
19565 pub fed_income_tax_percentage: f64,
19566 #[serde(rename = "iraWithholdType")]
19568 pub ira_withhold_type: WithdrawFundsInstructionIraWithdrawalDetailIraWithholdType,
19569 #[serde(rename = "stateCd")]
19571 #[validate(length(min = 1u64, max = 2u64))]
19572 pub state_cd: String,
19573 #[serde(rename = "stateIncomeTaxPercentage")]
19575 pub state_income_tax_percentage: f64,
19576}
19577#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, oas3_gen_support::Default)]
19578pub enum WithdrawFundsInstructionIraWithdrawalDetailIraWithholdType {
19579 #[serde(rename = "DIRECT_ROLLOVER")]
19580 #[default]
19581 DirectRollover,
19582 #[serde(rename = "ROTH_DISTRIBUTION")]
19583 RothDistribution,
19584 #[serde(rename = "NORMAL")]
19585 Normal,
19586 #[serde(rename = "EARLY")]
19587 Early,
19588 #[serde(rename = "DEATH")]
19589 Death,
19590 #[serde(rename = "EXCESS_CY")]
19591 ExcessCy,
19592 #[serde(rename = "EXCESS_PY")]
19593 ExcessPy,
19594 #[serde(rename = "EXCESS_SC")]
19595 ExcessSc,
19596}
19597impl core::fmt::Display for WithdrawFundsInstructionIraWithdrawalDetailIraWithholdType {
19598 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19599 match self {
19600 Self::DirectRollover => write!(f, "DIRECT_ROLLOVER"),
19601 Self::RothDistribution => write!(f, "ROTH_DISTRIBUTION"),
19602 Self::Normal => write!(f, "NORMAL"),
19603 Self::Early => write!(f, "EARLY"),
19604 Self::Death => write!(f, "DEATH"),
19605 Self::ExcessCy => write!(f, "EXCESS_CY"),
19606 Self::ExcessPy => write!(f, "EXCESS_PY"),
19607 Self::ExcessSc => write!(f, "EXCESS_SC"),
19608 }
19609 }
19610}