Binary-Com - Github.io-Module Deriv - Apideriv - Api - Calls
Binary-Com - Github.io-Module Deriv - Apideriv - Api - Calls
deriv_api_calls
binary-com.github.io/python-deriv-api/deriv_api_calls.html
Parameters:
Parameters:
Parameters:
1/68
args : dict with following keys
account_statistics : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
2/68
args : dict with following keys
address_city : str
City name within 50 characters.
address_line_1 : str
Within 70 characters, with no leading whitespaces and may contain
letters/numbers and/or any of following characters '.,:;()@#/-
address_line_2 : str
[Optional] Within 70 characters.
address_postcode : str
Within 20 characters and may not contain '+'.
address_state : str
Possible value receive from states_list call.
affiliate_account_add : int
[Required] Must be 1
country : str
Country of legal citizenship, 2-letter country code.
first_name : str
The official first name of the affiliate. Within 2-50 characters, use only
letters, spaces, hyphens, full-stops or apostrophes.
last_name : str
The official last name of the affiliate. Within 2-50 characters, use only
letters, spaces, hyphens, full-stops or apostrophes.
non_pep_declaration : int
Indicates client's self-declaration of not being a PEP/RCA (Politically
Exposed Person/Relatives and Close Associates).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
password : str
Password for the affiliate account. (Accepts any printable ASCII
character. Must be between 6-50 characters, and include numbers, lowercase and
uppercase letters.).
phone : str
Registered phone number of the affiliate. Starting with + followed by 8-35
digits, allowing hyphens or space.
req_id : int
[Optional] Used to map request to response.
tnc_accepted : int
Indicates client has agreed to the terms and conditions.
username : str
Desired username for the affiliate account. Within 2-50 characters, use
only letters, spaces, hyphens, full-stops or apostrophes.
Parameters:
3/68
args : dict with following keys
api_token : int
Must be 1
delete_token : str
[Optional] The token to remove.
new_token : str
[Optional] The name of the created token.
new_token_scopes : Any
[Optional] List of permission scopes to provide with the token.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
valid_for_current_ip_only : int
[Optional] If you set this parameter during token creation, then the token
created will only work for the IP address that was used to create the token
Parameters:
Parameters:
args : dict with following keys
app_get : int
Application app_id
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
4/68
args : dict with following keys
app_list : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
app_id : int
[Optional] Specific application app_id to report on.
app_markup_details : int
Must be 1
client_loginid : str
[Optional] Specific client loginid to report on, like CR12345
date_from : str
Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this
time.
date_to : str
End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this
time.
description : int
[Optional] If set to 1, will return app_markup transaction details.
limit : Number
[Optional] Apply upper limit to count of transactions received.
offset : Number
[Optional] Number of transactions to skip.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
sort : str
[Optional] Sort direction on transaction_time. Other fields sort order is
ASC.
sort_fields : Any
[Optional] One or more of the specified fields to sort on. Default sort
field is by transaction_time.
Parameters:
5/68
args : dict with following keys
app_markup_percentage : Number
[Optional] Markup to be added to contract prices (as a percentage of
contract payout).
app_register : int
Must be 1
appstore : str
[Optional] Application's App Store URL (if applicable).
github : str
[Optional] Application's GitHub page (for open-source projects).
googleplay : str
[Optional] Application's Google Play URL (if applicable).
homepage : str
[Optional] Application's homepage URL.
name : str
Application name.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
redirect_uri : str
[Optional] The URL to redirect to after a successful login. Required if
charging markup percentage
req_id : int
[Optional] Used to map request to response.
scopes : Any
List of permission scopes to grant the application.
verification_uri : str
[Optional] Used when verify_email called. If available, a URL containing
the verification token will be sent to the client's email, otherwise only the
token will be sent.
Parameters:
6/68
args : dict with following keys
app_markup_percentage : Number
[Optional] Markup to be added to contract prices (as a percentage of
contract payout).
app_update : int
Application app_id.
appstore : str
[Optional] Application's App Store URL (if applicable).
github : str
[Optional] Application's GitHub page (for open-source projects).
googleplay : str
[Optional] Application's Google Play URL (if applicable).
homepage : str
[Optional] Application's homepage URL.
name : str
Application name.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
redirect_uri : str
[Optional] The URL to redirect to after a successful login. Required if
charging markup percentage.
req_id : int
[Optional] Used to map request to response.
scopes : Any
Change scopes will revoke all user's grants and log them out.
verification_uri : str
[Optional] Used when verify_email called. If available, a URL containing
the verification token will send to the client's email, otherwise only the token
will be sent.
Parameters:
7/68
Parameters:
Parameters:
Parameters:
8/68
args : dict with following keys
buy : str
Either the ID received from a Price Proposal (proposal call), or 1 if
contract buy parameters are passed in the parameters field.
parameters : Any
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
price : Number
Maximum price at which to purchase the contract.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] 1 to stream.
Parameters:
args : dict with following keys
buy_contract_for_multiple_accounts : str
Either the ID received from a Price Proposal (proposal call), or 1 if
contract buy parameters are passed in the parameters field.
parameters : Any
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
price : Number
Maximum price at which to purchase the contract.
req_id : int
[Optional] Used to map request to response.
tokens : Any
List of API tokens identifying the accounts for which the contract is
bought. Note: If the same token appears multiple times or if multiple tokens
designate the same account, the contract is bought multiple times for this
account.
Parameters:
9/68
async def cashier(self, args=None)
Request the cashier info for the specified type.
Parameters:
Parameters:
10/68
Request for cancelling a withdrawal. This can only be used for crypto transactions.
Parameters:
Parameters:
Parameters:
11/68
args : dict with following keys
change_password : Number
Must be 1
new_password : str
New password (Accepts any printable ASCII character. Must be within 8-25
characters, and include numbers, lowercase and uppercase letters. Must not be the
same as the user's email address)
old_password : str
Old password for validation (non-empty string, accepts any printable ASCII
character)
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
args : dict with following keys
contract_id : int
Internal unique contract identifier.
contract_update_history : int
Must be 1
limit : Number
[Optional] Maximum number of historical updates to receive.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
12/68
For a given symbol, get the list of currently available contracts, and the latest barrier and
duration limits for each contract.
Parameters:
args : dict with following keys
contracts_for : str
The short symbol name (obtained from active_symbols call).
currency : str
[Optional] Currency of the contract's stake and payout (obtained from
payout_currencies call).
landing_company : str
[Optional] Indicates which landing company to get a list of contracts for.
If you are logged in, your account's landing company will override this field.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
product_type : str
[Optional] If you specify this field, only contracts tradable through that
contract type will be returned.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
assets : Any
[Optional] Used to set assets to be copied. E.x ["frxUSDJPY", "R_50"]
copy_start : str
API tokens identifying the accounts of trader which will be used to copy
trades
max_trade_stake : Number
[Optional] Used to set maximum trade stake to be copied.
min_trade_stake : Number
[Optional] Used to set minimal trade stake to be copied.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
trade_types : Any
[Optional] Used to set trade types to be copied. E.x ["CALL", "PUT"]
Parameters:
13/68
args : dict with following keys
copy_stop : str
API tokens identifying the accounts which needs not to be copied
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
copytrading_list : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
copytrading_statistics : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
trader_id : str
The ID of the target trader.
Parameters:
14/68
args : dict with following keys
crypto_config : int
Must be 1
currency_code : str
[Optional] Cryptocurrency code. Sending request with currency_code
provides crypto config for the sent cryptocurrency code only.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
15/68
Parameters:
Parameters:
args : dict with following keys
base_currency : str
Base currency (can be obtained from payout_currencies call)
exchange_rates : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] 1 - to initiate a realtime stream of exchange rates relative to
base currency.
target_currency : str
[Optional] Local currency
Parameters:
16/68
async def forget_all(self, args=None)
Immediately cancel the real-time streams of messages of given type.
Parameters:
Parameters:
args : dict with following keys
get_account_status : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
get_account_types : Number
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
17/68
args : dict with following keys
get_available_accounts_to_transfer : Number
Must be 1
loginid : str
The unique identifier for this trading/wallet account.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
get_financial_assessment : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
18/68
args : dict with following keys
get_self_exclusion : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
Parameters:
19/68
args : dict with following keys
landing_company : str
Client's 2-letter country code (obtained from residence_list call).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
Parameters:
20/68
args : dict with following keys
limit : int
[Optional] Apply limit to count of login history records.
login_history : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
logout : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
amount : Number
Amount to deposit (in the currency of from_binary); min = $1 or an
equivalent amount, max = $20000 or an equivalent amount
from_binary : str
Binary account loginid to transfer money from
mt5_deposit : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
to_mt5 : str
MT5 account login to deposit money to
Parameters:
21/68
args : dict with following keys
login : str
MT5 user login
mt5_get_settings : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
args : dict with following keys
mt5_login_list : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
22/68
args : dict with following keys
account_type : str
Account type. If set to 'financial', setting 'mt5_account_type' is also
required.
address : str
[Optional] The address of the user. The maximum length of this address
field is 128 characters.
city : str
[Optional] User's city of residence.
company : str
[Optional] Name of the client's company. The maximum length of the company
name is 64 characters.
country : str
[Optional] 2-letter country code (value received from residence_list
call).
currency : str
[Optional] MT5 account currency, the default value will be the qualified
account currency.
dry_run : int
[Optional] If set to 1, only validation is performed.
email : str
Email address
investPassword : str
[Optional] The investor password of the account. For validation (Accepts
any printable ASCII character. Must be within 8-25 characters, and include
numbers, lowercase and uppercase letters. Must not be the same as the user's email
address).
leverage : Number
Client leverage (from 1 to 1000).
mainPassword : str
The master password of the account. For validation (Accepts any printable
ASCII character. Must be within 8-25 characters, and include numbers, lowercase
and uppercase letters. Must not be the same as the user's email address). This
field is required.
mt5_account_category : str
[Optional] To choose whether account is conventional or not. Unavailable
for financial_stp MT5_account_type
mt5_account_type : str
[Optional] Financial: Variable spreads, High leverage. Financial STP:
Variable spreads, Medium Leverage, more products. If 'account_type' set to
'financial', setting 'mt5_account_type' is also required.
mt5_new_account : int
Must be 1
name : str
Client's name. The maximum length here is 101 characters.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
phone : str
[Optional] User's phone number.
phonePassword : str
[Optional] The user's phone password.
req_id : int
[Optional] Used to map request to response.
server : Any
[Optional] Trade server.
23/68
state : str
[Optional] User's state (region) of residence.
zipCode : str
[Optional] User's zip code.
Parameters:
Parameters:
24/68
Parameters:
Parameters:
args : dict with following keys
amount : Number
Amount to withdraw (in the currency of the MT5 account); min = $1 or an
equivalent amount, max = $20000 or an equivalent amount.
from_mt5 : str
MT5 account login to withdraw money from
mt5_withdrawal : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
to_binary : str
Binary account loginid to transfer money to
Parameters:
25/68
args : dict with following keys
accept_risk : int
Show whether client has accepted risk disclaimer.
account_opening_reason : str
[Optional] Purpose and reason for requesting the account opening.
account_turnover : str
[Optional] The anticipated account turnover.
address_city : str
Within 100 characters
address_line_1 : str
Within 70 characters, with no leading whitespaces and may contain
letters/numbers and/or any of following characters '.,:;()@#/-
address_line_2 : str
[Optional] Within 70 characters.
address_postcode : str
[Optional] Within 20 characters and may not contain '+'.
address_state : str
[Optional] Possible value receive from states_list call.
affiliate_token : str
[Optional] Affiliate token, within 32 characters.
binary_options_trading_experience : str
[Optional] Binary options trading experience.
binary_options_trading_frequency : str
[Optional] Binary options trading frequency.
cfd_trading_experience : str
[Optional] CFDs trading experience.
cfd_trading_frequency : str
[Optional] CFDs trading frequency.
citizen : str
[Optional] Country of legal citizenship, 2-letter country code. Possible
value receive from residence_list call.
client_type : str
[Optional] Indicates whether this is for a client requesting an account
with professional status.
currency : str
[Optional] To set currency of the account. List of supported currencies
can be acquired with payout_currencies call.
date_of_birth : str
Date of birth format: yyyy-mm-dd.
education_level : str
Level of Education
employment_industry : str
Industry of Employment.
employment_status : str
[Optional] Employment Status.
estimated_worth : str
Estimated Net Worth.
first_name : str
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or
apostrophes.
forex_trading_experience : str
[Optional] Forex trading experience.
forex_trading_frequency : str
[Optional] Forex trading frequency.
income_source : str
Income Source.
26/68
last_name : str
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or
apostrophes.
net_income : str
Net Annual Income.
new_account_maltainvest : int
Must be 1
non_pep_declaration : int
[Optional] Indicates client's self-declaration of not being a PEP/RCA.
occupation : str
Occupation.
other_instruments_trading_experience : str
[Optional] Trading experience in other financial instruments.
other_instruments_trading_frequency : str
[Optional] Trading frequency in other financial instruments.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
phone : Any
[Optional] Starting with + followed by 9-35 digits, hyphens or space.
place_of_birth : str
[Optional] Place of birth, 2-letter country code.
req_id : int
[Optional] Used to map request to response.
residence : str
2-letter country code, possible value receive from residence_list call.
salutation : str
Accept any value in enum list.
secret_answer : str
[Optional] Answer to secret question, within 4-50 characters.
secret_question : str
[Optional] Accept any value in enum list.
source_of_wealth : str
[Optional] Source of wealth.
tax_identification_number : str
Tax identification number. Only applicable for real money account.
Required for maltainvest landing company.
tax_residence : str
Residence for tax purpose. Comma separated iso country code if multiple
jurisdictions. Only applicable for real money account. Required for maltainvest
landing company.
Parameters:
27/68
args : dict with following keys
account_opening_reason : str
[Optional] Purpose and reason for requesting the account opening.
account_turnover : str
[Optional] The anticipated account turnover.
address_city : str
[Optional] Within 100 characters.
address_line_1 : str
Within 70 characters, with no leading whitespaces and may contain
letters/numbers and/or any of following characters '.,:;()@#/-
address_line_2 : str
[Optional] Within 70 characters.
address_postcode : str
[Optional] Within 20 characters and may not contain '+'.
address_state : str
[Optional] Possible value receive from states_list call.
affiliate_token : str
[Optional] Affiliate token, within 32 characters.
citizen : Any
[Optional] Country of legal citizenship, 2-letter country code.
client_type : str
[Optional] Indicates whether this is for a client requesting an account
with professional status.
currency : str
[Optional] To set currency of the account. List of supported currencies
can be acquired with payout_currencies call.
date_of_birth : str
Date of birth format: yyyy-mm-dd.
first_name : str
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or
apostrophes.
last_name : str
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or
apostrophes.
new_account_real : int
Must be 1
non_pep_declaration : int
[Optional] Indicates client's self-declaration of not being a PEP/RCA
(Politically Exposed Person/Relatives and Close Associates).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
phone : Any
[Optional] Starting with + followed by 9-35 digits, hyphens or space.
place_of_birth : str
[Optional] Place of birth, 2-letter country code.
req_id : int
[Optional] Used to map request to response.
residence : str
2-letter country code, possible value receive from residence_list call.
salutation : str
[Optional] Accept any value in enum list.
secret_answer : str
[Optional] Answer to secret question, within 4-50 characters. Required for
new account and existing client details will be used if client open another
account.
28/68
secret_question : str
[Optional] Accept any value in enum list. Required for new account and
existing client details will be used if client open another account.
tax_identification_number : str
[Optional] Tax identification number. Only applicable for real money
account. Required for maltainvest landing company.
tax_residence : str
[Optional] Residence for tax purpose. Comma separated iso country code if
multiple jurisdictions. Only applicable for real money account. Required for
maltainvest landing company.
Parameters:
29/68
args : dict with following keys
affiliate_token : str
[Optional] Affiliate token, within 32 characters.
client_password : str
Password (Accepts any printable ASCII character. Must be within 8-25
characters, and include numbers, lowercase and uppercase letters. Must not be the
same as the user's email address).
date_first_contact : str
[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.
email_consent : int
[Optional] Boolean value: 1 or 0, indicating whether the client has given
consent for marketing emails.
gclid_url : str
[Optional] Google Click Identifier to track source.
new_account_virtual : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
residence : str
2-letter country code (obtained from residence_list call).
signup_device : str
[Optional] Show whether user has used mobile or desktop.
type : str
Account type
utm_ad_id : Any
[Optional] Identifier of particular ad. Value must match Regex pattern to
be recorded
utm_adgroup_id : Any
[Optional] Identifier of ad group in the campaign. Value must match Regex
pattern to be recorded
utm_adrollclk_id : Any
[Optional] Unique identifier of click on AdRoll ads platform. Value must
match Regex pattern to be recorded
utm_campaign : Any
[Optional] Identifies a specific product promotion or strategic campaign
such as a spring sale or other promotions. Value must match Regex pattern to be
recorded
utm_campaign_id : Any
[Optional] Identifier of paid ad campaign. Value must match Regex pattern
to be recorded
utm_content : Any
[Optional] Used to differentiate similar content, or links within the same
ad. Value must match Regex pattern to be recorded
utm_fbcl_id : Any
[Optional] Unique identifier of click on Facebook ads platform. Value must
match Regex pattern to be recorded
utm_gl_client_id : Any
[Optional] Unique visitor identifier on Google Ads platform. Value must
match Regex pattern to be recorded
utm_medium : Any
[Optional] Identifies the medium the link was used upon such as: email,
CPC, or other methods of sharing. Value must match Regex pattern to be recorded
utm_msclk_id : Any
30/68
[Optional] Unique click identifier on Microsoft Bing ads platform. Value
must match Regex pattern to be recorded
utm_source : Any
[Optional] Identifies the source of traffic such as: search engine,
newsletter, or other referral. Value must match Regex pattern to be recorded
utm_term : Any
[Optional] Used to send information related to the campaign term like paid
search keywords. Value must match Regex pattern to be recorded
verification_code : str
Email verification code (received from a verify_email call, which must be
done first).
Parameters:
args : dict with following keys
address_city : str
[Optional] Within 35 characters.
address_line_1 : str
[Optional] Mailing address.
address_line_2 : str
[Optional] Within 70 characters.
address_postcode : str
[Optional] Within 20 characters and may not contain '+'.
address_state : str
[Optional] Possible value receive from states_list call.
currency : str
[Optional] To set currency of the account. List of supported currencies
can be acquired with payout_currencies call.
date_of_birth : str
[Optional] Date of birth format: yyyy-mm-dd.
first_name : str
[Optional] Within 2-50 characters, use only letters, spaces, hyphens,
full-stops or apostrophes.
last_name : str
[Optional] Within 2-50 characters, use only letters, spaces, hyphens,
full-stops or apostrophes.
new_account_wallet : int
Must be 1
non_pep_declaration : int
[Optional] Indicates client's self-declaration of not being a PEP/RCA
(Politically Exposed Person/Relatives and Close Associates).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_method : str
To set method which is used to transfer to/from wallet.
phone : str
[Optional] Starting with + followed by 8-35 digits, allowing hyphens or
space.
req_id : int
[Optional] Used to map request to response.
31/68
async def notification_event(self, args=None)
Notify the backend about a specific event.
Parameters:
Parameters:
args : dict with following keys
oauth_apps : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
32/68
args : dict with following keys
amount : Number
The total amount of the advert, in advertiser's account currency.
contact_info : str
[Optional] Advertiser contact information.
description : str
[Optional] General information about the advert.
local_currency : str
[Optional] Local currency for this advert. If not provided, will use the
currency of client's residence by default.
max_order_amount : Number
Maximum allowed amount for the orders of this advert, in advertiser's
account_currency. Should be more than or equal to min_order_amount
min_order_amount : Number
Minimum allowed amount for the orders of this advert, in advertiser's
account_currency. Should be less than or equal to max_order_amount.
p2p_advert_create : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_info : str
[Optional] Payment instructions.
payment_method : str
[Optional] Payment method name (deprecated).
payment_method_ids : Any
IDs of previously saved payment methods as returned from
p2p_advertiser_payment_methods, only applicable for sell ads.
payment_method_names : Any
Payment method identifiers as returned from p2p_payment_methods, only
applicable for buy ads.
rate : Number
Conversion rate from advertiser's account currency to local_currency. An
absolute rate value (fixed), or percentage offset from current market rate
(floating).
rate_type : str
Type of rate, fixed or floating.
req_id : int
[Optional] Used to map request to response.
type : str
The advertisement represents the intention to perform this action on your
Deriv account funds.
Parameters:
33/68
args : dict with following keys
id : str
[Optional] The unique identifier for this advert. Optional when subscribe
is 1. If not provided, all advertiser adverts will be subscribed.
p2p_advert_info : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] If set to 1, will send updates when changes occur. Optional
when id is provided.
use_client_limits : int
[Optional] If set to 1, the maximum order amount will be adjusted to the
current balance and turnover limits of the account.
Parameters:
34/68
args : dict with following keys
advertiser_id : str
[Optional] ID of the advertiser to list adverts for.
advertiser_name : str
[Optional] Search for advertiser by name. Partial matches will be
returned.
amount : Number
[Optional] How much to buy or sell, used to calculate prices.
counterparty_type : str
[Optional] Filter the adverts by counterparty_type.
favourites_only : int
[Optional] Only show adverts from favourite advertisers. Default is 0.
limit : int
[Optional] Used for paging.
local_currency : str
[Optional] Currency to conduct payment transaction in, defaults to the
main currency for the client's country.
offset : int
[Optional] Used for paging.
p2p_advert_list : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_method : Any
[Optional] Search by supported payment methods.
req_id : int
[Optional] Used to map request to response.
sort_by : str
[Optional] How the results are sorted.
use_client_limits : int
[Optional] If set to 1, ads that exceed this account's balance or turnover
limits will not be shown.
Parameters:
35/68
args : dict with following keys
contact_info : str
[Optional] Advertiser contact information.
delete : int
[Optional] If set to 1, permanently deletes the advert.
description : str
[Optional] General information about the advert.
id : str
The unique identifier for this advert.
is_active : int
[Optional] Activate or deactivate the advert.
local_currency : str
[Optional] Local currency for this advert.
max_order_amount : Number
[Optional] Maximum allowed amount for the orders of this advert, in
advertiser's account_currency. Should be more than or equal to min_order_amount.
min_order_amount : Number
[Optional] Minimum allowed amount for the orders of this advert, in
advertiser's account_currency. Should be less than or equal to max_order_amount.
p2p_advert_update : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_info : str
[Optional] Payment instructions.
payment_method_ids : Any
[Optional] IDs of previously saved payment methods as returned from
p2p_advertiser_payment_methods, only applicable for sell ads. Exisiting methods
will be replaced.
payment_method_names : Any
[Optional] Payment method identifiers as returned from
p2p_payment_methods, only applicable for buy ads. Exisiting methods will be
replaced.
rate : Number
[Optional] Conversion rate from advertiser's account currency to
local_currency. An absolute rate value (fixed), or percentage offset from current
market rate (floating).
rate_type : str
[Optional] Type of rate, fixed or floating.
remaining_amount : Number
[Optional] The total available amount of the advert, in advertiser's
account currency.
req_id : int
[Optional] Used to map request to response.
Parameters:
36/68
args : dict with following keys
limit : int
[Optional] Used for paging. This value will also apply to subsription
responses.
offset : int
[Optional] Used for paging. This value will also apply to subsription
responses.
p2p_advertiser_adverts : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
37/68
args : dict with following keys
id : str
[Optional] The unique identifier for this advertiser. If not provided,
returns advertiser information about the current account.
p2p_advertiser_info : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] If set to 1, will send updates whenever there is an update to
advertiser
Parameters:
args : dict with following keys
create : Any
Contains new payment method entries.
delete : Any
Contains payment methods to delete.
p2p_advertiser_payment_methods : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
update : Any
Contains payment methods to update.
Parameters:
38/68
args : dict with following keys
add_blocked : Any
IDs of advertisers to block.
add_favourites : Any
IDs of advertisers to add as favourites.
p2p_advertiser_relations : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
remove_blocked : Any
IDs of advertisers to remove from blocked.
remove_favourites : Any
IDs of advertisers to remove from favourites.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
39/68
args : dict with following keys
order_id : str
The unique identifier for the order to create the chat for.
p2p_chat_create : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
Parameters:
40/68
args : dict with following keys
advert_id : str
The unique identifier for the advert to create an order against.
amount : Number
The amount of currency to be bought or sold.
contact_info : str
[Optional] Seller contact information. Only applicable for 'sell orders'.
p2p_order_create : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_info : str
[Optional] Payment instructions, only applicable for sell orders.
payment_method_ids : Any
IDs of payment methods, only applicable for sell orders.
rate : Number
[Optional] Conversion rate from account currency to local currency, only
applicable for floating rate adverts.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] If set to 1, will send updates whenever there is an update to
the order.
Parameters:
Parameters:
41/68
args : dict with following keys
id : str
The unique identifier for the order.
p2p_order_info : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] If set to 1, will send updates whenever there is an update to
order
Parameters:
Parameters:
42/68
args : dict with following keys
order_id : str
The order identification number.
p2p_order_review : int
Must be 1
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
rating : int
Rating for the transaction, 1 to 5.
recommended : Any
[Optional] 1 if the counterparty is recommendable to others, otherwise 0.
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
Parameters:
43/68
args : dict with following keys
country : str
[Optional] 2-letter country code (ISO standard).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
payment_methods : int
Must be 1
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
44/68
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
paymentagent_details : int
Must be 1
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
45/68
async def paymentagent_withdraw(self, args=None)
Initiate a withdrawal to an approved Payment Agent.
Parameters:
Parameters:
Parameters:
46/68
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
ping : int
Must be 1
req_id : int
[Optional] Used to map request to response.
Parameters:
Parameters:
47/68
Gets latest price for a specific contract.
Parameters:
48/68
args : dict with following keys
amount : Number
[Optional] Proposed contract payout or stake, or multiplier (for
lookbacks).
barrier : str
[Optional] Barrier for the contract (or last digit prediction for digit
contracts). Contracts less than 24 hours in duration would need a relative barrier
(barriers which need +/-), where entry spot would be adjusted accordingly with
that amount to define a barrier, except for Synthetic Indices as they support both
relative and absolute barriers. Not needed for lookbacks.
barrier2 : str
[Optional] Low barrier for the contract (for contracts with two barriers).
Contracts less than 24 hours in duration would need a relative barrier (barriers
which need +/-), where entry spot would be adjusted accordingly with that amount
to define a barrier, except for Synthetic Indices as they support both relative
and absolute barriers. Not needed for lookbacks.
barrier_range : str
[Optional] Barrier range for callputspread.
basis : str
[Optional] Indicates type of the amount.
cancellation : str
Cancellation duration option (only for MULTUP and MULTDOWN contracts).
contract_type : str
The proposed contract type
currency : str
This can only be the account-holder's currency (obtained from
payout_currencies call).
date_expiry : int
[Optional] Epoch value of the expiry time of the contract. Either
date_expiry or duration is required.
date_start : int
[Optional] Indicates epoch value of the starting time of the contract. If
left empty, the start time of the contract is now.
duration : int
[Optional] Duration quantity. Either date_expiry or duration is required.
duration_unit : str
[Optional] Duration unit - s: seconds, m: minutes, h: hours, d: days, t:
ticks.
limit_order : Any
multiplier : Number
[Optional] The multiplier for non-binary options. E.g. lookbacks.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
product_type : str
[Optional] The product type.
proposal : int
Must be 1
req_id : int
[Optional] Used to map request to response.
selected_tick : int
[Optional] The tick that is predicted to have the highest/lowest value -
for TICKHIGH and TICKLOW contracts.
subscribe : int
[Optional] 1 - to initiate a realtime stream of prices. Note that tick
trades (without a user-defined barrier), digit trades and less than 24 hours at-
49/68
the-money contracts for the following underlying symbols are not streamed: R_10,
R_25, R_50, R_75, R_100, RDBULL, RDBEAR (this is because their price is constant).
symbol : str
The short symbol name (obtained from active_symbols call).
trading_period_start : int
[Optional] Required only for multi-barrier trading. Defines the epoch
value of the trading period start time.
Parameters:
Parameters:
Parameters:
50/68
args : dict with following keys
date_from : int
Start date of the report
date_to : int
End date of the report
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
report_type : str
Type of report to be sent to client's registered e-mail address
req_id : int
[Optional] Used to map request to response.
request_report : int
Must be 1
Parameters:
Parameters:
51/68
async def revoke_oauth_app(self, args=None)
Used for revoking access of particular app.
Parameters:
Parameters:
Parameters:
52/68
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
price : Number
Minimum price at which to sell the contract, or 0 for 'sell at market'.
req_id : int
[Optional] Used to map request to response.
sell_contract_for_multiple_accounts : int
Must be 1
shortcode : str
An internal ID used to identify the contract which was originally bought.
This is returned from the buy and buy_contract_for_multiple_accounts calls.
tokens : Any
Authorisation tokens which select the accounts to sell use for the
affected accounts.
Parameters:
Parameters:
53/68
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.
Parameters:
Parameters:
54/68
args : dict with following keys
account_turnover : str
[Optional] The anticipated account turnover.
binary_options_trading_experience : str
[Optional] Binary options trading experience.
binary_options_trading_frequency : str
[Optional] Binary options trading frequency.
cfd_trading_experience : str
[Optional] CFDs trading experience.
cfd_trading_frequency : str
[Optional] CFDs trading frequency.
education_level : str
Level of Education.
employment_industry : str
Industry of Employment.
employment_status : str
[Optional] Employment Status.
estimated_worth : str
Estimated Net Worth.
forex_trading_experience : str
[Optional] Forex trading experience.
forex_trading_frequency : str
[Optional] Forex trading frequency.
income_source : str
Income Source.
net_income : str
Net Annual Income.
occupation : str
Occupation.
other_instruments_trading_experience : str
[Optional] Trading experience in other financial instruments.
other_instruments_trading_frequency : str
[Optional] Trading frequency in other financial instruments.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
set_financial_assessment : int
Must be 1
source_of_wealth : str
[Optional] Source of wealth.
Parameters:
55/68
args : dict with following keys
exclude_until : Any
[Optional] Exclude me from the website (for a minimum of 6 months, up to a
maximum of 5 years). Note: uplifting this self-exclusion may require contacting
the company.
max_30day_deposit : Any
[Optional] 7-day limit on deposits.
max_30day_losses : Any
[Optional] 30-day limit on losses.
max_30day_turnover : Any
[Optional] 30-day turnover limit.
max_7day_deposit : Any
[Optional] 7-day limit on deposits.
max_7day_losses : Any
[Optional] 7-day limit on losses.
max_7day_turnover : Any
[Optional] 7-day turnover limit.
max_balance : Any
[Optional] Maximum account cash balance.
max_deposit : Any
[Optional] Daily deposit limit.
max_losses : Any
[Optional] Daily limit on losses.
max_open_bets : Any
[Optional] Maximum number of open positions.
max_turnover : Any
[Optional] Daily turnover limit.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
session_duration_limit : Any
[Optional] Session duration limit, in minutes.
set_self_exclusion : int
Must be 1
timeout_until : Any
[Optional] Exclude me from the website (for up to 6 weeks). Requires time
in epoch format. Note: unlike exclude_until, this self-exclusion will be lifted
automatically at the expiry of the timeout period.
Parameters:
56/68
args : dict with following keys
account_opening_reason : str
[Optional] Purpose and reason for requesting the account opening. Only
applicable for real money account. Required for clients that have not set it yet.
Can only be set once.
address_city : str
[Optional] Note: not applicable for virtual account. Required field for
real money account.
address_line_1 : str
[Optional] Note: not applicable for virtual account. Required field for
real money account.
address_line_2 : Any
[Optional] Note: not applicable for virtual account. Optional field for
real money account.
address_postcode : str
[Optional] Note: not applicable for virtual account. Optional field for
real money account.
address_state : str
[Optional] Note: not applicable for virtual account. Optional field for
real money account.
allow_copiers : int
[Optional] Boolean value 1 or 0, indicating permission to allow others to
follow your trades. Note: not applicable for Virtual account. Only allow for real
money account.
citizen : Any
[Optional] Country of legal citizenship, 2-letter country code.
date_of_birth : str
[Optional] Date of birth format: yyyy-mm-dd (can only be changed on
unauthenticated svg accounts).
email_consent : int
[Optional] Boolean value 1 or 0, indicating permission to use email
address for any contact which may include marketing
feature_flag : Any
first_name : str
[Optional] Within 2-50 characters, use only letters, spaces, hyphens,
full-stops or apostrophes (can only be changed on unauthenticated svg accounts).
last_name : str
[Optional] Within 2-50 characters, use only letters, spaces, hyphens,
full-stops or apostrophes (can only be changed on unauthenticated svg accounts).
non_pep_declaration : int
[Optional] Indicates client's self-declaration of not being a PEP/RCA
(Politically Exposed Person/Relatives and Close Associates). Effective for real
accounts only.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
phone : Any
[Optional] Note: not applicable for virtual account. Starting with +
followed by 9-35 digits, hyphens or space.
place_of_birth : str
[Optional] Place of birth, 2-letter country code.
preferred_language : Any
[Optional] User's preferred language, ISO standard language code
req_id : int
[Optional] Used to map request to response.
request_professional_status : int
57/68
[Optional] Required when client wants to be treated as professional.
Applicable for financial accounts only.
residence : Any
[Optional] 2-letter country code. Note: not applicable for real money
account. Only allow for Virtual account without residence set.
salutation : str
[Optional] Accept any value in enum list (can only be changed on
unauthenticated svg accounts).
secret_answer : str
[Optional] Answer to secret question, within 4-50 characters. Required for
new account and existing client details will be used if client opens another
account.
secret_question : str
[Optional] Accept any value in enum list. Required for new account and
existing client details will be used if client opens another account.
set_settings : int
Must be 1
tax_identification_number : str
[Optional] Tax identification number. Only applicable for real money
account. Required for maltainvest landing company.
tax_residence : str
[Optional] Residence for tax purpose. Comma separated iso country code if
multiple jurisdictions. Only applicable for real money account. Required for
maltainvest landing company.
Parameters:
58/68
Parameters:
Parameters:
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] If set to 1, will send updates whenever a new tick is received.
ticks : Any
The short symbol name or array of symbols (obtained from active_symbols
call).
Parameters:
-----------
args : dict with following keys
adjust_start_time : int
[Optional] 1 - if the market is closed at the end time, or license
limit is before end time, adjust interval backwards to compensate.
count : int
[Optional] An upper limit on ticks to receive.
end : str
Epoch value representing the latest boundary of the returned
ticks. If latest is specified, this will be the latest available timestamp.
granularity : int
[Optional] Only applicable for style: candles. Candle time-
dimension width setting. (default: 60).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be
retrieved via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
start : int
[Optional] Epoch value representing the earliest boundary of the
returned ticks.
59/68
For "style": "ticks": this will default to 1 day ago.
For "style": "candles": it will default to 1 day ago if count or granularity is undefined.
style : str [Optional] The tick-output style. subscribe : int [Optional] 1 - to send
updates whenever a new tick is received. ticks_history : str Short symbol name
(obtained from the active_symbols call).
Parameters:
Parameters:
Parameters:
60/68
async def trading_durations(self, args=None)
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.
Parameters:
Parameters:
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
platform : str
Trading platform name
req_id : int
[Optional] Used to map request to response.
trading_platform_accounts : int
Must be 1
Parameters:
61/68
args : dict with following keys
amount : Number
Amount to deposit (in the currency of from_wallet).
from_account : str
Wallet account to transfer money from.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
platform : str
Name of trading platform.
req_id : int
[Optional] Used to map request to response.
to_account : str
Trading account login to deposit money to.
trading_platform_deposit : int
Must be 1
Parameters:
Parameters:
62/68
args : dict with following keys
account_id : str
Trading account ID.
new_password : str
New password of the account. For validation (Accepts any printable ASCII
character. Must be within 8-25 characters, and include numbers, lowercase and
uppercase letters. Must not be the same as the user's email address).
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
platform : str
Name of trading platform.
req_id : int
[Optional] Used to map request to response.
trading_platform_investor_password_reset : int
Must be 1
verification_code : str
Email verification code (received from a verify_email call, which must be
done first)
Parameters:
args : dict with following keys
account_type : str
Account type.
currency : str
[Optional] Trading account currency, the default value will be the
qualified account currency.
dry_run : int
[Optional] If set to 1, only validation is performed.
market_type : str
Market type
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
password : str
The master password of the account. For validation (Accepts any printable
ASCII character. Must be within 8-25 characters, and include numbers, lowercase
and uppercase letters. Must not be the same as the user's email address). This
field is required.
platform : str
Name of trading platform.
req_id : int
[Optional] Used to map request to response.
sub_account_type : str
[Optional] Sub account type.
trading_platform_new_account : int
Must be 1
63/68
Parameters:
args : dict with following keys
new_password : str
New trading password. Accepts any printable ASCII character. Must be
within 8-25 characters, and include numbers, lowercase and uppercase letters. Must
not be the same as the user's email address.
old_password : str
Old password for validation. Must be empty if a password has not been set
yet.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
platform : str
Name of trading platform.
req_id : int
[Optional] Used to map request to response.
trading_platform_password_change : Number
Must be 1
Parameters:
Parameters:
64/68
args : dict with following keys
app_id : Any
[Optional] Specific application app_id.
country_code : str
[Optional] Country of legal citizenship, 2-letter country code.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
trading_platform_product_listing : int
Must be 1.
Parameters:
Parameters:
65/68
args : dict with following keys
account_type : str
[Optional] Trading account type.
environment : str
[Optional] Pass the environment (installation) instance. Currently, there
are one demo and two real environments. Defaults to 'all'.
market_type : str
[Optional] Market type.
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
platform : str
[Optional] Pass the trading platform name, default to mt5
req_id : int
[Optional] Used to map request to response.
trading_servers : int
Must be 1
Parameters:
Parameters:
66/68
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.
Parameters:
Parameters:
Parameters:
67/68
args : dict with following keys
passthrough : Any
[Optional] Used to pass data through the websocket, which may be retrieved
via the echo_req output field.
req_id : int
[Optional] Used to map request to response.
subscribe : int
[Optional] 1 to stream the server/website status updates.
website_status : int
Must be 1
68/68