pub struct DerivClient { /* private fields */ }
Expand description
The main client for interacting with the Deriv API
Implementations§
Source§impl DerivClient
impl DerivClient
Sourcepub async fn p_2_p_order_create(
&self,
request: P2pOrderCreateRequest,
) -> Result<P2pOrderCreateResponse>
pub async fn p_2_p_order_create( &self, request: P2pOrderCreateRequest, ) -> Result<P2pOrderCreateResponse>
Creates a P2P order for the specified advert.
Sourcepub async fn unsubscribe_email(
&self,
request: UnsubscribeEmailRequest,
) -> Result<UnsubscribeEmailResponse>
pub async fn unsubscribe_email( &self, request: UnsubscribeEmailRequest, ) -> Result<UnsubscribeEmailResponse>
It unsubscribe user from the email subscription.
Sourcepub async fn p_2_p_advert_create(
&self,
request: P2pAdvertCreateRequest,
) -> Result<P2pAdvertCreateResponse>
pub async fn p_2_p_advert_create( &self, request: P2pAdvertCreateRequest, ) -> Result<P2pAdvertCreateResponse>
Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.
Sourcepub async fn p_2_p_advertiser_payment_methods(
&self,
request: P2pAdvertiserPaymentMethods,
) -> Result<P2pAdvertiserPaymentMethods>
pub async fn p_2_p_advertiser_payment_methods( &self, request: P2pAdvertiserPaymentMethods, ) -> Result<P2pAdvertiserPaymentMethods>
Manage or list P2P advertiser payment methods.
Sourcepub async fn copytrading_statistics(
&self,
request: CopytradingStatisticsRequest,
) -> Result<CopytradingStatisticsResponse>
pub async fn copytrading_statistics( &self, request: CopytradingStatisticsRequest, ) -> Result<CopytradingStatisticsResponse>
Retrieve performance, trading, risk and copiers statistics of trader.
Sourcepub async fn cashier(&self, request: CashierRequest) -> Result<CashierResponse>
pub async fn cashier(&self, request: CashierRequest) -> Result<CashierResponse>
Request the cashier info for the specified type.
Sourcepub async fn cancel(&self, request: CancelRequest) -> Result<CancelResponse>
pub async fn cancel(&self, request: CancelRequest) -> Result<CancelResponse>
Cancel contract with contract id
Sourcepub async fn paymentagent_transfer(
&self,
request: PaymentagentTransferRequest,
) -> Result<PaymentagentTransferResponse>
pub async fn paymentagent_transfer( &self, request: PaymentagentTransferRequest, ) -> Result<PaymentagentTransferResponse>
Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.
Sourcepub async fn transaction(
&self,
request: TransactionRequest,
) -> Result<TransactionResponse>
pub async fn transaction( &self, request: TransactionRequest, ) -> Result<TransactionResponse>
Subscribe to transaction notifications
Sourcepub async fn website_config(
&self,
request: WebsiteConfigRequest,
) -> Result<WebsiteConfigResponse>
pub async fn website_config( &self, request: WebsiteConfigRequest, ) -> Result<WebsiteConfigResponse>
Request server config.
Sourcepub async fn p_2_p_ping(
&self,
request: P2pPingRequest,
) -> Result<P2pPingResponse>
pub async fn p_2_p_ping( &self, request: P2pPingRequest, ) -> Result<P2pPingResponse>
Keeps the connection alive and updates the P2P advertiser's online status. The advertiser will be considered offline 60 seconds after a call is made.
Sourcepub async fn trading_platform_investor_password_reset(
&self,
request: TradingPlatformInvestorPasswordResetRequest,
) -> Result<TradingPlatformInvestorPasswordResetResponse>
pub async fn trading_platform_investor_password_reset( &self, request: TradingPlatformInvestorPasswordResetRequest, ) -> Result<TradingPlatformInvestorPasswordResetResponse>
Reset the investor password of a Trading Platform Account
Sourcepub async fn sell(&self, request: SellRequest) -> Result<SellResponse>
pub async fn sell(&self, request: SellRequest) -> Result<SellResponse>
Sell a Contract as identified from a previous `portfolio` call.
Sourcepub async fn mt_5_password_reset(
&self,
request: Mt5PasswordResetRequest,
) -> Result<Mt5PasswordResetResponse>
pub async fn mt_5_password_reset( &self, request: Mt5PasswordResetRequest, ) -> Result<Mt5PasswordResetResponse>
To reset the password of MT5 account.
Sourcepub async fn p_2_p_advertiser_adverts(
&self,
request: P2pAdvertiserAdvertsRequest,
) -> Result<P2pAdvertiserAdvertsResponse>
pub async fn p_2_p_advertiser_adverts( &self, request: P2pAdvertiserAdvertsRequest, ) -> Result<P2pAdvertiserAdvertsResponse>
Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.
Sourcepub async fn p_2_p_advert_list(
&self,
request: P2pAdvertListRequest,
) -> Result<P2pAdvertListResponse>
pub async fn p_2_p_advert_list( &self, request: P2pAdvertListRequest, ) -> Result<P2pAdvertListResponse>
Returns available adverts for use with `p2p_order_create` .
Sourcepub async fn buy_contract_for_multiple_accounts(
&self,
request: BuyContractForMultipleAccountsRequest,
) -> Result<BuyContractForMultipleAccountsResponse>
pub async fn buy_contract_for_multiple_accounts( &self, request: BuyContractForMultipleAccountsRequest, ) -> Result<BuyContractForMultipleAccountsResponse>
Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.
Sourcepub async fn ping(&self, request: PingRequest) -> Result<PingResponse>
pub async fn ping(&self, request: PingRequest) -> Result<PingResponse>
To send the ping request to the server. Mostly used to test the connection or to keep it alive.
Sourcepub async fn partner_account_creation(
&self,
request: PartnerAccountCreationRequest,
) -> Result<PartnerAccountCreationResponse>
pub async fn partner_account_creation( &self, request: PartnerAccountCreationRequest, ) -> Result<PartnerAccountCreationResponse>
This call initiates the state machine for account creation process
Sourcepub async fn p_2_p_advertiser_update(
&self,
request: P2pAdvertiserUpdateRequest,
) -> Result<P2pAdvertiserUpdateResponse>
pub async fn p_2_p_advertiser_update( &self, request: P2pAdvertiserUpdateRequest, ) -> Result<P2pAdvertiserUpdateResponse>
Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.
Sourcepub async fn topup_virtual(
&self,
request: TopupVirtualRequest,
) -> Result<TopupVirtualResponse>
pub async fn topup_virtual( &self, request: TopupVirtualRequest, ) -> Result<TopupVirtualResponse>
When a virtual-money's account balance becomes low, it can be topped up using this call.
Sourcepub async fn partner_settings_update(
&self,
request: PartnerSettingsUpdateRequest,
) -> Result<PartnerSettingsUpdateResponse>
pub async fn partner_settings_update( &self, request: PartnerSettingsUpdateRequest, ) -> Result<PartnerSettingsUpdateResponse>
A message with Partner Settings
Sourcepub async fn ticks_batch(
&self,
request: TicksBatchRequest,
) -> Result<TicksBatchResponse>
pub async fn ticks_batch( &self, request: TicksBatchRequest, ) -> Result<TicksBatchResponse>
Initiate a continuous stream of spot price updates for a group symbols.
Sourcepub async fn states_list(
&self,
request: StatesListRequest,
) -> Result<StatesListResponse>
pub async fn states_list( &self, request: StatesListRequest, ) -> Result<StatesListResponse>
For a given country, returns a list of States of that country. This is useful to populate the account opening form.
Sourcepub async fn sell_contract_for_multiple_accounts(
&self,
request: SellContractForMultipleAccountsRequest,
) -> Result<SellContractForMultipleAccountsResponse>
pub async fn sell_contract_for_multiple_accounts( &self, request: SellContractForMultipleAccountsRequest, ) -> Result<SellContractForMultipleAccountsResponse>
Sell contracts for multiple accounts simultaneously. Uses the shortcode response from `buy_contract_for_multiple_accounts` 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.
Sourcepub async fn transfer_between_accounts(
&self,
request: TransferBetweenAccountsRequest,
) -> Result<TransferBetweenAccountsResponse>
pub async fn transfer_between_accounts( &self, request: TransferBetweenAccountsRequest, ) -> Result<TransferBetweenAccountsResponse>
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.
Sourcepub async fn get_settings(
&self,
request: GetSettingsRequest,
) -> Result<GetSettingsResponse>
pub async fn get_settings( &self, request: GetSettingsRequest, ) -> Result<GetSettingsResponse>
Get User Settings (email, date of birth, address etc)
Sourcepub async fn ticks(&self, request: TicksRequest) -> Result<TicksResponse>
pub async fn ticks(&self, request: TicksRequest) -> Result<TicksResponse>
Initiate a continuous stream of spot price updates for a given symbol.
Sourcepub async fn financial_assessment_questions(
&self,
request: FinancialAssessmentQuestionsRequest,
) -> Result<FinancialAssessmentQuestionsResponse>
pub async fn financial_assessment_questions( &self, request: FinancialAssessmentQuestionsRequest, ) -> Result<FinancialAssessmentQuestionsResponse>
This call gets the financial assessment questionnaire structure, which defines the questions, possible answers, and flow logic for the financial assessment form.
Sourcepub async fn paymentagent_withdraw_justification(
&self,
request: PaymentagentWithdrawJustificationRequest,
) -> Result<PaymentagentWithdrawJustificationResponse>
pub async fn paymentagent_withdraw_justification( &self, request: PaymentagentWithdrawJustificationRequest, ) -> Result<PaymentagentWithdrawJustificationResponse>
Provide justification to perform withdrawal using a Payment Agent.
Sourcepub async fn contract_update(
&self,
request: ContractUpdateRequest,
) -> Result<ContractUpdateResponse>
pub async fn contract_update( &self, request: ContractUpdateRequest, ) -> Result<ContractUpdateResponse>
Update a contract condition.
Sourcepub async fn new_account_real(
&self,
request: NewAccountRealRequest,
) -> Result<NewAccountRealResponse>
pub async fn new_account_real( &self, request: NewAccountRealRequest, ) -> Result<NewAccountRealResponse>
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.
Sourcepub async fn p_2_p_advert_info(
&self,
request: P2pAdvertInfoRequest,
) -> Result<P2pAdvertInfoResponse>
pub async fn p_2_p_advert_info( &self, request: P2pAdvertInfoRequest, ) -> Result<P2pAdvertInfoResponse>
Retrieve information about a P2P advert.
Sourcepub async fn trading_platform_password_reset(
&self,
request: TradingPlatformPasswordResetRequest,
) -> Result<TradingPlatformPasswordResetResponse>
pub async fn trading_platform_password_reset( &self, request: TradingPlatformPasswordResetRequest, ) -> Result<TradingPlatformPasswordResetResponse>
Reset the password of a Trading Platform Account
Sourcepub async fn contract_update_history(
&self,
request: ContractUpdateHistoryRequest,
) -> Result<ContractUpdateHistoryResponse>
pub async fn contract_update_history( &self, request: ContractUpdateHistoryRequest, ) -> Result<ContractUpdateHistoryResponse>
Request for contract update history.
Sourcepub async fn get_limits(
&self,
request: GetLimitsRequest,
) -> Result<GetLimitsResponse>
pub async fn get_limits( &self, request: GetLimitsRequest, ) -> Result<GetLimitsResponse>
Trading and Withdrawal Limits for a given user
Sourcepub async fn p_2_p_advertiser_list(
&self,
request: P2pAdvertiserListRequest,
) -> Result<P2pAdvertiserListResponse>
pub async fn p_2_p_advertiser_list( &self, request: P2pAdvertiserListRequest, ) -> Result<P2pAdvertiserListResponse>
Retrieve advertisers has/had trade with the current advertiser.
Sourcepub async fn p_2_p_settings(
&self,
request: P2pSettingsRequest,
) -> Result<P2pSettingsResponse>
pub async fn p_2_p_settings( &self, request: P2pSettingsRequest, ) -> Result<P2pSettingsResponse>
Request P2P Settings information.
Sourcepub async fn paymentagent_list(
&self,
request: PaymentagentListRequest,
) -> Result<PaymentagentListResponse>
pub async fn paymentagent_list( &self, request: PaymentagentListRequest, ) -> Result<PaymentagentListResponse>
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's cashier system.
Sourcepub async fn mt_5_login_list(
&self,
request: Mt5LoginListRequest,
) -> Result<Mt5LoginListResponse>
pub async fn mt_5_login_list( &self, request: Mt5LoginListRequest, ) -> Result<Mt5LoginListResponse>
Get list of MT5 accounts for client
Sourcepub async fn p_2_p_order_dispute(
&self,
request: P2pOrderDisputeRequest,
) -> Result<P2pOrderDisputeResponse>
pub async fn p_2_p_order_dispute( &self, request: P2pOrderDisputeRequest, ) -> Result<P2pOrderDisputeResponse>
Dispute a P2P order.
Sourcepub async fn tin_validations(
&self,
request: TinValidationsRequest,
) -> Result<TinValidationsResponse>
pub async fn tin_validations( &self, request: TinValidationsRequest, ) -> Result<TinValidationsResponse>
Get the validations for Tax Identification Numbers (TIN)
Sourcepub async fn p_2_p_payment_methods(
&self,
request: P2pPaymentMethodsRequest,
) -> Result<P2pPaymentMethodsResponse>
pub async fn p_2_p_payment_methods( &self, request: P2pPaymentMethodsRequest, ) -> Result<P2pPaymentMethodsResponse>
List all P2P payment methods.
Sourcepub async fn p_2_p_order_review(
&self,
request: P2pOrderReviewRequest,
) -> Result<P2pOrderReviewResponse>
pub async fn p_2_p_order_review( &self, request: P2pOrderReviewRequest, ) -> Result<P2pOrderReviewResponse>
Creates a review for the specified order.
Sourcepub async fn set_settings(
&self,
request: SetSettingsRequest,
) -> Result<SetSettingsResponse>
pub async fn set_settings( &self, request: SetSettingsRequest, ) -> Result<SetSettingsResponse>
Set User Settings (this call should be used in conjunction with `get_settings`)
Sourcepub async fn p_2_p_order_list(
&self,
request: P2pOrderListRequest,
) -> Result<P2pOrderListResponse>
pub async fn p_2_p_order_list( &self, request: P2pOrderListRequest, ) -> Result<P2pOrderListResponse>
List active orders.
Sourcepub async fn contracts_for_company(
&self,
request: ContractsForCompanyRequest,
) -> Result<ContractsForCompanyResponse>
pub async fn contracts_for_company( &self, request: ContractsForCompanyRequest, ) -> Result<ContractsForCompanyResponse>
Get the list of currently available contracts for a given landing company.
Sourcepub async fn exchange_verification_code(
&self,
request: ExchangeVerificationCodeRequest,
) -> Result<ExchangeVerificationCodeResponse>
pub async fn exchange_verification_code( &self, request: ExchangeVerificationCodeRequest, ) -> Result<ExchangeVerificationCodeResponse>
Verifies the code and returns a new code if verification is successful
Sourcepub async fn get_account_status(
&self,
request: GetAccountStatusRequest,
) -> Result<GetAccountStatusResponse>
pub async fn get_account_status( &self, request: GetAccountStatusRequest, ) -> Result<GetAccountStatusResponse>
Get Account Status
Sourcepub async fn mt_5_password_change(
&self,
request: Mt5PasswordChangeRequest,
) -> Result<Mt5PasswordChangeResponse>
pub async fn mt_5_password_change( &self, request: Mt5PasswordChangeRequest, ) -> Result<Mt5PasswordChangeResponse>
To change passwords of the MT5 account.
Sourcepub async fn sell_expired(
&self,
request: SellExpiredRequest,
) -> Result<SellExpiredResponse>
pub async fn sell_expired( &self, request: SellExpiredRequest, ) -> Result<SellExpiredResponse>
This call will try to sell any expired contracts and return the number of sold contracts.
Sourcepub async fn partner_accounts(
&self,
request: PartnerAccountsRequest,
) -> Result<PartnerAccountsResponse>
pub async fn partner_accounts( &self, request: PartnerAccountsRequest, ) -> Result<PartnerAccountsResponse>
Get All Partner Accounts (Partner account details like website, provider, company details)
Sourcepub async fn forget_all(
&self,
request: ForgetAllRequest,
) -> Result<ForgetAllResponse>
pub async fn forget_all( &self, request: ForgetAllRequest, ) -> Result<ForgetAllResponse>
Immediately cancel the real-time streams of messages of given type.
Sourcepub async fn website_status(
&self,
request: WebsiteStatusRequest,
) -> Result<WebsiteStatusResponse>
pub async fn website_status( &self, request: WebsiteStatusRequest, ) -> Result<WebsiteStatusResponse>
Request server status.
Sourcepub async fn trading_platform_status(
&self,
request: TradingPlatformStatusRequest,
) -> Result<TradingPlatformStatusResponse>
pub async fn trading_platform_status( &self, request: TradingPlatformStatusRequest, ) -> Result<TradingPlatformStatusResponse>
Request trading platform status
Sourcepub async fn p_2_p_order_confirm(
&self,
request: P2pOrderConfirmRequest,
) -> Result<P2pOrderConfirmResponse>
pub async fn p_2_p_order_confirm( &self, request: P2pOrderConfirmRequest, ) -> Result<P2pOrderConfirmResponse>
Confirm a P2P order.
Sourcepub async fn p_2_p_chat_create(
&self,
request: P2pChatCreateRequest,
) -> Result<P2pChatCreateResponse>
pub async fn p_2_p_chat_create( &self, request: P2pChatCreateRequest, ) -> Result<P2pChatCreateResponse>
Creates a P2P chat for the specified order.
Sourcepub async fn asset_index(
&self,
request: AssetIndexRequest,
) -> Result<AssetIndexResponse>
pub async fn asset_index( &self, request: AssetIndexRequest, ) -> Result<AssetIndexResponse>
Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.
Sourcepub async fn p_2_p_advertiser_info(
&self,
request: P2pAdvertiserInfoRequest,
) -> Result<P2pAdvertiserInfoResponse>
pub async fn p_2_p_advertiser_info( &self, request: P2pAdvertiserInfoRequest, ) -> Result<P2pAdvertiserInfoResponse>
Retrieve information about a P2P advertiser.
Sourcepub async fn trading_durations(
&self,
request: TradingDurationsRequest,
) -> Result<TradingDurationsResponse>
pub async fn trading_durations( &self, request: TradingDurationsRequest, ) -> Result<TradingDurationsResponse>
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's landing company will be returned.
Sourcepub async fn statement(
&self,
request: StatementRequest,
) -> Result<StatementResponse>
pub async fn statement( &self, request: StatementRequest, ) -> Result<StatementResponse>
Retrieve a summary of account transactions, according to given search criteria
Sourcepub async fn landing_company_details(
&self,
request: LandingCompanyDetailsRequest,
) -> Result<LandingCompanyDetailsResponse>
pub async fn landing_company_details( &self, request: LandingCompanyDetailsRequest, ) -> Result<LandingCompanyDetailsResponse>
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.
Sourcepub async fn tnc_approval(
&self,
request: TncApprovalRequest,
) -> Result<TncApprovalResponse>
pub async fn tnc_approval( &self, request: TncApprovalRequest, ) -> Result<TncApprovalResponse>
To approve the latest version of terms and conditions.
Sourcepub async fn get_third_party_redirect(
&self,
request: GetThirdPartyRedirectRequest,
) -> Result<GetThirdPartyRedirectResponse>
pub async fn get_third_party_redirect( &self, request: GetThirdPartyRedirectRequest, ) -> Result<GetThirdPartyRedirectResponse>
Get Third Party Redirect URL for sso login.
Sourcepub async fn new_account_maltainvest(
&self,
request: NewAccountMaltainvestRequest,
) -> Result<NewAccountMaltainvestResponse>
pub async fn new_account_maltainvest( &self, request: NewAccountMaltainvestRequest, ) -> Result<NewAccountMaltainvestResponse>
This call opens a new real-money account with the `maltainvest` 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.
Sourcepub async fn balance(&self, request: BalanceRequest) -> Result<BalanceResponse>
pub async fn balance(&self, request: BalanceRequest) -> Result<BalanceResponse>
Get user account balance
Sourcepub async fn app_delete(
&self,
request: AppDeleteRequest,
) -> Result<AppDeleteResponse>
pub async fn app_delete( &self, request: AppDeleteRequest, ) -> Result<AppDeleteResponse>
The request for deleting an application.
Sourcepub async fn p_2_p_order_info(
&self,
request: P2pOrderInfoRequest,
) -> Result<P2pOrderInfoResponse>
pub async fn p_2_p_order_info( &self, request: P2pOrderInfoRequest, ) -> Result<P2pOrderInfoResponse>
Retrieves the information about a P2P order.
Sourcepub async fn logout(&self, request: LogoutRequest) -> Result<LogoutResponse>
pub async fn logout(&self, request: LogoutRequest) -> Result<LogoutResponse>
Logout the session
Sourcepub async fn app_update(
&self,
request: AppUpdateRequest,
) -> Result<AppUpdateResponse>
pub async fn app_update( &self, request: AppUpdateRequest, ) -> Result<AppUpdateResponse>
Update a new OAuth application
Sourcepub async fn partner_account_creation_status(
&self,
request: PartnerAccountCreationStatusRequest,
) -> Result<PartnerAccountCreationStatusResponse>
pub async fn partner_account_creation_status( &self, request: PartnerAccountCreationStatusRequest, ) -> Result<PartnerAccountCreationStatusResponse>
This call polls the state machine and returns the completion status for each step.
Sourcepub async fn set_financial_assessment(
&self,
request: SetFinancialAssessment,
) -> Result<SetFinancialAssessmentResponse>
pub async fn set_financial_assessment( &self, request: SetFinancialAssessment, ) -> Result<SetFinancialAssessmentResponse>
This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.
Sourcepub async fn p_2_p_advertiser_relations(
&self,
request: P2pAdvertiserRelationsRequest,
) -> Result<P2pAdvertiserRelationsResponse>
pub async fn p_2_p_advertiser_relations( &self, request: P2pAdvertiserRelationsRequest, ) -> Result<P2pAdvertiserRelationsResponse>
Updates and returns favourite and blocked advertisers of the current user.
Sourcepub async fn kyc_auth_status(
&self,
request: KycAuthStatusRequest,
) -> Result<KycAuthStatusResponse>
pub async fn kyc_auth_status( &self, request: KycAuthStatusRequest, ) -> Result<KycAuthStatusResponse>
Get KYC Authentication Status
Sourcepub async fn mt_5_get_settings(
&self,
request: Mt5GetSettingsRequest,
) -> Result<Mt5GetSettingsResponse>
pub async fn mt_5_get_settings( &self, request: Mt5GetSettingsRequest, ) -> Result<Mt5GetSettingsResponse>
Get MT5 user account settings
Sourcepub async fn reality_check(
&self,
request: RealityCheckRequest,
) -> Result<RealityCheckResponse>
pub async fn reality_check( &self, request: RealityCheckRequest, ) -> Result<RealityCheckResponse>
Retrieve summary of client's trades and account for the Reality Check facility. A 'reality check' 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.
Sourcepub async fn app_list(&self, request: AppListRequest) -> Result<AppListResponse>
pub async fn app_list(&self, request: AppListRequest) -> Result<AppListResponse>
List all of the account's OAuth applications
Sourcepub async fn revoke_oauth_app(
&self,
request: RevokeOauthAppRequest,
) -> Result<RevokeOauthAppResponse>
pub async fn revoke_oauth_app( &self, request: RevokeOauthAppRequest, ) -> Result<RevokeOauthAppResponse>
Used for revoking access of particular app.
Sourcepub async fn time(&self, request: TimeRequest) -> Result<TimeResponse>
pub async fn time(&self, request: TimeRequest) -> Result<TimeResponse>
Request back-end server epoch time.
Sourcepub async fn crypto_config(
&self,
request: CryptoConfigRequest,
) -> Result<CryptoConfigResponse>
pub async fn crypto_config( &self, request: CryptoConfigRequest, ) -> Result<CryptoConfigResponse>
The request for cryptocurrencies configuration.
Sourcepub async fn document_upload(
&self,
request: DocumentUploadRequest,
) -> Result<DocumentUploadResponse>
pub async fn document_upload( &self, request: DocumentUploadRequest, ) -> Result<DocumentUploadResponse>
Request KYC information from client
Sourcepub async fn confirm_email(
&self,
request: ConfirmEmailRequest,
) -> Result<ConfirmEmailResponse>
pub async fn confirm_email( &self, request: ConfirmEmailRequest, ) -> Result<ConfirmEmailResponse>
Verifies the email for the user using verification code passed in the request object
Sourcepub async fn landing_company(
&self,
request: LandingCompanyRequest,
) -> Result<LandingCompanyResponse>
pub async fn landing_company( &self, request: LandingCompanyRequest, ) -> Result<LandingCompanyResponse>
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).
Sourcepub async fn oauth_apps(
&self,
request: OauthAppsRequest,
) -> Result<OauthAppsResponse>
pub async fn oauth_apps( &self, request: OauthAppsRequest, ) -> Result<OauthAppsResponse>
List all my used OAuth applications.
Sourcepub async fn crypto_estimations(
&self,
request: CryptoEstimationsRequest,
) -> Result<CryptoEstimations>
pub async fn crypto_estimations( &self, request: CryptoEstimationsRequest, ) -> Result<CryptoEstimations>
Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.
Sourcepub async fn copy_start(
&self,
request: CopyStartRequest,
) -> Result<CopyStartResponse>
pub async fn copy_start( &self, request: CopyStartRequest, ) -> Result<CopyStartResponse>
Start copy trader bets
Sourcepub async fn proposal(
&self,
request: ProposalRequest,
) -> Result<ProposalResponse>
pub async fn proposal( &self, request: ProposalRequest, ) -> Result<ProposalResponse>
Gets latest price for a specific contract.
Sourcepub async fn login_history(
&self,
request: LoginHistoryRequest,
) -> Result<LoginHistoryResponse>
pub async fn login_history( &self, request: LoginHistoryRequest, ) -> Result<LoginHistoryResponse>
Retrieve a summary of login history for user.
Sourcepub async fn mt_5_password_check(
&self,
request: Mt5PasswordCheckRequest,
) -> Result<Mt5PasswordCheckResponse>
pub async fn mt_5_password_check( &self, request: Mt5PasswordCheckRequest, ) -> Result<Mt5PasswordCheckResponse>
This call validates the main password for the MT5 user
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.
Sourcepub async fn p_2_p_country_list(
&self,
request: P2pCountryListRequest,
) -> Result<P2pCountryListResponse>
pub async fn p_2_p_country_list( &self, request: P2pCountryListRequest, ) -> Result<P2pCountryListResponse>
List all or specific country and its payment methods.
Sourcepub async fn paymentagent_withdraw(
&self,
request: PaymentagentWithdrawRequest,
) -> Result<PaymentagentWithdrawResponse>
pub async fn paymentagent_withdraw( &self, request: PaymentagentWithdrawRequest, ) -> Result<PaymentagentWithdrawResponse>
Initiate a withdrawal to an approved Payment Agent.
Sourcepub async fn app_register(
&self,
request: AppRegisterRequest,
) -> Result<AppRegisterResponse>
pub async fn app_register( &self, request: AppRegisterRequest, ) -> Result<AppRegisterResponse>
Register a new OAuth application
Sourcepub async fn active_symbols(
&self,
request: ActiveSymbolsRequest,
) -> Result<ActiveSymbolsResponse>
pub async fn active_symbols( &self, request: ActiveSymbolsRequest, ) -> Result<ActiveSymbolsResponse>
Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).
Sourcepub async fn ticks_history(
&self,
request: TicksHistoryRequest,
) -> Result<TicksHistoryResponse>
pub async fn ticks_history( &self, request: TicksHistoryRequest, ) -> Result<TicksHistoryResponse>
Get historic tick data for a given symbol.
Sourcepub async fn mt_5_new_account(
&self,
request: Mt5NewAccountRequest,
) -> Result<Mt5NewAccountResponse>
pub async fn mt_5_new_account( &self, request: Mt5NewAccountRequest, ) -> Result<Mt5NewAccountResponse>
This call creates new MT5 user, either demo or real money user.
Sourcepub async fn payout_currencies(
&self,
request: PayoutCurrenciesRequest,
) -> Result<PayoutCurrenciesResponse>
pub async fn payout_currencies( &self, request: PayoutCurrenciesRequest, ) -> Result<PayoutCurrenciesResponse>
Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.
Sourcepub async fn portfolio(
&self,
request: PortfolioRequest,
) -> Result<PortfolioResponse>
pub async fn portfolio( &self, request: PortfolioRequest, ) -> Result<PortfolioResponse>
Receive information about my current portfolio of outstanding options
Sourcepub async fn copy_stop(
&self,
request: CopyStopRequest,
) -> Result<CopyStopResponse>
pub async fn copy_stop( &self, request: CopyStopRequest, ) -> Result<CopyStopResponse>
Stop copy trader bets
Sourcepub async fn copytrading_list(
&self,
request: CopytradingListRequest,
) -> Result<CopytradingListResponse>
pub async fn copytrading_list( &self, request: CopytradingListRequest, ) -> Result<CopytradingListResponse>
Retrieves a list of active copiers and/or traders for Copy Trading
Sourcepub async fn app_markup_details(
&self,
request: AppMarkupDetailsRequest,
) -> Result<AppMarkupDetailsResponse>
pub async fn app_markup_details( &self, request: AppMarkupDetailsRequest, ) -> Result<AppMarkupDetailsResponse>
Retrieve details of `app_markup` according to criteria specified.
Sourcepub async fn partner_settings(
&self,
request: PartnerSettingsRequest,
) -> Result<PartnerSettingsResponse>
pub async fn partner_settings( &self, request: PartnerSettingsRequest, ) -> Result<PartnerSettingsResponse>
Get Partner Settings (Partner Type, Company Details etc)
Sourcepub async fn paymentagent_details(
&self,
request: PaymentagentDetailsRequest,
) -> Result<PaymentagentDetailsResponse>
pub async fn paymentagent_details( &self, request: PaymentagentDetailsRequest, ) -> Result<PaymentagentDetailsResponse>
Gets client's payment agent details.
Sourcepub async fn residence_list(
&self,
request: ResidenceListRequest,
) -> Result<ResidenceListResponse>
pub async fn residence_list( &self, request: ResidenceListRequest, ) -> Result<ResidenceListResponse>
This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.
Sourcepub async fn forget(&self, request: ForgetRequest) -> Result<ForgetResponse>
pub async fn forget(&self, request: ForgetRequest) -> Result<ForgetResponse>
Immediately cancel the real-time stream of messages with a specific ID.
Sourcepub async fn api_token(
&self,
request: ApiTokenRequest,
) -> Result<ApiTokenResponse>
pub async fn api_token( &self, request: ApiTokenRequest, ) -> Result<ApiTokenResponse>
This call manages API tokens
Sourcepub async fn account_list(
&self,
request: AccountListRequest,
) -> Result<AccountListResponse>
pub async fn account_list( &self, request: AccountListRequest, ) -> Result<AccountListResponse>
Returns all accounts belonging to the authorized user.
Sourcepub async fn paymentagent_create(
&self,
request: PaymentagentCreateRequest,
) -> Result<PaymentagentCreateResponse>
pub async fn paymentagent_create( &self, request: PaymentagentCreateRequest, ) -> Result<PaymentagentCreateResponse>
Saves client's payment agent details.
Sourcepub async fn identity_verification_document_add(
&self,
request: IdentityVerificationDocumentAddRequest,
) -> Result<IdentityVerificationDocumentAddResponse>
pub async fn identity_verification_document_add( &self, request: IdentityVerificationDocumentAddRequest, ) -> Result<IdentityVerificationDocumentAddResponse>
Adds document information such as issuing country, id and type for identity verification processes.
Sourcepub async fn get_financial_assessment(
&self,
request: GetFinancialAssessmentRequest,
) -> Result<GetFinancialAssessmentResponse>
pub async fn get_financial_assessment( &self, request: GetFinancialAssessmentRequest, ) -> Result<GetFinancialAssessmentResponse>
This call gets the financial assessment details. The 'financial assessment' is a questionnaire that clients of certain Landing Companies need to complete, due to regulatory and KYC (know your client) requirements.
Sourcepub async fn mt_5_withdrawal(
&self,
request: Mt5WithdrawalRequest,
) -> Result<Mt5WithdrawalResponse>
pub async fn mt_5_withdrawal( &self, request: Mt5WithdrawalRequest, ) -> Result<Mt5WithdrawalResponse>
This call allows withdrawal from MT5 account to Binary account.
Sourcepub async fn app_get(&self, request: AppGetRequest) -> Result<AppGetResponse>
pub async fn app_get(&self, request: AppGetRequest) -> Result<AppGetResponse>
To get the information of the OAuth application specified by 'app_id'
Sourcepub async fn profit_table(
&self,
request: ProfitTableRequest,
) -> Result<ProfitTableResponse>
pub async fn profit_table( &self, request: ProfitTableRequest, ) -> Result<ProfitTableResponse>
Retrieve a summary of account Profit Table, according to given search criteria
Sourcepub async fn p_2_p_advert_update(
&self,
request: P2pAdvertUpdateRequest,
) -> Result<P2pAdvertUpdateResponse>
pub async fn p_2_p_advert_update( &self, request: P2pAdvertUpdateRequest, ) -> Result<P2pAdvertUpdateResponse>
Updates a P2P advert. Can only be used by the advertiser.
Sourcepub async fn contracts_for(
&self,
request: ContractsForRequest,
) -> Result<ContractsForResponse>
pub async fn contracts_for( &self, request: ContractsForRequest, ) -> Result<ContractsForResponse>
For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.
Sourcepub async fn verify_email(
&self,
request: VerifyEmailRequest,
) -> Result<VerifyEmailResponse>
pub async fn verify_email( &self, request: VerifyEmailRequest, ) -> Result<VerifyEmailResponse>
Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.
Sourcepub async fn trading_servers(
&self,
request: TradingServersRequest,
) -> Result<TradingServersResponse>
pub async fn trading_servers( &self, request: TradingServersRequest, ) -> Result<TradingServersResponse>
Get the list of servers for a trading platform.
Sourcepub async fn new_account_virtual(
&self,
request: NewAccountVirtualRequest,
) -> Result<NewAccountVirtualResponse>
pub async fn new_account_virtual( &self, request: NewAccountVirtualRequest, ) -> Result<NewAccountVirtualResponse>
Create a new virtual-money account.
Sourcepub async fn payment_methods(
&self,
request: PaymentMethodsRequest,
) -> Result<PaymentMethodsResponse>
pub async fn payment_methods( &self, request: PaymentMethodsRequest, ) -> Result<PaymentMethodsResponse>
Will return a list payment methods available for the given country. If the request is authenticated the client's residence country will be used.
Sourcepub async fn buy(&self, request: BuyRequest) -> Result<BuyResponse>
pub async fn buy(&self, request: BuyRequest) -> Result<BuyResponse>
Buy a Contract
Sourcepub async fn trading_times(
&self,
request: TradingTimesRequest,
) -> Result<TradingTimesResponse>
pub async fn trading_times( &self, request: TradingTimesRequest, ) -> Result<TradingTimesResponse>
Receive a list of market opening times for a given date.
Sourcepub async fn proposal_open_contract(
&self,
request: ProposalOpenContractRequest,
) -> Result<ProposalOpenContractResponse>
pub async fn proposal_open_contract( &self, request: ProposalOpenContractRequest, ) -> Result<ProposalOpenContractResponse>
Get latest price (and other information) for a contract in the user's portfolio
Sourcepub async fn mt_5_deposit(
&self,
request: Mt5DepositRequest,
) -> Result<Mt5DepositResponse>
pub async fn mt_5_deposit( &self, request: Mt5DepositRequest, ) -> Result<Mt5DepositResponse>
This call allows deposit into MT5 account from Binary account.
Sourcepub async fn p_2_p_order_cancel(
&self,
request: P2pOrderCancelRequest,
) -> Result<P2pOrderCancelResponse>
pub async fn p_2_p_order_cancel( &self, request: P2pOrderCancelRequest, ) -> Result<P2pOrderCancelResponse>
Cancel a P2P order.
Sourcepub async fn new_partner_account(
&self,
request: NewPartnerAccountRequest,
) -> Result<NewPartnerAccountResponse>
pub async fn new_partner_account( &self, request: NewPartnerAccountRequest, ) -> Result<NewPartnerAccountResponse>
This call opens a new Real-Partner Account
Sourcepub async fn exchange_rates(
&self,
request: ExchangeRatesRequest,
) -> Result<ExchangeRatesResponse>
pub async fn exchange_rates( &self, request: ExchangeRatesRequest, ) -> Result<ExchangeRatesResponse>
Retrieves the exchange rate from a base currency to a target currency supported by the system.
Sourcepub async fn app_markup_statistics(
&self,
request: AppMarkupStatisticsRequest,
) -> Result<AppMarkupStatisticsResponse>
pub async fn app_markup_statistics( &self, request: AppMarkupStatisticsRequest, ) -> Result<AppMarkupStatisticsResponse>
Retrieve statistics of `app_markup`.
Sourcepub async fn p_2_p_advertiser_create(
&self,
request: P2pAdvertiserCreateRequest,
) -> Result<P2pAdvertiserCreateResponse>
pub async fn p_2_p_advertiser_create( &self, request: P2pAdvertiserCreateRequest, ) -> Result<P2pAdvertiserCreateResponse>
Registers the client as a P2P advertiser.
Sourcepub async fn set_self_exclusion(
&self,
request: SetSelfExclusionRequest,
) -> Result<SetSelfExclusionResponse>
pub async fn set_self_exclusion( &self, request: SetSelfExclusionRequest, ) -> Result<SetSelfExclusionResponse>
Set Self-Exclusion (this call should be used in conjunction with `get_self_exclusion`)
Sourcepub async fn economic_calendar(
&self,
request: EconomicCalendarRequest,
) -> Result<EconomicCalendarResponse>
pub async fn economic_calendar( &self, request: EconomicCalendarRequest, ) -> Result<EconomicCalendarResponse>
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.
Sourcepub async fn get_self_exclusion(
&self,
request: GetSelfExclusionRequest,
) -> Result<GetSelfExclusionResponse>
pub async fn get_self_exclusion( &self, request: GetSelfExclusionRequest, ) -> Result<GetSelfExclusionResponse>
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.
Sourcepub async fn set_account_currency(
&self,
request: SetAccountCurrencyRequest,
) -> Result<SetAccountCurrencyResponse>
pub async fn set_account_currency( &self, request: SetAccountCurrencyRequest, ) -> Result<SetAccountCurrencyResponse>
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.
Source§impl DerivClient
impl DerivClient
Sourcepub async fn subscribe_p_2_p_order_create(
&self,
request: P2pOrderCreateRequest,
) -> Result<(P2pOrderCreateResponse, Subscription<P2pOrderInfoResponse>)>
pub async fn subscribe_p_2_p_order_create( &self, request: P2pOrderCreateRequest, ) -> Result<(P2pOrderCreateResponse, Subscription<P2pOrderInfoResponse>)>
Subscribe to Creates a P2P order for the specified advert.
Sourcepub async fn subscribe_transaction(
&self,
request: TransactionRequest,
) -> Result<(TransactionResponse, Subscription<TransactionResponse>)>
pub async fn subscribe_transaction( &self, request: TransactionRequest, ) -> Result<(TransactionResponse, Subscription<TransactionResponse>)>
Subscribe to Subscribe to transaction notifications
Sourcepub async fn subscribe_ticks_batch(
&self,
request: TicksBatchRequest,
) -> Result<(TicksBatchResponse, Subscription<TicksBatchResponse>)>
pub async fn subscribe_ticks_batch( &self, request: TicksBatchRequest, ) -> Result<(TicksBatchResponse, Subscription<TicksBatchResponse>)>
Subscribe to Initiate a continuous stream of spot price updates for a group symbols.
Sourcepub async fn subscribe_ticks(
&self,
request: TicksRequest,
) -> Result<(TicksResponse, Subscription<TicksResponse>)>
pub async fn subscribe_ticks( &self, request: TicksRequest, ) -> Result<(TicksResponse, Subscription<TicksResponse>)>
Subscribe to Initiate a continuous stream of spot price updates for a given symbol.
Sourcepub async fn subscribe_p_2_p_advert_info(
&self,
request: P2pAdvertInfoRequest,
) -> Result<(P2pAdvertInfoResponse, Subscription<P2pAdvertInfoResponse>)>
pub async fn subscribe_p_2_p_advert_info( &self, request: P2pAdvertInfoRequest, ) -> Result<(P2pAdvertInfoResponse, Subscription<P2pAdvertInfoResponse>)>
Subscribe to Retrieve information about a P2P advert.
Sourcepub async fn subscribe_p_2_p_settings(
&self,
request: P2pSettingsRequest,
) -> Result<(P2pSettingsResponse, Subscription<P2pSettingsResponse>)>
pub async fn subscribe_p_2_p_settings( &self, request: P2pSettingsRequest, ) -> Result<(P2pSettingsResponse, Subscription<P2pSettingsResponse>)>
Subscribe to Request P2P Settings information.
Sourcepub async fn subscribe_p_2_p_order_list(
&self,
request: P2pOrderListRequest,
) -> Result<(P2pOrderListResponse, Subscription<P2pOrderInfoResponse>)>
pub async fn subscribe_p_2_p_order_list( &self, request: P2pOrderListRequest, ) -> Result<(P2pOrderListResponse, Subscription<P2pOrderInfoResponse>)>
Subscribe to List active orders.
Sourcepub async fn subscribe_website_status(
&self,
request: WebsiteStatusRequest,
) -> Result<(WebsiteStatusResponse, Subscription<WebsiteStatusResponse>)>
pub async fn subscribe_website_status( &self, request: WebsiteStatusRequest, ) -> Result<(WebsiteStatusResponse, Subscription<WebsiteStatusResponse>)>
Subscribe to Request server status.
Sourcepub async fn subscribe_p_2_p_advertiser_info(
&self,
request: P2pAdvertiserInfoRequest,
) -> Result<(P2pAdvertiserInfoResponse, Subscription<P2pAdvertiserInfoResponse>)>
pub async fn subscribe_p_2_p_advertiser_info( &self, request: P2pAdvertiserInfoRequest, ) -> Result<(P2pAdvertiserInfoResponse, Subscription<P2pAdvertiserInfoResponse>)>
Subscribe to Retrieve information about a P2P advertiser.
Sourcepub async fn subscribe_balance(
&self,
request: BalanceRequest,
) -> Result<(BalanceResponse, Subscription<BalanceResponse>)>
pub async fn subscribe_balance( &self, request: BalanceRequest, ) -> Result<(BalanceResponse, Subscription<BalanceResponse>)>
Subscribe to Get user account balance
Sourcepub async fn subscribe_p_2_p_order_info(
&self,
request: P2pOrderInfoRequest,
) -> Result<(P2pOrderInfoResponse, Subscription<P2pOrderInfoResponse>)>
pub async fn subscribe_p_2_p_order_info( &self, request: P2pOrderInfoRequest, ) -> Result<(P2pOrderInfoResponse, Subscription<P2pOrderInfoResponse>)>
Subscribe to Retrieves the information about a P2P order.
Sourcepub async fn subscribe_crypto_estimations(
&self,
request: CryptoEstimationsRequest,
) -> Result<(CryptoEstimations, Subscription<CryptoEstimations>)>
pub async fn subscribe_crypto_estimations( &self, request: CryptoEstimationsRequest, ) -> Result<(CryptoEstimations, Subscription<CryptoEstimations>)>
Subscribe to Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.
Sourcepub async fn subscribe_proposal(
&self,
request: ProposalRequest,
) -> Result<(ProposalResponse, Subscription<ProposalResponse>)>
pub async fn subscribe_proposal( &self, request: ProposalRequest, ) -> Result<(ProposalResponse, Subscription<ProposalResponse>)>
Subscribe to Gets latest price for a specific contract.
Sourcepub async fn subscribe_ticks_history(
&self,
request: TicksHistoryRequest,
) -> Result<(TicksHistoryResponse, Subscription<TicksHistoryResponse>)>
pub async fn subscribe_ticks_history( &self, request: TicksHistoryRequest, ) -> Result<(TicksHistoryResponse, Subscription<TicksHistoryResponse>)>
Subscribe to Get historic tick data for a given symbol.
Sourcepub async fn subscribe_buy(
&self,
request: BuyRequest,
) -> Result<(BuyResponse, Subscription<ProposalOpenContractResponse>)>
pub async fn subscribe_buy( &self, request: BuyRequest, ) -> Result<(BuyResponse, Subscription<ProposalOpenContractResponse>)>
Subscribe to Buy a Contract
Sourcepub async fn subscribe_proposal_open_contract(
&self,
request: ProposalOpenContractRequest,
) -> Result<(ProposalOpenContractResponse, Subscription<ProposalOpenContractResponse>)>
pub async fn subscribe_proposal_open_contract( &self, request: ProposalOpenContractRequest, ) -> Result<(ProposalOpenContractResponse, Subscription<ProposalOpenContractResponse>)>
Subscribe to Get latest price (and other information) for a contract in the user’s portfolio
Sourcepub async fn subscribe_exchange_rates(
&self,
request: ExchangeRatesRequest,
) -> Result<(ExchangeRatesResponse, Subscription<ExchangeRatesResponse>)>
pub async fn subscribe_exchange_rates( &self, request: ExchangeRatesRequest, ) -> Result<(ExchangeRatesResponse, Subscription<ExchangeRatesResponse>)>
Subscribe to Retrieves the exchange rate from a base currency to a target currency supported by the system.
Sourcepub async fn subscribe_p_2_p_advertiser_create(
&self,
request: P2pAdvertiserCreateRequest,
) -> Result<(P2pAdvertiserCreateResponse, Subscription<P2pAdvertInfoResponse>)>
pub async fn subscribe_p_2_p_advertiser_create( &self, request: P2pAdvertiserCreateRequest, ) -> Result<(P2pAdvertiserCreateResponse, Subscription<P2pAdvertInfoResponse>)>
Subscribe to Registers the client as a P2P advertiser.
Source§impl DerivClient
impl DerivClient
Sourcepub fn new(
endpoint: &str,
app_id: i32,
language: &str,
origin: &str,
config: Option<ClientConfig>,
) -> Result<Self>
pub fn new( endpoint: &str, app_id: i32, language: &str, origin: &str, config: Option<ClientConfig>, ) -> Result<Self>
Creates a new instance of DerivClient
Sourcepub async fn disconnect(&mut self)
pub async fn disconnect(&mut self)
Disconnects from the Deriv WebSocket API
Sourcepub async fn send_request<T, R>(&self, request: &T) -> Result<R>
pub async fn send_request<T, R>(&self, request: &T) -> Result<R>
Sends a request to the Deriv API and receives a response
Sourcepub async fn create_subscription<T, R, S>(
&self,
request: &mut T,
msg_type: &str,
) -> Result<(R, Subscription<S>)>
pub async fn create_subscription<T, R, S>( &self, request: &mut T, msg_type: &str, ) -> Result<(R, Subscription<S>)>
Creates a subscription from a subscription-enabled API
Trait Implementations§
Source§impl Clone for DerivClient
impl Clone for DerivClient
Source§fn clone(&self) -> DerivClient
fn clone(&self) -> DerivClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more