deriv_api/api/
calls.rs

1
2// Code generated by generate_calls.rs, DO NOT EDIT.
3use crate::client::DerivClient;
4use crate::error::Result;
5use deriv_api_schema::*;
6use crate::subscription::Subscription;
7
8impl DerivClient {
9
10/// Creates a P2P order for the specified advert.
11pub async fn p_2_p_order_create(&self, request: deriv_api_schema::P2pOrderCreateRequest) -> Result<deriv_api_schema::P2pOrderCreateResponse> {
12    self.send_request(&request).await
13}
14
15/// It unsubscribe user from the email subscription.
16pub async fn unsubscribe_email(&self, request: deriv_api_schema::UnsubscribeEmailRequest) -> Result<deriv_api_schema::UnsubscribeEmailResponse> {
17    self.send_request(&request).await
18}
19
20/// Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.
21pub async fn p_2_p_advert_create(&self, request: deriv_api_schema::P2pAdvertCreateRequest) -> Result<deriv_api_schema::P2pAdvertCreateResponse> {
22    self.send_request(&request).await
23}
24
25/// Manage or list P2P advertiser payment methods.
26pub async fn p_2_p_advertiser_payment_methods(&self, request: deriv_api_schema::P2pAdvertiserPaymentMethods) -> Result<deriv_api_schema::P2pAdvertiserPaymentMethods> {
27    self.send_request(&request).await
28}
29
30/// Retrieve performance, trading, risk and copiers statistics of trader.
31pub async fn copytrading_statistics(&self, request: deriv_api_schema::CopytradingStatisticsRequest) -> Result<deriv_api_schema::CopytradingStatisticsResponse> {
32    self.send_request(&request).await
33}
34
35/// Request the cashier info for the specified type.
36pub async fn cashier(&self, request: deriv_api_schema::CashierRequest) -> Result<deriv_api_schema::CashierResponse> {
37    self.send_request(&request).await
38}
39
40/// Cancel contract with contract id
41pub async fn cancel(&self, request: deriv_api_schema::CancelRequest) -> Result<deriv_api_schema::CancelResponse> {
42    self.send_request(&request).await
43}
44
45/// Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.
46pub async fn paymentagent_transfer(&self, request: deriv_api_schema::PaymentagentTransferRequest) -> Result<deriv_api_schema::PaymentagentTransferResponse> {
47    self.send_request(&request).await
48}
49
50/// Subscribe to transaction notifications
51pub async fn transaction(&self, request: deriv_api_schema::TransactionRequest) -> Result<deriv_api_schema::TransactionResponse> {
52    self.send_request(&request).await
53}
54
55/// Request server config.
56pub async fn website_config(&self, request: deriv_api_schema::WebsiteConfigRequest) -> Result<deriv_api_schema::WebsiteConfigResponse> {
57    self.send_request(&request).await
58}
59
60/// Keeps the connection alive and updates the P2P advertiser&#x27;s online status. The advertiser will be considered offline 60 seconds after a call is made.
61pub async fn p_2_p_ping(&self, request: deriv_api_schema::P2pPingRequest) -> Result<deriv_api_schema::P2pPingResponse> {
62    self.send_request(&request).await
63}
64
65/// Reset the investor password of a Trading Platform Account
66pub async fn trading_platform_investor_password_reset(&self, request: deriv_api_schema::TradingPlatformInvestorPasswordResetRequest) -> Result<deriv_api_schema::TradingPlatformInvestorPasswordResetResponse> {
67    self.send_request(&request).await
68}
69
70/// Sell a Contract as identified from a previous &#x60;portfolio&#x60; call.
71pub async fn sell(&self, request: deriv_api_schema::SellRequest) -> Result<deriv_api_schema::SellResponse> {
72    self.send_request(&request).await
73}
74
75/// To reset the password of MT5 account.
76pub async fn mt_5_password_reset(&self, request: deriv_api_schema::Mt5PasswordResetRequest) -> Result<deriv_api_schema::Mt5PasswordResetResponse> {
77    self.send_request(&request).await
78}
79
80/// Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.
81pub async fn p_2_p_advertiser_adverts(&self, request: deriv_api_schema::P2pAdvertiserAdvertsRequest) -> Result<deriv_api_schema::P2pAdvertiserAdvertsResponse> {
82    self.send_request(&request).await
83}
84
85/// Returns available adverts for use with &#x60;p2p_order_create&#x60; .
86pub async fn p_2_p_advert_list(&self, request: deriv_api_schema::P2pAdvertListRequest) -> Result<deriv_api_schema::P2pAdvertListResponse> {
87    self.send_request(&request).await
88}
89
90/// Buy a Contract for multiple Accounts specified by the &#x60;tokens&#x60; parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.
91pub async fn buy_contract_for_multiple_accounts(&self, request: deriv_api_schema::BuyContractForMultipleAccountsRequest) -> Result<deriv_api_schema::BuyContractForMultipleAccountsResponse> {
92    self.send_request(&request).await
93}
94
95/// To send the ping request to the server. Mostly used to test the connection or to keep it alive.
96pub async fn ping(&self, request: deriv_api_schema::PingRequest) -> Result<deriv_api_schema::PingResponse> {
97    self.send_request(&request).await
98}
99
100/// This call initiates the state machine for account creation process
101pub async fn partner_account_creation(&self, request: deriv_api_schema::PartnerAccountCreationRequest) -> Result<deriv_api_schema::PartnerAccountCreationResponse> {
102    self.send_request(&request).await
103}
104
105/// Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.
106pub async fn p_2_p_advertiser_update(&self, request: deriv_api_schema::P2pAdvertiserUpdateRequest) -> Result<deriv_api_schema::P2pAdvertiserUpdateResponse> {
107    self.send_request(&request).await
108}
109
110/// When a virtual-money&#x27;s account balance becomes low, it can be topped up using this call.
111pub async fn topup_virtual(&self, request: deriv_api_schema::TopupVirtualRequest) -> Result<deriv_api_schema::TopupVirtualResponse> {
112    self.send_request(&request).await
113}
114
115/// A message with Partner Settings
116pub async fn partner_settings_update(&self, request: deriv_api_schema::PartnerSettingsUpdateRequest) -> Result<deriv_api_schema::PartnerSettingsUpdateResponse> {
117    self.send_request(&request).await
118}
119
120/// Initiate a continuous stream of spot price updates for a group symbols.
121pub async fn ticks_batch(&self, request: deriv_api_schema::TicksBatchRequest) -> Result<deriv_api_schema::TicksBatchResponse> {
122    self.send_request(&request).await
123}
124
125/// For a given country, returns a list of States of that country. This is useful to populate the account opening form.
126pub async fn states_list(&self, request: deriv_api_schema::StatesListRequest) -> Result<deriv_api_schema::StatesListResponse> {
127    self.send_request(&request).await
128}
129
130/// Sell contracts for multiple accounts simultaneously. Uses the shortcode response from &#x60;buy_contract_for_multiple_accounts&#x60; to identify the contract, and authorisation tokens to select which accounts to sell those contracts on. Note that only the accounts identified by the tokens will be affected. This will not sell the contract on the currently-authorised account unless you include the token for the current account.
131pub async fn sell_contract_for_multiple_accounts(&self, request: deriv_api_schema::SellContractForMultipleAccountsRequest) -> Result<deriv_api_schema::SellContractForMultipleAccountsResponse> {
132    self.send_request(&request).await
133}
134
135/// This call allows transfers between accounts held by a given user. Transfer funds between your fiat and cryptocurrency accounts (for a fee). Please note that account_from should be same as current authorized account.
136pub async fn transfer_between_accounts(&self, request: deriv_api_schema::TransferBetweenAccountsRequest) -> Result<deriv_api_schema::TransferBetweenAccountsResponse> {
137    self.send_request(&request).await
138}
139
140/// Get User Settings (email, date of birth, address etc)
141pub async fn get_settings(&self, request: deriv_api_schema::GetSettingsRequest) -> Result<deriv_api_schema::GetSettingsResponse> {
142    self.send_request(&request).await
143}
144
145/// Initiate a continuous stream of spot price updates for a given symbol.
146pub async fn ticks(&self, request: deriv_api_schema::TicksRequest) -> Result<deriv_api_schema::TicksResponse> {
147    self.send_request(&request).await
148}
149
150/// This call gets the financial assessment questionnaire structure, which defines the questions, possible answers, and flow logic for the financial assessment form.
151pub async fn financial_assessment_questions(&self, request: deriv_api_schema::FinancialAssessmentQuestionsRequest) -> Result<deriv_api_schema::FinancialAssessmentQuestionsResponse> {
152    self.send_request(&request).await
153}
154
155/// Provide justification to perform withdrawal using a Payment Agent.
156pub async fn paymentagent_withdraw_justification(&self, request: deriv_api_schema::PaymentagentWithdrawJustificationRequest) -> Result<deriv_api_schema::PaymentagentWithdrawJustificationResponse> {
157    self.send_request(&request).await
158}
159
160/// Update a contract condition.
161pub async fn contract_update(&self, request: deriv_api_schema::ContractUpdateRequest) -> Result<deriv_api_schema::ContractUpdateResponse> {
162    self.send_request(&request).await
163}
164
165/// This call opens a new real-money account. This call can be made from a virtual-money or a real-money account. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.
166pub async fn new_account_real(&self, request: deriv_api_schema::NewAccountRealRequest) -> Result<deriv_api_schema::NewAccountRealResponse> {
167    self.send_request(&request).await
168}
169
170/// Retrieve information about a P2P advert.
171pub async fn p_2_p_advert_info(&self, request: deriv_api_schema::P2pAdvertInfoRequest) -> Result<deriv_api_schema::P2pAdvertInfoResponse> {
172    self.send_request(&request).await
173}
174
175/// Reset the password of a Trading Platform Account
176pub async fn trading_platform_password_reset(&self, request: deriv_api_schema::TradingPlatformPasswordResetRequest) -> Result<deriv_api_schema::TradingPlatformPasswordResetResponse> {
177    self.send_request(&request).await
178}
179
180/// Request for contract update history.
181pub async fn contract_update_history(&self, request: deriv_api_schema::ContractUpdateHistoryRequest) -> Result<deriv_api_schema::ContractUpdateHistoryResponse> {
182    self.send_request(&request).await
183}
184
185/// Trading and Withdrawal Limits for a given user
186pub async fn get_limits(&self, request: deriv_api_schema::GetLimitsRequest) -> Result<deriv_api_schema::GetLimitsResponse> {
187    self.send_request(&request).await
188}
189
190/// Retrieve advertisers has/had trade with the current advertiser.
191pub async fn p_2_p_advertiser_list(&self, request: deriv_api_schema::P2pAdvertiserListRequest) -> Result<deriv_api_schema::P2pAdvertiserListResponse> {
192    self.send_request(&request).await
193}
194
195/// Request P2P Settings information.
196pub async fn p_2_p_settings(&self, request: deriv_api_schema::P2pSettingsRequest) -> Result<deriv_api_schema::P2pSettingsResponse> {
197    self.send_request(&request).await
198}
199
200/// Will return a list of Payment Agents for a given country for a given currency. Payment agents allow users to deposit and withdraw funds using local payment methods that might not be available via the main website&#x27;s cashier system.
201pub async fn paymentagent_list(&self, request: deriv_api_schema::PaymentagentListRequest) -> Result<deriv_api_schema::PaymentagentListResponse> {
202    self.send_request(&request).await
203}
204
205/// Get list of MT5 accounts for client
206pub async fn mt_5_login_list(&self, request: deriv_api_schema::Mt5LoginListRequest) -> Result<deriv_api_schema::Mt5LoginListResponse> {
207    self.send_request(&request).await
208}
209
210/// Dispute a P2P order.
211pub async fn p_2_p_order_dispute(&self, request: deriv_api_schema::P2pOrderDisputeRequest) -> Result<deriv_api_schema::P2pOrderDisputeResponse> {
212    self.send_request(&request).await
213}
214
215/// Get the validations for Tax Identification Numbers (TIN)
216pub async fn tin_validations(&self, request: deriv_api_schema::TinValidationsRequest) -> Result<deriv_api_schema::TinValidationsResponse> {
217    self.send_request(&request).await
218}
219
220/// List all P2P payment methods.
221pub async fn p_2_p_payment_methods(&self, request: deriv_api_schema::P2pPaymentMethodsRequest) -> Result<deriv_api_schema::P2pPaymentMethodsResponse> {
222    self.send_request(&request).await
223}
224
225/// Creates a review for the specified order.
226pub async fn p_2_p_order_review(&self, request: deriv_api_schema::P2pOrderReviewRequest) -> Result<deriv_api_schema::P2pOrderReviewResponse> {
227    self.send_request(&request).await
228}
229
230/// Set User Settings (this call should be used in conjunction with &#x60;get_settings&#x60;)
231pub async fn set_settings(&self, request: deriv_api_schema::SetSettingsRequest) -> Result<deriv_api_schema::SetSettingsResponse> {
232    self.send_request(&request).await
233}
234
235/// List active orders.
236pub async fn p_2_p_order_list(&self, request: deriv_api_schema::P2pOrderListRequest) -> Result<deriv_api_schema::P2pOrderListResponse> {
237    self.send_request(&request).await
238}
239
240/// Get the list of currently available contracts for a given landing company.
241pub async fn contracts_for_company(&self, request: deriv_api_schema::ContractsForCompanyRequest) -> Result<deriv_api_schema::ContractsForCompanyResponse> {
242    self.send_request(&request).await
243}
244
245/// Verifies the code and returns a new code if verification is successful
246pub async fn exchange_verification_code(&self, request: deriv_api_schema::ExchangeVerificationCodeRequest) -> Result<deriv_api_schema::ExchangeVerificationCodeResponse> {
247    self.send_request(&request).await
248}
249
250/// Get Account Status
251pub async fn get_account_status(&self, request: deriv_api_schema::GetAccountStatusRequest) -> Result<deriv_api_schema::GetAccountStatusResponse> {
252    self.send_request(&request).await
253}
254
255/// To change passwords of the MT5 account.
256pub async fn mt_5_password_change(&self, request: deriv_api_schema::Mt5PasswordChangeRequest) -> Result<deriv_api_schema::Mt5PasswordChangeResponse> {
257    self.send_request(&request).await
258}
259
260/// This call will try to sell any expired contracts and return the number of sold contracts.
261pub async fn sell_expired(&self, request: deriv_api_schema::SellExpiredRequest) -> Result<deriv_api_schema::SellExpiredResponse> {
262    self.send_request(&request).await
263}
264
265/// Get All Partner Accounts (Partner account details like website, provider, company details)
266pub async fn partner_accounts(&self, request: deriv_api_schema::PartnerAccountsRequest) -> Result<deriv_api_schema::PartnerAccountsResponse> {
267    self.send_request(&request).await
268}
269
270/// Immediately cancel the real-time streams of messages of given type.
271pub async fn forget_all(&self, request: deriv_api_schema::ForgetAllRequest) -> Result<deriv_api_schema::ForgetAllResponse> {
272    self.send_request(&request).await
273}
274
275/// Request server status.
276pub async fn website_status(&self, request: deriv_api_schema::WebsiteStatusRequest) -> Result<deriv_api_schema::WebsiteStatusResponse> {
277    self.send_request(&request).await
278}
279
280/// Request trading platform status
281pub async fn trading_platform_status(&self, request: deriv_api_schema::TradingPlatformStatusRequest) -> Result<deriv_api_schema::TradingPlatformStatusResponse> {
282    self.send_request(&request).await
283}
284
285/// Confirm a P2P order.
286pub async fn p_2_p_order_confirm(&self, request: deriv_api_schema::P2pOrderConfirmRequest) -> Result<deriv_api_schema::P2pOrderConfirmResponse> {
287    self.send_request(&request).await
288}
289
290/// Creates a P2P chat for the specified order.
291pub async fn p_2_p_chat_create(&self, request: deriv_api_schema::P2pChatCreateRequest) -> Result<deriv_api_schema::P2pChatCreateResponse> {
292    self.send_request(&request).await
293}
294
295/// Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user&#x27;s landing company will be returned.
296pub async fn asset_index(&self, request: deriv_api_schema::AssetIndexRequest) -> Result<deriv_api_schema::AssetIndexResponse> {
297    self.send_request(&request).await
298}
299
300/// Retrieve information about a P2P advertiser.
301pub async fn p_2_p_advertiser_info(&self, request: deriv_api_schema::P2pAdvertiserInfoRequest) -> Result<deriv_api_schema::P2pAdvertiserInfoResponse> {
302    self.send_request(&request).await
303}
304
305/// Retrieve a list of all available underlyings and the corresponding contract types and trading duration boundaries. If the user is logged in, only the assets available for that user&#x27;s landing company will be returned.
306pub async fn trading_durations(&self, request: deriv_api_schema::TradingDurationsRequest) -> Result<deriv_api_schema::TradingDurationsResponse> {
307    self.send_request(&request).await
308}
309
310/// Retrieve a summary of account transactions, according to given search criteria
311pub async fn statement(&self, request: deriv_api_schema::StatementRequest) -> Result<deriv_api_schema::StatementResponse> {
312    self.send_request(&request).await
313}
314
315/// The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies (and which are wholly owned subsidiaries of the Deriv Group). This call provides information about each Landing Company.
316pub async fn landing_company_details(&self, request: deriv_api_schema::LandingCompanyDetailsRequest) -> Result<deriv_api_schema::LandingCompanyDetailsResponse> {
317    self.send_request(&request).await
318}
319
320/// To approve the latest version of terms and conditions.
321pub async fn tnc_approval(&self, request: deriv_api_schema::TncApprovalRequest) -> Result<deriv_api_schema::TncApprovalResponse> {
322    self.send_request(&request).await
323}
324
325/// Get Third Party Redirect URL for sso login.
326pub async fn get_third_party_redirect(&self, request: deriv_api_schema::GetThirdPartyRedirectRequest) -> Result<deriv_api_schema::GetThirdPartyRedirectResponse> {
327    self.send_request(&request).await
328}
329
330/// This call opens a new real-money account with the &#x60;maltainvest&#x60; Landing Company. This call can be made from a virtual-money account or real-money account at Deriv (Europe) Limited. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.
331pub async fn new_account_maltainvest(&self, request: deriv_api_schema::NewAccountMaltainvestRequest) -> Result<deriv_api_schema::NewAccountMaltainvestResponse> {
332    self.send_request(&request).await
333}
334
335/// Get user account balance
336pub async fn balance(&self, request: deriv_api_schema::BalanceRequest) -> Result<deriv_api_schema::BalanceResponse> {
337    self.send_request(&request).await
338}
339
340/// The request for deleting an application.
341pub async fn app_delete(&self, request: deriv_api_schema::AppDeleteRequest) -> Result<deriv_api_schema::AppDeleteResponse> {
342    self.send_request(&request).await
343}
344
345/// Retrieves the information about a P2P order.
346pub async fn p_2_p_order_info(&self, request: deriv_api_schema::P2pOrderInfoRequest) -> Result<deriv_api_schema::P2pOrderInfoResponse> {
347    self.send_request(&request).await
348}
349
350/// Logout the session
351pub async fn logout(&self, request: deriv_api_schema::LogoutRequest) -> Result<deriv_api_schema::LogoutResponse> {
352    self.send_request(&request).await
353}
354
355/// Update a new OAuth application
356pub async fn app_update(&self, request: deriv_api_schema::AppUpdateRequest) -> Result<deriv_api_schema::AppUpdateResponse> {
357    self.send_request(&request).await
358}
359
360/// This call polls the state machine and returns the completion status for each step.
361pub async fn partner_account_creation_status(&self, request: deriv_api_schema::PartnerAccountCreationStatusRequest) -> Result<deriv_api_schema::PartnerAccountCreationStatusResponse> {
362    self.send_request(&request).await
363}
364
365/// This call sets the financial assessment details based on the client&#x27;s answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.
366pub async fn set_financial_assessment(&self, request: deriv_api_schema::SetFinancialAssessment) -> Result<deriv_api_schema::SetFinancialAssessmentResponse> {
367    self.send_request(&request).await
368}
369
370/// Updates and returns favourite and blocked advertisers of the current user.
371pub async fn p_2_p_advertiser_relations(&self, request: deriv_api_schema::P2pAdvertiserRelationsRequest) -> Result<deriv_api_schema::P2pAdvertiserRelationsResponse> {
372    self.send_request(&request).await
373}
374
375/// Get KYC Authentication Status
376pub async fn kyc_auth_status(&self, request: deriv_api_schema::KycAuthStatusRequest) -> Result<deriv_api_schema::KycAuthStatusResponse> {
377    self.send_request(&request).await
378}
379
380/// Get MT5 user account settings
381pub async fn mt_5_get_settings(&self, request: deriv_api_schema::Mt5GetSettingsRequest) -> Result<deriv_api_schema::Mt5GetSettingsResponse> {
382    self.send_request(&request).await
383}
384
385/// Retrieve summary of client&#x27;s trades and account for the Reality Check facility. A &#x27;reality check&#x27; means a display of time elapsed since the session began, and associated client profit/loss. The Reality Check facility is a regulatory requirement for certain landing companies.
386pub async fn reality_check(&self, request: deriv_api_schema::RealityCheckRequest) -> Result<deriv_api_schema::RealityCheckResponse> {
387    self.send_request(&request).await
388}
389
390/// List all of the account&#x27;s OAuth applications
391pub async fn app_list(&self, request: deriv_api_schema::AppListRequest) -> Result<deriv_api_schema::AppListResponse> {
392    self.send_request(&request).await
393}
394
395/// Used for revoking access of particular app.
396pub async fn revoke_oauth_app(&self, request: deriv_api_schema::RevokeOauthAppRequest) -> Result<deriv_api_schema::RevokeOauthAppResponse> {
397    self.send_request(&request).await
398}
399
400/// Request back-end server epoch time.
401pub async fn time(&self, request: deriv_api_schema::TimeRequest) -> Result<deriv_api_schema::TimeResponse> {
402    self.send_request(&request).await
403}
404
405/// The request for cryptocurrencies configuration.
406pub async fn crypto_config(&self, request: deriv_api_schema::CryptoConfigRequest) -> Result<deriv_api_schema::CryptoConfigResponse> {
407    self.send_request(&request).await
408}
409
410/// Request KYC information from client
411pub async fn document_upload(&self, request: deriv_api_schema::DocumentUploadRequest) -> Result<deriv_api_schema::DocumentUploadResponse> {
412    self.send_request(&request).await
413}
414
415/// Verifies the email for the user using verification code passed in the request object
416pub async fn confirm_email(&self, request: deriv_api_schema::ConfirmEmailRequest) -> Result<deriv_api_schema::ConfirmEmailResponse> {
417    self.send_request(&request).await
418}
419
420/// The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies. This call will return the appropriate Landing Company for clients of a given country. The landing company may differ for derived contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).
421pub async fn landing_company(&self, request: deriv_api_schema::LandingCompanyRequest) -> Result<deriv_api_schema::LandingCompanyResponse> {
422    self.send_request(&request).await
423}
424
425/// List all my used OAuth applications.
426pub async fn oauth_apps(&self, request: deriv_api_schema::OauthAppsRequest) -> Result<deriv_api_schema::OauthAppsResponse> {
427    self.send_request(&request).await
428}
429
430/// Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.
431pub async fn crypto_estimations(&self, request: deriv_api_schema::CryptoEstimationsRequest) -> Result<deriv_api_schema::CryptoEstimations> {
432    self.send_request(&request).await
433}
434
435/// Start copy trader bets
436pub async fn copy_start(&self, request: deriv_api_schema::CopyStartRequest) -> Result<deriv_api_schema::CopyStartResponse> {
437    self.send_request(&request).await
438}
439
440/// Gets latest price for a specific contract.
441pub async fn proposal(&self, request: deriv_api_schema::ProposalRequest) -> Result<deriv_api_schema::ProposalResponse> {
442    self.send_request(&request).await
443}
444
445/// Retrieve a summary of login history for user.
446pub async fn login_history(&self, request: deriv_api_schema::LoginHistoryRequest) -> Result<deriv_api_schema::LoginHistoryResponse> {
447    self.send_request(&request).await
448}
449
450/// This call validates the main password for the MT5 user
451pub async fn mt_5_password_check(&self, request: deriv_api_schema::Mt5PasswordCheckRequest) -> Result<deriv_api_schema::Mt5PasswordCheckResponse> {
452    self.send_request(&request).await
453}
454
455/// Authorize current WebSocket session to act on behalf of the owner of a given token. Must precede requests that need to access client account, for example purchasing and selling contracts or viewing portfolio.
456pub async fn authorize(&self, request: deriv_api_schema::AuthorizeRequest) -> Result<deriv_api_schema::AuthorizeResponse> {
457    self.send_request(&request).await
458}
459
460/// List all or specific country and its payment methods.
461pub async fn p_2_p_country_list(&self, request: deriv_api_schema::P2pCountryListRequest) -> Result<deriv_api_schema::P2pCountryListResponse> {
462    self.send_request(&request).await
463}
464
465/// Initiate a withdrawal to an approved Payment Agent.
466pub async fn paymentagent_withdraw(&self, request: deriv_api_schema::PaymentagentWithdrawRequest) -> Result<deriv_api_schema::PaymentagentWithdrawResponse> {
467    self.send_request(&request).await
468}
469
470/// Register a new OAuth application
471pub async fn app_register(&self, request: deriv_api_schema::AppRegisterRequest) -> Result<deriv_api_schema::AppRegisterResponse> {
472    self.send_request(&request).await
473}
474
475/// Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).
476pub async fn active_symbols(&self, request: deriv_api_schema::ActiveSymbolsRequest) -> Result<deriv_api_schema::ActiveSymbolsResponse> {
477    self.send_request(&request).await
478}
479
480/// Get historic tick data for a given symbol.
481pub async fn ticks_history(&self, request: deriv_api_schema::TicksHistoryRequest) -> Result<deriv_api_schema::TicksHistoryResponse> {
482    self.send_request(&request).await
483}
484
485/// This call creates new MT5 user, either demo or real money user.
486pub async fn mt_5_new_account(&self, request: deriv_api_schema::Mt5NewAccountRequest) -> Result<deriv_api_schema::Mt5NewAccountResponse> {
487    self.send_request(&request).await
488}
489
490/// Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.
491pub async fn payout_currencies(&self, request: deriv_api_schema::PayoutCurrenciesRequest) -> Result<deriv_api_schema::PayoutCurrenciesResponse> {
492    self.send_request(&request).await
493}
494
495/// Receive information about my current portfolio of outstanding options
496pub async fn portfolio(&self, request: deriv_api_schema::PortfolioRequest) -> Result<deriv_api_schema::PortfolioResponse> {
497    self.send_request(&request).await
498}
499
500/// Stop copy trader bets
501pub async fn copy_stop(&self, request: deriv_api_schema::CopyStopRequest) -> Result<deriv_api_schema::CopyStopResponse> {
502    self.send_request(&request).await
503}
504
505/// Retrieves a list of active copiers and/or traders for Copy Trading
506pub async fn copytrading_list(&self, request: deriv_api_schema::CopytradingListRequest) -> Result<deriv_api_schema::CopytradingListResponse> {
507    self.send_request(&request).await
508}
509
510/// Retrieve details of &#x60;app_markup&#x60; according to criteria specified.
511pub async fn app_markup_details(&self, request: deriv_api_schema::AppMarkupDetailsRequest) -> Result<deriv_api_schema::AppMarkupDetailsResponse> {
512    self.send_request(&request).await
513}
514
515/// Get Partner Settings (Partner Type, Company Details etc)
516pub async fn partner_settings(&self, request: deriv_api_schema::PartnerSettingsRequest) -> Result<deriv_api_schema::PartnerSettingsResponse> {
517    self.send_request(&request).await
518}
519
520/// Gets client&#x27;s payment agent details.
521pub async fn paymentagent_details(&self, request: deriv_api_schema::PaymentagentDetailsRequest) -> Result<deriv_api_schema::PaymentagentDetailsResponse> {
522    self.send_request(&request).await
523}
524
525/// This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.
526pub async fn residence_list(&self, request: deriv_api_schema::ResidenceListRequest) -> Result<deriv_api_schema::ResidenceListResponse> {
527    self.send_request(&request).await
528}
529
530/// Immediately cancel the real-time stream of messages with a specific ID.
531pub async fn forget(&self, request: deriv_api_schema::ForgetRequest) -> Result<deriv_api_schema::ForgetResponse> {
532    self.send_request(&request).await
533}
534
535/// This call manages API tokens
536pub async fn api_token(&self, request: deriv_api_schema::ApiTokenRequest) -> Result<deriv_api_schema::ApiTokenResponse> {
537    self.send_request(&request).await
538}
539
540/// Returns all accounts belonging to the authorized user.
541pub async fn account_list(&self, request: deriv_api_schema::AccountListRequest) -> Result<deriv_api_schema::AccountListResponse> {
542    self.send_request(&request).await
543}
544
545/// Saves client&#x27;s payment agent details.
546pub async fn paymentagent_create(&self, request: deriv_api_schema::PaymentagentCreateRequest) -> Result<deriv_api_schema::PaymentagentCreateResponse> {
547    self.send_request(&request).await
548}
549
550/// Adds document information such as issuing country, id and type for identity verification processes.
551pub async fn identity_verification_document_add(&self, request: deriv_api_schema::IdentityVerificationDocumentAddRequest) -> Result<deriv_api_schema::IdentityVerificationDocumentAddResponse> {
552    self.send_request(&request).await
553}
554
555/// This call gets the financial assessment details. The &#x27;financial assessment&#x27; is a questionnaire that clients of certain Landing Companies need to complete, due to regulatory and KYC (know your client) requirements.
556pub async fn get_financial_assessment(&self, request: deriv_api_schema::GetFinancialAssessmentRequest) -> Result<deriv_api_schema::GetFinancialAssessmentResponse> {
557    self.send_request(&request).await
558}
559
560/// This call allows withdrawal from MT5 account to Binary account.
561pub async fn mt_5_withdrawal(&self, request: deriv_api_schema::Mt5WithdrawalRequest) -> Result<deriv_api_schema::Mt5WithdrawalResponse> {
562    self.send_request(&request).await
563}
564
565/// To get the information of the OAuth application specified by &#x27;app_id&#x27;
566pub async fn app_get(&self, request: deriv_api_schema::AppGetRequest) -> Result<deriv_api_schema::AppGetResponse> {
567    self.send_request(&request).await
568}
569
570/// Retrieve a summary of account Profit Table, according to given search criteria
571pub async fn profit_table(&self, request: deriv_api_schema::ProfitTableRequest) -> Result<deriv_api_schema::ProfitTableResponse> {
572    self.send_request(&request).await
573}
574
575/// Updates a P2P advert. Can only be used by the advertiser.
576pub async fn p_2_p_advert_update(&self, request: deriv_api_schema::P2pAdvertUpdateRequest) -> Result<deriv_api_schema::P2pAdvertUpdateResponse> {
577    self.send_request(&request).await
578}
579
580/// For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.
581pub async fn contracts_for(&self, request: deriv_api_schema::ContractsForRequest) -> Result<deriv_api_schema::ContractsForResponse> {
582    self.send_request(&request).await
583}
584
585/// Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.
586pub async fn verify_email(&self, request: deriv_api_schema::VerifyEmailRequest) -> Result<deriv_api_schema::VerifyEmailResponse> {
587    self.send_request(&request).await
588}
589
590/// Get the list of servers for a trading platform.
591pub async fn trading_servers(&self, request: deriv_api_schema::TradingServersRequest) -> Result<deriv_api_schema::TradingServersResponse> {
592    self.send_request(&request).await
593}
594
595/// Create a new virtual-money account.
596pub async fn new_account_virtual(&self, request: deriv_api_schema::NewAccountVirtualRequest) -> Result<deriv_api_schema::NewAccountVirtualResponse> {
597    self.send_request(&request).await
598}
599
600/// Will return a list payment methods available for the given country. If the request is authenticated the client&#x27;s residence country will be used.
601pub async fn payment_methods(&self, request: deriv_api_schema::PaymentMethodsRequest) -> Result<deriv_api_schema::PaymentMethodsResponse> {
602    self.send_request(&request).await
603}
604
605/// Buy a Contract
606pub async fn buy(&self, request: deriv_api_schema::BuyRequest) -> Result<deriv_api_schema::BuyResponse> {
607    self.send_request(&request).await
608}
609
610/// Receive a list of market opening times for a given date.
611pub async fn trading_times(&self, request: deriv_api_schema::TradingTimesRequest) -> Result<deriv_api_schema::TradingTimesResponse> {
612    self.send_request(&request).await
613}
614
615/// Get latest price (and other information) for a contract in the user&#x27;s portfolio
616pub async fn proposal_open_contract(&self, request: deriv_api_schema::ProposalOpenContractRequest) -> Result<deriv_api_schema::ProposalOpenContractResponse> {
617    self.send_request(&request).await
618}
619
620/// This call allows deposit into MT5 account from Binary account.
621pub async fn mt_5_deposit(&self, request: deriv_api_schema::Mt5DepositRequest) -> Result<deriv_api_schema::Mt5DepositResponse> {
622    self.send_request(&request).await
623}
624
625/// Cancel a P2P order.
626pub async fn p_2_p_order_cancel(&self, request: deriv_api_schema::P2pOrderCancelRequest) -> Result<deriv_api_schema::P2pOrderCancelResponse> {
627    self.send_request(&request).await
628}
629
630/// This call opens a new Real-Partner Account
631pub async fn new_partner_account(&self, request: deriv_api_schema::NewPartnerAccountRequest) -> Result<deriv_api_schema::NewPartnerAccountResponse> {
632    self.send_request(&request).await
633}
634
635/// Retrieves the exchange rate from a base currency to a target currency supported by the system.
636pub async fn exchange_rates(&self, request: deriv_api_schema::ExchangeRatesRequest) -> Result<deriv_api_schema::ExchangeRatesResponse> {
637    self.send_request(&request).await
638}
639
640/// Retrieve statistics of &#x60;app_markup&#x60;.
641pub async fn app_markup_statistics(&self, request: deriv_api_schema::AppMarkupStatisticsRequest) -> Result<deriv_api_schema::AppMarkupStatisticsResponse> {
642    self.send_request(&request).await
643}
644
645/// Registers the client as a P2P advertiser.
646pub async fn p_2_p_advertiser_create(&self, request: deriv_api_schema::P2pAdvertiserCreateRequest) -> Result<deriv_api_schema::P2pAdvertiserCreateResponse> {
647    self.send_request(&request).await
648}
649
650/// Set Self-Exclusion (this call should be used in conjunction with &#x60;get_self_exclusion&#x60;)
651pub async fn set_self_exclusion(&self, request: deriv_api_schema::SetSelfExclusionRequest) -> Result<deriv_api_schema::SetSelfExclusionResponse> {
652    self.send_request(&request).await
653}
654
655/// Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.
656pub async fn economic_calendar(&self, request: deriv_api_schema::EconomicCalendarRequest) -> Result<deriv_api_schema::EconomicCalendarResponse> {
657    self.send_request(&request).await
658}
659
660/// Allows users to exclude themselves from the website for certain periods of time, or to set limits on their trading activities. This facility is a regulatory requirement for certain Landing Companies.
661pub async fn get_self_exclusion(&self, request: deriv_api_schema::GetSelfExclusionRequest) -> Result<deriv_api_schema::GetSelfExclusionResponse> {
662    self.send_request(&request).await
663}
664
665/// Set account currency, this will be default currency for your account i.e currency for trading, deposit. Please note that account currency can only be set once, and then can never be changed.
666pub async fn set_account_currency(&self, request: deriv_api_schema::SetAccountCurrencyRequest) -> Result<deriv_api_schema::SetAccountCurrencyResponse> {
667    self.send_request(&request).await
668}
669}