1.0.11
The main class of the DerivAPI module. This class extends the minimum functionality provided by the DerivAPIBasic adding abstract objects that can be used to read data and interact with the API.
(DerivAPIBasic)
: Basic API, used for making low-level calls to the API
// Returns an abstract ticks object
const ticks = api.ticks('R_100');
// Subscribe to updates on the ticks object
ticks.onUpdate().subscribe(console.log);
// Read the last ticks available in the default range
const ticks_history = ticks.list;
// Read the last 100 ticks until yesterday
const older_history = await ticks.history({ count: 100, end: new Date(yesterday) });
// Access to low-level API
const api_basic = api.basic;
Provides a ticks stream and a list of available ticks
((String | TicksParam))
symbol or a ticks parameter object
Promise<Ticks>
:
Provides a list of available candles with the default granularity
((String | CandlesParam))
symbol or a candles parameter object
Promise<Candles>
:
A contract object with latest market values, cannot be bought or sold
(ContractParam)
parameters defining the contract
Promise<Contract>
:
An underlying object, including contract groups, pip size, etc.
(String)
The underlying symbol
Promise<Underlying>
:
Website status stream
Promise<WebsiteStatus>
:
Request contract options to display in UI
(any)
Promise<ContractOptions>
:
The minimum functionality provided by DerivAPI, provides direct calls to the
API.
api.cache
is available if you want to use the cached data (see Cache)
Extends DerivAPICalls
(Object
= {}
)
Name | Description |
---|---|
options.app_id Number
|
Application ID of the API user |
options.connection WebSocket?
|
A ready to use connection |
options.endpoint String
(default 'frontend.binaryws.com' )
|
API server to connect to |
options.lang String
(default 'EN' )
|
Language of the API communication |
options.brand String
(default '' )
|
Brand name |
options.middleware Object
(default {} )
|
A middleware to call on certain API actions |
options.storage any
|
|
options.cache any
(default new InMemory() )
|
(Observable)
(Cache)
: Temporary cache default to @link{InMemory}
(Cache)
: If specified, uses a more presistent cache (local storage, etc.)
const apiFromOpenConnection = new DerivAPI({ connection });
const apiFromEndpoint = new DerivAPI({ endpoint: 'ws.binaryws.com', app_id: 1234 });
Reconnects to the API in case of connection error, unless connection is passed as an argument, in that case reconnecting should be handled in the API user side.
Clears previous connection keeplive ping timeout and connect & assign the handles
Observable
:
for close events
Observable
:
for open events
Observable
:
for new messages
Abstract objects that provide static content and methods to make use of them, changing internal fields of these objects is blocked and they do not receive updates.
Abstract class for user accounts
Extends Immutable
(String)
(String)
(String)
(String)
(String)
(String)
(Boolean)
(FullName)
(Balance)
(Transactions)
const account = await api.accounts(your_token);
// Returns the open contracts of this account
const open_contracts = account.open_contracts;
const siblings = account.siblings;
// Switches the API account to the first sibling
// The existing account instance is not authorized anymore and should be discarded
const sibling = await api.account(loginidToToken(siblings[0].loginid));
Abstract class for trading assets
Extends Immutable
(DerivAPI)
(Array<Underlying>)
(Array<Underlying>)
(Object)
(Object)
const assets = await api.assets();
// Get the current open markets
const open_markets = assets.open_markets;
const trading_times = assets.trading_times;
Abstract class for an underlying
Extends Immutable
(FullName)
(Boolean)
(Boolean)
(Number)
(Number)
(Object)
const underlying = await api.underlying('R_100');
const pip_sized = underlying.pipSizedValue(123.1);
// Same as api.tickStream(symbol);
const tick_stream = underlying.tickStream();
if (underlying.is_open) await contract.buy();
A wrapper class for Tick
Extends Immutable
(Object)
Name | Description |
---|---|
tick.epoch (Number | String)
|
|
tick.quote Number
|
|
tick.ask Number
|
|
tick.bid Number
|
(Number)
(CustomDate)
(MarketValue)
(MarketValue)
(MarketValue)
(Object)
: The raw data received from API
A wrapper class for Candle
Extends Immutable
(Object)
Name | Description |
---|---|
candle.epoch (Number | String)
|
|
candle.open Number
|
|
candle.high Number
|
|
candle.low Number
|
|
candle.close Number
|
(Number)
(CustomDate)
: The current time of the candle
(CustomDate)
: The time that candle opened
(MarketValue)
(MarketValue)
(MarketValue)
(MarketValue)
(Object)
: The raw data received from API
A class for transaction objects
Extends Immutable
(Object)
Name | Description |
---|---|
transaction.action String
|
|
transaction.currency String
|
|
transaction.amount Number
|
|
transaction.balance Number
|
|
transaction.high_barrier (String | Number)
|
|
transaction.low_barrier (String | Number)
|
|
transaction.barrier (String | Number)
|
|
transaction.longcode String
|
|
transaction.symbol String
|
|
transaction.display_name String
|
Belongs to symbol |
transaction.transaction_id Number
|
|
transaction.contract_id Number
|
|
transaction.purchase_time Number
|
|
transaction.expiry_time Number
|
|
transaction.transaction_time Number
|
(Number)
(any)
(String)
(String)
(Number)
: transaction ID
(Number)
(FullName)
(Monetary)
(Monetary)
(MarketValue)
(MarketValue)
(MarketValue)
(CustomDate)
(CustomDate)
(CustomDate)
(Object)
: The raw data received from API
Abstract objects for options needed to create a contract
Extends Immutable
(any)
(any)
Wrapper around a Buy response
Extends Immutable
(any)
Name | Description |
---|---|
buy.buy_price Monetary
|
|
buy.balance_after Monetary
|
|
buy.payout Monetary
|
|
buy.start_time CustomDate
|
|
buy.purchase_time CustomDate
|
|
buy.contract_id Number
|
|
buy.transaction_id Number
|
|
buy.longcode String
|
|
buy.shortcode String
|
(String)
(any)
(Monetary)
(Monetary)
(Monetary)
(CustomDate)
(CustomDate)
(Number)
(Number)
(FullName)
: contains short and long code
(String)
(String)
Wrapper around a Sell response
Extends Immutable
(any)
Name | Description |
---|---|
sell.sold_for Monetary
|
sell price |
sell.balance_after Monetary
|
|
sell.contract_id Number
|
|
sell.transaction_id Number
|
sell transaction |
sell.reference_id Number
|
buy transaction |
(String)
(any)
Live stream of data, plus some dynamically updated fields, you
can subscribe to changes using the onUpdate
method on all of
these classes.
An abstract class for balance information
Extends Stream
(DerivAPI)
(Monetary)
(Number)
: numeric balance value
(String)
: currency of the amount
(String)
: display value of amount (decimal point)
(String)
: formatted amount (decimal point, comma separated)
const balance = accounts.balance;
const formatted_balance = balance.format;
balance.onUpdate().subscribe(balance => console.log)
An abstract class for Candles stream returned from DerivAPI#candleStream
Extends Stream
(DerivAPI)
(CandlesParam?)
Resolves to a list of candles given the range
(HistoryRange?)
Promise<Array<Candle>>
:
const old_candles = await candle_stream.history({count: 10, end: yesterday})
Abstract class for contracts
Extends Stream
(DerivAPI)
(ContractParam)
(String)
: 'proposal', 'open', 'expired', 'sold', 'won', 'lost'
(Monetary)
: Price to pay to buy a contract
(String)
: contract type
(Monetary)
: Potential or realized payout
(String)
(String)
(String)
(Spot)
(CustomDate)
: Start time of the contract (estimated for proposal)
(Monetary?)
: (After buy)
(Monetary?)
: (After buy)
(Monetary?)
: (After sell)
(Profit?)
: Potential or realized profit (After buy)
(Number?)
: The proposal ID used to buy
(Number?)
: The contract ID (After buy)
(CustomDate?)
: (After buy)
(CustomDate?)
: (After buy)
(CustomDate?)
: (After sell)
(Number?)
: (For contracts with barrier)
(MarketValue?)
: (For contracts with two barriers)
(MarketValue?)
: (For contracts with two barriers)
(MarketValue?)
: (For contracts with one barrier)
(Number?)
: (For tick contracts)
(Number?)
: (For loopback contracts)
(String?)
(String?)
(Boolean?)
(Boolean?)
(Boolean?)
(Boolean?)
: We still allow a sell call, let API handle the error
(Boolean?)
(Boolean?)
(Boolean?)
: Is this contract still open
(Spot?)
(Spot?)
(Object?)
(FullName?)
: only if both short and long codes are available
const contract = account.contract({ contract_type: 'CALL', ...options })
const buy = await contract.buy();
contract.onUpdate().subscribe(console.log)
Abstract class for ticks stream returned by the DerivAPI#tickStream
Extends Stream
(DerivAPI)
(TicksParam)
Resolves to a list of Ticks using the given range
(HistoryRange?)
Promise<Array<Tick>>
:
const old_ticks = await tickStream.history({count: 10, end: yesterday})
A stream of transactions
Extends Stream
(DerivAPI)
(Array<Transaction>)
: An immutable list of transactions
const tx_stream = accounts.transaction_stream;
const tx_list = tx_stream.list;
tx_stream.onUpdate(console.log)
An abstract class for website status info
Extends Stream
(DerivAPI)
(String)
: 'up', 'down'
(Boolean)
(String)
(Object)
(Object)
(String)
const website_status = await api.websiteStatus();
const is_website_up = website_status.is_website_up;
website_status.onUpdate(s => console.log(`Site is ${s.status}`));
Container classes for data types, providing means to convert them to other types and represent them to the UI. These are mostly simpler objects used for representing data.
A barrier info, either absolute or relative
Extends MarketValue
An alternative date object
Extends Immutable
((CustomDate | Date | Number))
((CustomDate | Date | Number))
Boolean
:
((CustomDate | Date | Number))
Boolean
:
((CustomDate | Date | Number))
Boolean
:
((CustomDate | Date | Number))
Boolean
:
((CustomDate | Date | Number))
Boolean
:
Adds a duration to the current date
CustomDate
:
An abstract class for date range
Extends Immutable
(CustomDate)
(CustomDate)
Duration object
Extends Immutable
(String)
Adds this duration to a date object
(CustomDate)
CustomDate
:
An abstract class for date range
Extends Immutable
A class for keeping short and full name of things
Extends Immutable
const lc = account.landing_company;
console.log(`Landing Company: ${lc.full}, Short code: ${lc.short}`);
Keeps a market value and pip size
Extends Immutable
Keeps money related values
Extends Immutable
Keeps money related values
Extends Monetary
(Number)
: Absolute value of the profit
(Number)
(Number)
: 0: no profit, 1: positive profit, -1: loss
(Boolean)
: True if the initial profit is positive
(String)
(String)
: decimal value based on currency
(String)
: comma separated decimal value based on currency
Keeps a market value at a time
Extends MarketValue
Types internally used for immutable and stream objects
An abstract class for immutable objects
(Object
= {}
)
A list of properties to add for the immutable object
Override to initialize an immutable object asynchronously
An abstract class for stream objects
Extends Immutable
(any)
Cache - A class for implementing in-memory and persistent cache
The real implementation of the underlying cache is delegated to the storage object (See the params).
The storage object needs to implement the API.
Extends DerivAPICalls
(DerivAPIBasic)
API instance to get data that is not cached
(Object)
A storage instance to use for caching
// Read the latest active symbols
const symbols = await api.activeSymbols();
// Read the data from cache if available
const cached_symbols = await api.cache.activeSymbols();
Subscription Manager - manage subscription channels
Makes sure there is always only one subscription channel for all requests of subscriptions, keeps a history of received values for the subscription of ticks and forgets channels that do not have subscribers. It also ensures that subscriptions are revived after connection drop/account changed.
(any)
// This one creates a new subscription assuming it is the first one for R_100
const subscriber1 = api.subscribe({ ticks: 'R_100' }, console.log);
// This one uses the existing subscription to R_100
const subscriber2 = api.subscribe({ ticks: 'R_100' }, console.log);
subscriber1.unsubscribe(); // no API forget yet
subscriber2.unsubscribe(); // Issues API forget
Subscribe to a given request, returns a stream of new responses, Errors should be handled by the user of the stream
(Object)
A request object acceptable by the API
Observable
:
An RxJS Observable
const ticks = api.subscribe({ ticks: 'R_100' });
ticks.subscribe(console.log) // Print every new tick
These are plain JavaScript objects that are named to easily refer to them in this documentation, they don't physically exist as a class in this codebase.
Type: Object
(Number)
: Granularity in seconds
(HistoryRange)
: A chunk of history to return with start and end time
(String)
: Symbol of the candles
Type: Object
(HistoryRange)
: A chunk of history to return with start and end time
(String)
: The ticks symbol
Type: Object
(Number?)
: Maximum acceptable price for buying the contract
Type: Object
(Number?)
: Maximum acceptable price for selling the contract
Type: Object
Type: Object
This call allows clients to close all their accounts (including virtual-money account). It is assumed that all their accounts (excluding virtual) have no balance left.
(Object
= {}
)
Name | Description |
---|---|
args.account_closure Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.reason String
|
Reason for closing off accounts. |
args.req_id Number
|
[Optional] Used to map request to response. |
This call manages two-factor account authentication
(Object
= {}
)
Name | Description |
---|---|
args.account_security Number
|
Must be
1
|
args.otp String
|
[Optional] OTP (one-time passcode) generated by a 2FA application like Authy, Google Authenticator or Yubikey. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.totp_action String
|
[Optional] Action to be taken for managing TOTP (time-based one-time password, RFC6238). Generate will create a secret key which is then returned in the secret_key response field, you can then enable by using that code in a 2FA application. |
Send request to get account statistics
Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).
(Object
= {}
)
Name | Description |
---|---|
args.active_symbols String
|
If you use
brief
, only a subset of fields will be returned.
|
args.landing_company String
|
[Optional] If you specify this field, only symbols available for trading by that landing company will be returned. If you are logged in, only symbols available for trading by your landing company will be returned regardless of what you specify in this field. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.product_type String
|
[Optional] If you specify this field, only symbols that can be traded through that product type will be returned. |
args.req_id Number
|
[Optional] Used to map request to response. |
Register a new affiliate
(Object
= {}
)
Name | Description |
---|---|
args.address_city String
|
City name within 50 characters. |
args.address_line_1 String
|
Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/- |
args.address_line_2 String
|
[Optional] Within 70 characters. |
args.address_postcode String
|
Within 20 characters and may not contain '+'. |
args.address_state String
|
Possible value receive from
states_list
call.
|
args.affiliate_account_add Number
|
[Required] Must be
1
|
args.country String
|
Country of legal citizenship, 2-letter country code. |
args.first_name String
|
The official first name of the affiliate. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.last_name String
|
The official last name of the affiliate. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.non_pep_declaration Number
|
Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.password String
|
Password for the affiliate account. (Accepts any printable ASCII character. Must be between 6-50 characters, and include numbers, lowercase and uppercase letters.). |
args.phone String
|
Registered phone number of the affiliate. Starting with
+
followed by 8-35 digits, allowing hyphens or space.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.tnc_accepted Number
|
Indicates client has agreed to the terms and conditions. |
args.username String
|
Desired username for the affiliate account. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
This call manages API tokens
(Object
= {}
)
Name | Description |
---|---|
args.api_token Number
|
Must be
1
|
args.delete_token String
|
[Optional] The token to remove. |
args.new_token String
|
[Optional] The name of the created token. |
args.new_token_scopes Any
|
[Optional] List of permission scopes to provide with the token. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.valid_for_current_ip_only Number
|
[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 |
The request for deleting an application.
To get the information of the OAuth application specified by 'app_id'
List all of the account's OAuth applications
Retrieve details of app_markup
according to criteria specified.
(Object
= {}
)
Name | Description |
---|---|
args.app_id Number
|
[Optional] Specific application
app_id
to report on.
|
args.app_markup_details Number
|
Must be
1
|
args.client_loginid String
|
[Optional] Specific client loginid to report on, like CR12345 |
args.date_from String
|
Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time. |
args.date_to String
|
End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. |
args.description Number
|
[Optional] If set to 1, will return
app_markup
transaction details.
|
args.limit Number
|
[Optional] Apply upper limit to count of transactions received. |
args.offset Number
|
[Optional] Number of transactions to skip. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.sort String
|
[Optional] Sort direction on
transaction_time
. Other fields sort order is ASC.
|
args.sort_fields Any
|
[Optional] One or more of the specified fields to sort on. Default sort field is by
transaction_time
.
|
Register a new OAuth application
(Object
= {}
)
Name | Description |
---|---|
args.app_markup_percentage Number
|
[Optional] Markup to be added to contract prices (as a percentage of contract payout). |
args.app_register Number
|
Must be
1
|
args.appstore String
|
[Optional] Application's App Store URL (if applicable). |
args.github String
|
[Optional] Application's GitHub page (for open-source projects). |
args.googleplay String
|
[Optional] Application's Google Play URL (if applicable). |
args.homepage String
|
[Optional] Application's homepage URL. |
args.name String
|
Application name. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.redirect_uri String
|
[Optional] The URL to redirect to after a successful login. Required if charging markup percentage |
args.req_id Number
|
[Optional] Used to map request to response. |
args.scopes Any
|
List of permission scopes to grant the application. |
args.verification_uri String
|
[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.
|
Update a new OAuth application
(Object
= {}
)
Name | Description |
---|---|
args.app_markup_percentage Number
|
[Optional] Markup to be added to contract prices (as a percentage of contract payout). |
args.app_update Number
|
Application app_id. |
args.appstore String
|
[Optional] Application's App Store URL (if applicable). |
args.github String
|
[Optional] Application's GitHub page (for open-source projects). |
args.googleplay String
|
[Optional] Application's Google Play URL (if applicable). |
args.homepage String
|
[Optional] Application's homepage URL. |
args.name String
|
Application name. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.redirect_uri String
|
[Optional] The URL to redirect to after a successful login. Required if charging markup percentage. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.scopes Any
|
Change scopes will revoke all user's grants and log them out. |
args.verification_uri String
|
[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.
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.asset_index Number
|
Must be
1
|
args.landing_company String
|
[Optional] If specified, will return only the underlyings for the specified landing company. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
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.
(Object
= {}
)
Name | Description |
---|---|
args.add_to_login_history Number
|
[Optional] Send this when you use api tokens for authorization and want to track activity using
login_history
call.
|
args.authorize String
|
Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Get user account balance
(Object
= {}
)
Name | Description |
---|---|
args.account String
|
[Optional] If set to
all
, return the balances of all accounts one by one; if set to
current
, return the balance of current account; if set as an account id, return the balance of that account.
|
args.balance Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever the balance changes. |
Buy a Contract
(Object
= {}
)
Name | Description |
---|---|
args.buy String
|
Either the ID received from a Price Proposal (
proposal
call), or
1
if contract buy parameters are passed in the
parameters
field.
|
args.parameters Any
|
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.price Number
|
Maximum price at which to purchase the contract. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional]
1
to stream.
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.buy_contract_for_multiple_accounts String
|
Either the ID received from a Price Proposal (
proposal
call), or
1
if contract buy parameters are passed in the
parameters
field.
|
args.parameters Any
|
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.price Number
|
Maximum price at which to purchase the contract. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.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. |
Cancel contract with contract id
(Object
= {}
)
Name | Description |
---|---|
args.cancel Number
|
Value should be the
contract_id
which received from the
portfolio
call.
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Request the cashier info for the specified type.
(Object
= {}
)
Name | Description |
---|---|
args.address String
|
[Optional] Address for crypto withdrawal. Only applicable for
api
type.
|
args.amount Number
|
[Optional] Amount for crypto withdrawal. Only applicable for
api
type.
|
args.cashier String
|
Operation which needs to be requested from cashier |
args.dry_run Number
|
[Optional] If set to
1
, only validation is performed. Only applicable for
withdraw
using
crypto
provider and
api
type.
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.provider String
|
[Optional] Cashier provider.
crypto
will be default option for crypto currency accounts.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.type String
|
[Optional] Data need to be returned from cashier.
api
is supported only for
crypto
provider.
|
args.verification_code String
|
[Optional] Email verification code (received from a
verify_email
call, which must be done first)
|
List pending transactions. This can only be used for crypto transactions.
(Object
= {}
)
Name | Description |
---|---|
args.cashier_payments Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.provider String
|
[Optional] Cashier provider.
crypto
will be default option for crypto currency accounts.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is update to crypto payments. |
args.transaction_type String
|
[Optional] Type of transactions to receive. |
Request for cancelling a withdrawal. This can only be used for crypto transactions.
(Object
= {}
)
Name | Description |
---|---|
args.cashier_withdrawal_cancel Number
|
Must be
1
|
args.id String
|
The unique identifier for the transaction. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Change Email.
(Object
= {}
)
Name | Description |
---|---|
args.change_email String
|
Must be
verify
or
update
.
|
args.new_email String
|
Email address to be verified. |
args.new_password String
|
[Optional] 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). Mandatory if change_email is update and user has social login. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
Change Password. Note: This call is only available when authenticated using an OAuth token.
(Object
= {}
)
Name | Description |
---|---|
args.change_password Number
|
Must be
1
|
args.new_password String
|
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) |
args.old_password String
|
Old password for validation (non-empty string, accepts any printable ASCII character) |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Update a contract condition.
(Object
= {}
)
Name | Description |
---|---|
args.contract_id Number
|
Internal unique contract identifier. |
args.contract_update Number
|
Must be
1
|
args.limit_order Any
|
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Request for contract update history.
(Object
= {}
)
Name | Description |
---|---|
args.contract_id Number
|
Internal unique contract identifier. |
args.contract_update_history Number
|
Must be
1
|
args.limit Number
|
[Optional] Maximum number of historical updates to receive. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.
(Object
= {}
)
Name | Description |
---|---|
args.contracts_for String
|
The short symbol name (obtained from
active_symbols
call).
|
args.currency String
|
[Optional] Currency of the contract's stake and payout (obtained from
payout_currencies
call).
|
args.landing_company String
|
[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. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.product_type String
|
[Optional] If you specify this field, only contracts tradable through that contract type will be returned. |
args.req_id Number
|
[Optional] Used to map request to response. |
Start copy trader bets
(Object
= {}
)
Name | Description |
---|---|
args.assets Any
|
[Optional] Used to set assets to be copied. E.x ["frxUSDJPY", "R_50"] |
args.copy_start String
|
API tokens identifying the accounts of trader which will be used to copy trades |
args.max_trade_stake Number
|
[Optional] Used to set maximum trade stake to be copied. |
args.min_trade_stake Number
|
[Optional] Used to set minimal trade stake to be copied. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.trade_types Any
|
[Optional] Used to set trade types to be copied. E.x ["CALL", "PUT"] |
Stop copy trader bets
(Object
= {}
)
Name | Description |
---|---|
args.copy_stop String
|
API tokens identifying the accounts which needs not to be copied |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Retrieves a list of active copiers and/or traders for Copy Trading
Retrieve performance, trading, risk and copiers statistics of trader.
(Object
= {}
)
Name | Description |
---|---|
args.copytrading_statistics Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.trader_id String
|
The ID of the target trader. |
The request for cryptocurrencies configuration.
(Object
= {}
)
Name | Description |
---|---|
args.crypto_config Number
|
Must be
1
|
args.currency_code String
|
[Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Request KYC information from client
(Object
= {}
)
Name | Description |
---|---|
args.document_format String
|
Document file format |
args.document_id String
|
[Optional] Document ID (required for Passport, Proof of ID and Driver's License) |
args.document_issuing_country String
|
[Optional] 2-letter country code |
args.document_type String
|
Document type |
args.document_upload Number
|
Must be
1
|
args.expected_checksum String
|
The checksum of the file to be uploaded |
args.expiration_date String
|
[Optional] Document expiration date (required for Passport, Proof of ID and Driver's License) |
args.file_size Number
|
Document size (should be less than 10MB) |
args.lifetime_valid Number
|
[Optional] Boolean value that indicates whether this document is lifetime valid (only applies to POI document types, cancels out the expiration_date given if any) |
args.page_type String
|
[Optional] To determine document side |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.proof_of_ownership Any
|
|
args.req_id Number
|
[Optional] Used to map request to response. |
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.
(Object
= {}
)
Name | Description |
---|---|
args.currency String
|
[Optional] Currency symbol. |
args.economic_calendar Number
|
Must be
1
|
args.end_date Number
|
[Optional] End date. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.start_date Number
|
[Optional] Start date. |
Retrieves the exchange rates from a base currency to all currencies supported by the system.
(Object
= {}
)
Name | Description |
---|---|
args.base_currency String
|
Base currency (can be obtained from
payout_currencies
call)
|
args.exchange_rates Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] 1 - to initiate a realtime stream of exchange rates relative to base currency. |
args.target_currency String
|
[Optional] Local currency |
Immediately cancel the real-time stream of messages with a specific ID.
Immediately cancel the real-time streams of messages of given type.
(Object
= {}
)
Name | Description |
---|---|
args.forget_all Any
|
Cancel all streams by type. The value can be either a single type e.g.
"ticks"
, or an array of multiple types e.g.
["candles", "ticks"]
.
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Get Account Status
Types of accounts available to create or link to.
Get Available Accounts to Transfer.
(Object
= {}
)
Name | Description |
---|---|
args.get_available_accounts_to_transfer Number
|
Must be
1
|
args.loginid String
|
The unique identifier for this trading/wallet account. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
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.
Trading and Withdrawal Limits for a given user
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.
Get User Settings (email, date of birth, address etc)
Adds document information such as issuing country, id and type for identity verification processes.
(Object
= {}
)
Name | Description |
---|---|
args.document_number String
|
The identification number of the document. |
args.document_type String
|
The type of the document based on provided
issuing_country
(can obtained from
residence_list
call).
|
args.identity_verification_document_add Number
|
Must be
1
|
args.issuing_country String
|
2-letter country code (can obtained from
residence_list
call).
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
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 Gaming contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).
(Object
= {}
)
Name | Description |
---|---|
args.landing_company String
|
Client's 2-letter country code (obtained from
residence_list
call).
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
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.
Link a wallet to a trading app.
(Object
= {}
)
Name | Description |
---|---|
args.client_id String
|
The unique identifier for this trading account. |
args.link_wallet Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.wallet_id String
|
The unique identifier for this wallet. |
Retrieve a summary of login history for user.
(Object
= {}
)
Name | Description |
---|---|
args.limit Number
|
[Optional] Apply limit to count of login history records. |
args.login_history Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Logout the session
This call allows deposit into MT5 account from Binary account.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
Amount to deposit (in the currency of from_binary); min = $1 or an equivalent amount, max = $20000 or an equivalent amount |
args.from_binary String
|
Binary account loginid to transfer money from |
args.mt5_deposit Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.to_mt5 String
|
MT5 account login to deposit money to |
Get MT5 user account settings
Get list of MT5 accounts for client
This call creates new MT5 user, either demo or real money user.
(Object
= {}
)
Name | Description |
---|---|
args.account_type String
|
Account type. If set to 'financial', setting 'mt5_account_type' is also required. |
args.address String
|
[Optional] The address of the user. The maximum length of this address field is 128 characters. |
args.city String
|
[Optional] User's city of residence. |
args.company String
|
[Optional] Name of the client's company. The maximum length of the company name is 64 characters. |
args.country String
|
[Optional] 2-letter country code (value received from
residence_list
call).
|
args.currency String
|
[Optional] MT5 account currency, the default value will be the qualified account currency. |
args.dry_run Number
|
[Optional] If set to 1, only validation is performed. |
args.email String
|
Email address |
args.investPassword String
|
[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). |
args.leverage Number
|
Client leverage (from 1 to 1000). |
args.mainPassword String
|
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. |
args.mt5_account_category String
|
[Optional] To choose whether account is conventional or not. Unavailable for financial_stp MT5_account_type |
args.mt5_account_type String
|
[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. |
args.mt5_new_account Number
|
Must be
1
|
args.name String
|
Client's name. The maximum length here is 101 characters. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.phone String
|
[Optional] User's phone number. |
args.phonePassword String
|
[Optional] The user's phone password. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.server Any
|
[Optional] Trade server. |
args.state String
|
[Optional] User's state (region) of residence. |
args.zipCode String
|
[Optional] User's zip code. |
To change passwords of the MT5 account.
(Object
= {}
)
Name | Description |
---|---|
args.login String
|
MT5 user login |
args.mt5_password_change Number
|
Must be
1
|
args.new_password String
|
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). |
args.old_password String
|
Old password for validation (non-empty string, accepts any printable ASCII character) |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.password_type String
|
[Optional] Type of the password to change. |
args.req_id Number
|
[Optional] Used to map request to response. |
This call validates the main password for the MT5 user
(Object
= {}
)
Name | Description |
---|---|
args.login String
|
MT5 user login |
args.mt5_password_check Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.password String
|
The password of the account. |
args.password_type String
|
[Optional] Type of the password to check. |
args.req_id Number
|
[Optional] Used to map request to response. |
To reset the password of MT5 account.
(Object
= {}
)
Name | Description |
---|---|
args.login String
|
MT5 user login |
args.mt5_password_reset Number
|
Must be
1
|
args.new_password String
|
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). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.password_type String
|
[Optional] Type of the password to reset. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
This call allows withdrawal from MT5 account to Binary account.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
Amount to withdraw (in the currency of the MT5 account); min = $1 or an equivalent amount, max = $20000 or an equivalent amount. |
args.from_mt5 String
|
MT5 account login to withdraw money from |
args.mt5_withdrawal Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.to_binary String
|
Binary account loginid to transfer money to |
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.
(Object
= {}
)
Name | Description |
---|---|
args.accept_risk Number
|
Show whether client has accepted risk disclaimer. |
args.account_opening_reason String
|
[Optional] Purpose and reason for requesting the account opening. |
args.account_turnover String
|
[Optional] The anticipated account turnover. |
args.address_city String
|
Within 100 characters |
args.address_line_1 String
|
Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/- |
args.address_line_2 String
|
[Optional] Within 70 characters. |
args.address_postcode String
|
[Optional] Within 20 characters and may not contain '+'. |
args.address_state String
|
[Optional] Possible value receive from
states_list
call.
|
args.affiliate_token String
|
[Optional] Affiliate token, within 32 characters. |
args.binary_options_trading_experience String
|
[Optional] Binary options trading experience. |
args.binary_options_trading_frequency String
|
[Optional] Binary options trading frequency. |
args.cfd_trading_experience String
|
[Optional] CFDs trading experience. |
args.cfd_trading_frequency String
|
[Optional] CFDs trading frequency. |
args.citizen String
|
[Optional] Country of legal citizenship, 2-letter country code. Possible value receive from
residence_list
call.
|
args.client_type String
|
[Optional] Indicates whether this is for a client requesting an account with professional status. |
args.currency String
|
[Optional] To set currency of the account. List of supported currencies can be acquired with
payout_currencies
call.
|
args.date_of_birth String
|
Date of birth format: yyyy-mm-dd. |
args.education_level String
|
Level of Education |
args.employment_industry String
|
Industry of Employment. |
args.employment_status String
|
[Optional] Employment Status. |
args.estimated_worth String
|
Estimated Net Worth. |
args.first_name String
|
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.forex_trading_experience String
|
[Optional] Forex trading experience. |
args.forex_trading_frequency String
|
[Optional] Forex trading frequency. |
args.income_source String
|
Income Source. |
args.last_name String
|
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.net_income String
|
Net Annual Income. |
args.new_account_maltainvest Number
|
Must be
1
|
args.non_pep_declaration Number
|
[Optional] Indicates client's self-declaration of not being a PEP/RCA. |
args.occupation String
|
Occupation. |
args.other_instruments_trading_experience String
|
[Optional] Trading experience in other financial instruments. |
args.other_instruments_trading_frequency String
|
[Optional] Trading frequency in other financial instruments. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.phone Any
|
[Optional] Starting with
+
followed by 9-35 digits, hyphens or space.
|
args.place_of_birth String
|
[Optional] Place of birth, 2-letter country code. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.residence String
|
2-letter country code, possible value receive from
residence_list
call.
|
args.salutation String
|
Accept any value in enum list. |
args.secret_answer String
|
[Optional] Answer to secret question, within 4-50 characters. |
args.secret_question String
|
[Optional] Accept any value in enum list. |
args.source_of_wealth String
|
[Optional] Source of wealth. |
args.tax_identification_number String
|
Tax identification number. Only applicable for real money account. Required for
maltainvest
landing company.
|
args.tax_residence String
|
Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for
maltainvest
landing company.
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.account_opening_reason String
|
[Optional] Purpose and reason for requesting the account opening. |
args.account_turnover String
|
[Optional] The anticipated account turnover. |
args.address_city String
|
[Optional] Within 100 characters. |
args.address_line_1 String
|
Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/- |
args.address_line_2 String
|
[Optional] Within 70 characters. |
args.address_postcode String
|
[Optional] Within 20 characters and may not contain '+'. |
args.address_state String
|
[Optional] Possible value receive from
states_list
call.
|
args.affiliate_token String
|
[Optional] Affiliate token, within 32 characters. |
args.citizen Any
|
[Optional] Country of legal citizenship, 2-letter country code. |
args.client_type String
|
[Optional] Indicates whether this is for a client requesting an account with professional status. |
args.currency String
|
[Optional] To set currency of the account. List of supported currencies can be acquired with
payout_currencies
call.
|
args.date_of_birth String
|
Date of birth format:
yyyy-mm-dd
.
|
args.first_name String
|
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.last_name String
|
Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.new_account_real Number
|
Must be
1
|
args.non_pep_declaration Number
|
[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.phone Any
|
[Optional] Starting with
+
followed by 9-35 digits, hyphens or space.
|
args.place_of_birth String
|
[Optional] Place of birth, 2-letter country code. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.residence String
|
2-letter country code, possible value receive from
residence_list
call.
|
args.salutation String
|
[Optional] Accept any value in enum list. |
args.secret_answer String
|
[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. |
args.secret_question String
|
[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client open another account. |
args.tax_identification_number String
|
[Optional] Tax identification number. Only applicable for real money account. Required for
maltainvest
landing company.
|
args.tax_residence String
|
[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for
maltainvest
landing company.
|
Create a new virtual-money account.
(Object
= {}
)
Name | Description |
---|---|
args.affiliate_token String
|
[Optional] Affiliate token, within 32 characters. |
args.client_password String
|
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). |
args.date_first_contact String
|
[Optional] Date of first contact, format:
yyyy-mm-dd
in GMT timezone.
|
args.email_consent Number
|
[Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails. |
args.gclid_url String
|
[Optional] Google Click Identifier to track source. |
args.new_account_virtual Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.residence String
|
2-letter country code (obtained from
residence_list
call).
|
args.signup_device String
|
[Optional] Show whether user has used mobile or desktop. |
args.type String
|
Account type |
args.utm_ad_id Any
|
[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded |
args.utm_adgroup_id Any
|
[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded |
args.utm_adrollclk_id Any
|
[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded |
args.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 |
args.utm_campaign_id Any
|
[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded |
args.utm_content Any
|
[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded |
args.utm_fbcl_id Any
|
[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded |
args.utm_gl_client_id Any
|
[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded |
args.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 |
args.utm_msclk_id Any
|
[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded |
args.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 |
args.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 |
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first).
|
Create a new account real-money wallet account.
(Object
= {}
)
Name | Description |
---|---|
args.address_city String
|
[Optional] Within 35 characters. |
args.address_line_1 String
|
[Optional] Mailing address. |
args.address_line_2 String
|
[Optional] Within 70 characters. |
args.address_postcode String
|
[Optional] Within 20 characters and may not contain '+'. |
args.address_state String
|
[Optional] Possible value receive from
states_list
call.
|
args.currency String
|
[Optional] To set currency of the account. List of supported currencies can be acquired with
payout_currencies
call.
|
args.date_of_birth String
|
[Optional] Date of birth format:
yyyy-mm-dd
.
|
args.first_name String
|
[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.last_name String
|
[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. |
args.new_account_wallet Number
|
Must be
1
|
args.non_pep_declaration Number
|
[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_method String
|
To set method which is used to transfer to/from wallet. |
args.phone String
|
[Optional] Starting with
+
followed by 8-35 digits, allowing hyphens or space.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Notify the backend about a specific event.
(Object
= {}
)
Name | Description |
---|---|
args.args Any
|
|
args.category String
|
The category or nature of the event. |
args.event String
|
The name of the event. |
args.notification_event Number
|
Must be
1
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
List all my used OAuth applications.
Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
The total amount of the advert, in advertiser's account currency. |
args.contact_info String
|
[Optional] Advertiser contact information. |
args.description String
|
[Optional] General information about the advert. |
args.local_currency String
|
[Optional] Local currency for this advert. If not provided, will use the currency of client's residence by default. |
args.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
|
args.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
.
|
args.p2p_advert_create Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_info String
|
[Optional] Payment instructions. |
args.payment_method String
|
[Optional] Payment method name (deprecated). |
args.payment_method_ids Any
|
IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads. |
args.payment_method_names Any
|
Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads. |
args.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).
|
args.rate_type String
|
Type of rate, fixed or floating. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.type String
|
The advertisement represents the intention to perform this action on your Deriv account funds. |
Retrieve information about a P2P advert.
(Object
= {}
)
Name | Description |
---|---|
args.id String
|
[Optional] The unique identifier for this advert. Optional when subscribe is 1. If not provided, all advertiser adverts will be subscribed. |
args.p2p_advert_info Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates when changes occur. Optional when id is provided. |
args.use_client_limits Number
|
[Optional] If set to 1, the maximum order amount will be adjusted to the current balance and turnover limits of the account. |
Returns available adverts for use with p2p_order_create
.
(Object
= {}
)
Name | Description |
---|---|
args.advertiser_id String
|
[Optional] ID of the advertiser to list adverts for. |
args.advertiser_name String
|
[Optional] Search for advertiser by name. Partial matches will be returned. |
args.amount Number
|
[Optional] How much to buy or sell, used to calculate prices. |
args.counterparty_type String
|
[Optional] Filter the adverts by
counterparty_type
.
|
args.favourites_only Number
|
[Optional] Only show adverts from favourite advertisers. Default is 0. |
args.limit Number
|
[Optional] Used for paging. |
args.local_currency String
|
[Optional] Currency to conduct payment transaction in, defaults to the main currency for the client's country. |
args.offset Number
|
[Optional] Used for paging. |
args.p2p_advert_list Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_method Any
|
[Optional] Search by supported payment methods. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.sort_by String
|
[Optional] How the results are sorted. |
args.use_client_limits Number
|
[Optional] If set to 1, ads that exceed this account's balance or turnover limits will not be shown. |
Updates a P2P advert. Can only be used by the advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.contact_info String
|
[Optional] Advertiser contact information. |
args.delete Number
|
[Optional] If set to 1, permanently deletes the advert. |
args.description String
|
[Optional] General information about the advert. |
args.id String
|
The unique identifier for this advert. |
args.is_active Number
|
[Optional] Activate or deactivate the advert. |
args.local_currency String
|
[Optional] Local currency for this advert. |
args.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
.
|
args.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
.
|
args.p2p_advert_update Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_info String
|
[Optional] Payment instructions. |
args.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. |
args.payment_method_names Any
|
[Optional] Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads. Exisiting methods will be replaced. |
args.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).
|
args.rate_type String
|
[Optional] Type of rate, fixed or floating. |
args.remaining_amount Number
|
[Optional] The total available amount of the advert, in advertiser's account currency. |
args.req_id Number
|
[Optional] Used to map request to response. |
Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.limit Number
|
[Optional] Used for paging. This value will also apply to subsription responses. |
args.offset Number
|
[Optional] Used for paging. This value will also apply to subsription responses. |
args.p2p_advertiser_adverts Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Registers the client as a P2P advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.contact_info String
|
[Optional] Advertiser's contact information, to be used as a default for new sell adverts. |
args.default_advert_description String
|
[Optional] Default description that can be used every time an advert is created. |
args.name String
|
The advertiser's displayed name. |
args.p2p_advertiser_create Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_info String
|
[Optional] Advertiser's payment information, to be used as a default for new sell adverts. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is an update to advertiser |
Retrieve information about a P2P advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.id String
|
[Optional] The unique identifier for this advertiser. If not provided, returns advertiser information about the current account. |
args.p2p_advertiser_info Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is an update to advertiser |
Manage or list P2P advertiser payment methods.
(Object
= {}
)
Name | Description |
---|---|
args.create Any
|
Contains new payment method entries. |
args.delete Any
|
Contains payment methods to delete. |
args.p2p_advertiser_payment_methods Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.update Any
|
Contains payment methods to update. |
Updates and returns favourite and blocked advertisers of the current user.
(Object
= {}
)
Name | Description |
---|---|
args.add_blocked Any
|
IDs of advertisers to block. |
args.add_favourites Any
|
IDs of advertisers to add as favourites. |
args.p2p_advertiser_relations Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.remove_blocked Any
|
IDs of advertisers to remove from blocked. |
args.remove_favourites Any
|
IDs of advertisers to remove from favourites. |
args.req_id Number
|
[Optional] Used to map request to response. |
Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.
(Object
= {}
)
Name | Description |
---|---|
args.contact_info String
|
[Optional] Advertiser's contact information, to be used as a default for new sell adverts. |
args.default_advert_description String
|
[Optional] Default description that can be used every time an advert is created. |
args.is_listed Number
|
[Optional] Used to set if the advertiser's adverts could be listed. When
0
, adverts won't be listed regardless of they are active or not. This doesn't change the
is_active
of each individual advert.
|
args.p2p_advertiser_update Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_info String
|
[Optional] Advertiser's payment information, to be used as a default for new sell adverts. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.show_name Number
|
[Optional] When
1
, the advertiser's real name will be displayed on to other users on adverts and orders.
|
Creates a P2P chat for the specified order.
(Object
= {}
)
Name | Description |
---|---|
args.order_id String
|
The unique identifier for the order to create the chat for. |
args.p2p_chat_create Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Cancel a P2P order.
(Object
= {}
)
Name | Description |
---|---|
args.id String
|
The unique identifier for this order. |
args.p2p_order_cancel Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Confirm a P2P order.
(Object
= {}
)
Name | Description |
---|---|
args.id String
|
The unique identifier for this order. |
args.p2p_order_confirm Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Creates a P2P order for the specified advert.
(Object
= {}
)
Name | Description |
---|---|
args.advert_id String
|
The unique identifier for the advert to create an order against. |
args.amount Number
|
The amount of currency to be bought or sold. |
args.contact_info String
|
[Optional] Seller contact information. Only applicable for 'sell orders'. |
args.p2p_order_create Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_info String
|
[Optional] Payment instructions, only applicable for sell orders. |
args.payment_method_ids Any
|
IDs of payment methods, only applicable for sell orders. |
args.rate Number
|
[Optional] Conversion rate from account currency to local currency, only applicable for floating rate adverts. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is an update to the order. |
Dispute a P2P order.
(Object
= {}
)
Name | Description |
---|---|
args.dispute_reason String
|
The predefined dispute reason |
args.id String
|
The unique identifier for this order. |
args.p2p_order_dispute Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
Retrieves the information about a P2P order.
(Object
= {}
)
Name | Description |
---|---|
args.id String
|
The unique identifier for the order. |
args.p2p_order_info Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is an update to order |
List active orders.
(Object
= {}
)
Name | Description |
---|---|
args.active Number
|
[Optional] Should be 1 to list active, 0 to list inactive (historical). |
args.advert_id String
|
[Optional] If present, lists orders applying to a specific advert. |
args.limit Number
|
[Optional] Used for paging. |
args.offset Number
|
[Optional] Used for paging. |
args.p2p_order_list Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever there is a change to any order belonging to you. |
Creates a review for the specified order.
(Object
= {}
)
Name | Description |
---|---|
args.order_id String
|
The order identification number. |
args.p2p_order_review Number
|
Must be 1 |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.rating Number
|
Rating for the transaction, 1 to 5. |
args.recommended Any
|
[Optional]
1
if the counterparty is recommendable to others, otherwise
0
.
|
args.req_id Number
|
[Optional] Used to map request to response. |
List all P2P payment methods.
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.
Will return a list payment methods available for the given country. If the request is authenticated the client's residence country will be used.
(Object
= {}
)
Name | Description |
---|---|
args.country String
|
[Optional] 2-letter country code (ISO standard). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_methods Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
Saves client's payment agent details.
(Object
= {}
)
Name | Description |
---|---|
args.affiliate_id String
|
[Optional] Client's My Affiliate id, if exists. |
args.code_of_conduct_approval Number
|
Indicates client's agreement with the Code of Conduct. |
args.commission_deposit Number
|
Commission (%) the agent wants to take on deposits |
args.commission_withdrawal Number
|
Commission (%) the agent wants to take on withdrawals |
args.email String
|
Payment agent's email address. |
args.information String
|
[Optional] Information about payment agent and their proposed service. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.payment_agent_name String
|
The name with which the payment agent is going to be identified. |
args.paymentagent_create Number
|
Must be 1 |
args.phone_numbers Any
|
Payment agent's phone number(s) with country code. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.supported_payment_methods Any
|
A list of supported payment methods. |
args.urls Any
|
The URL(s) of payment agent's website(s). |
Gets client's payment agent details.
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.
(Object
= {}
)
Name | Description |
---|---|
args.currency String
|
[Optional] If specified, only payment agents that supports that currency will be returned (obtained from
payout_currencies
call).
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.paymentagent_list String
|
Client's 2-letter country code (obtained from
residence_list
call).
|
args.req_id Number
|
[Optional] Used to map request to response. |
Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
The amount to transfer. |
args.currency String
|
Currency code. |
args.description String
|
[Optional] Remarks about the transfer. |
args.dry_run Number
|
[Optional] If set to
1
, just do validation.
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.paymentagent_transfer Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.transfer_to String
|
The loginid of the recipient account. |
Initiate a withdrawal to an approved Payment Agent.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
The amount to withdraw to the payment agent. |
args.currency String
|
The currency code. |
args.description String
|
[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. |
args.dry_run Number
|
[Optional] If set to 1, just do validation. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.paymentagent_loginid String
|
The payment agent loginid received from the
paymentagent_list
call.
|
args.paymentagent_withdraw Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.
To send the ping request to the server. Mostly used to test the connection or to keep it alive.
Receive information about my current portfolio of outstanding options
(Object
= {}
)
Name | Description |
---|---|
args.contract_type Any
|
Return only contracts of the specified types |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.portfolio Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
Retrieve a summary of account Profit Table, according to given search criteria
(Object
= {}
)
Name | Description |
---|---|
args.contract_type Any
|
Return only contracts of the specified types |
args.date_from String
|
[Optional] Start date (epoch or YYYY-MM-DD) |
args.date_to String
|
[Optional] End date (epoch or YYYY-MM-DD) |
args.description Number
|
[Optional] If set to 1, will return full contracts description. |
args.limit Number
|
[Optional] Apply upper limit to count of transactions received. |
args.offset Number
|
[Optional] Number of transactions to skip. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.profit_table Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.sort String
|
[Optional] Sort direction. |
Gets latest price for a specific contract.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
[Optional] Proposed contract payout or stake, or multiplier (for lookbacks). |
args.barrier String
|
[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. |
args.barrier2 String
|
[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. |
args.barrier_range String
|
[Optional] Barrier range for callputspread. |
args.basis String
|
[Optional] Indicates type of the
amount
.
|
args.cancellation String
|
Cancellation duration option (only for
MULTUP
and
MULTDOWN
contracts).
|
args.contract_type String
|
The proposed contract type |
args.currency String
|
This can only be the account-holder's currency (obtained from
payout_currencies
call).
|
args.date_expiry Number
|
[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required. |
args.date_start Number
|
[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now. |
args.duration Number
|
[Optional] Duration quantity. Either date_expiry or duration is required. |
args.duration_unit String
|
[Optional] Duration unit -
s
: seconds,
m
: minutes,
h
: hours,
d
: days,
t
: ticks.
|
args.limit_order Any
|
|
args.multiplier Number
|
[Optional] The multiplier for non-binary options. E.g. lookbacks. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.product_type String
|
[Optional] The product type. |
args.proposal Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.selected_tick Number
|
[Optional] The tick that is predicted to have the highest/lowest value - for
TICKHIGH
and
TICKLOW
contracts.
|
args.subscribe Number
|
[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-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).
|
args.symbol String
|
The short symbol name (obtained from
active_symbols
call).
|
args.trading_period_start Number
|
[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time. |
Get latest price (and other information) for a contract in the user's portfolio
(Object
= {}
)
Name | Description |
---|---|
args.contract_id Number
|
[Optional] Contract ID received from a
portfolio
request. If not set, you will receive stream of all open contracts.
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.proposal_open_contract Number
|
Must be
1
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional]
1
to stream.
|
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.
Send report to client's registered e-mail
(Object
= {}
)
Name | Description |
---|---|
args.date_from Number
|
Start date of the report |
args.date_to Number
|
End date of the report |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.report_type String
|
Type of report to be sent to client's registered e-mail address |
args.req_id Number
|
[Optional] Used to map request to response. |
args.request_report Number
|
Must be
1
|
Reset Password.
(Object
= {}
)
Name | Description |
---|---|
args.date_of_birth String
|
[Optional] Date of birth format:
yyyy-mm-dd
. Only required for clients with real-money accounts.
|
args.new_password String
|
New password. 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). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.reset_password Number
|
Must be
1
|
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.
Used for revoking access of particular app.
Sell a Contract as identified from a previous portfolio
call.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.price Number
|
Minimum price at which to sell the contract, or
0
for 'sell at market'.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.sell Number
|
Pass contract_id received from the
portfolio
call.
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.price Number
|
Minimum price at which to sell the contract, or
0
for 'sell at market'.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.sell_contract_for_multiple_accounts Number
|
Must be
1
|
args.shortcode String
|
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.
|
args.tokens Any
|
Authorisation tokens which select the accounts to sell use for the affected accounts. |
This call will try to sell any expired contracts and return the number of sold contracts.
Retrieves the authorization token for the specified service.
(Object
= {}
)
Name | Description |
---|---|
args.country String
|
[Optional] The 2-letter country code. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.referrer String
|
[Optional] The URL of the web page where the Web SDK will be used. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.server String
|
Server (dxtrade only). |
args.service Any
|
The service(s) to retrieve token(s) for. |
args.service_token Number
|
Must be
1
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.set_account_currency String
|
Currency of the account. List of supported currencies can be acquired with
payout_currencies
call.
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.account_turnover String
|
[Optional] The anticipated account turnover. |
args.binary_options_trading_experience String
|
[Optional] Binary options trading experience. |
args.binary_options_trading_frequency String
|
[Optional] Binary options trading frequency. |
args.cfd_trading_experience String
|
[Optional] CFDs trading experience. |
args.cfd_trading_frequency String
|
[Optional] CFDs trading frequency. |
args.education_level String
|
Level of Education. |
args.employment_industry String
|
Industry of Employment. |
args.employment_status String
|
[Optional] Employment Status. |
args.estimated_worth String
|
Estimated Net Worth. |
args.forex_trading_experience String
|
[Optional] Forex trading experience. |
args.forex_trading_frequency String
|
[Optional] Forex trading frequency. |
args.income_source String
|
Income Source. |
args.net_income String
|
Net Annual Income. |
args.occupation String
|
Occupation. |
args.other_instruments_trading_experience String
|
[Optional] Trading experience in other financial instruments. |
args.other_instruments_trading_frequency String
|
[Optional] Trading frequency in other financial instruments. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.set_financial_assessment Number
|
Must be
1
|
args.source_of_wealth String
|
[Optional] Source of wealth. |
Set Self-Exclusion (this call should be used in conjunction with get_self_exclusion
)
(Object
= {}
)
Name | Description |
---|---|
args.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. |
args.max_30day_deposit Any
|
[Optional] 7-day limit on deposits. |
args.max_30day_losses Any
|
[Optional] 30-day limit on losses. |
args.max_30day_turnover Any
|
[Optional] 30-day turnover limit. |
args.max_7day_deposit Any
|
[Optional] 7-day limit on deposits. |
args.max_7day_losses Any
|
[Optional] 7-day limit on losses. |
args.max_7day_turnover Any
|
[Optional] 7-day turnover limit. |
args.max_balance Any
|
[Optional] Maximum account cash balance. |
args.max_deposit Any
|
[Optional] Daily deposit limit. |
args.max_losses Any
|
[Optional] Daily limit on losses. |
args.max_open_bets Any
|
[Optional] Maximum number of open positions. |
args.max_turnover Any
|
[Optional] Daily turnover limit. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.session_duration_limit Any
|
[Optional] Session duration limit, in minutes. |
args.set_self_exclusion Number
|
Must be
1
|
args.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.
|
Set User Settings (this call should be used in conjunction with get_settings
)
(Object
= {}
)
Name | Description |
---|---|
args.account_opening_reason String
|
[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. |
args.address_city String
|
[Optional] Note: not applicable for virtual account. Required field for real money account. |
args.address_line_1 String
|
[Optional] Note: not applicable for virtual account. Required field for real money account. |
args.address_line_2 Any
|
[Optional] Note: not applicable for virtual account. Optional field for real money account. |
args.address_postcode String
|
[Optional] Note: not applicable for virtual account. Optional field for real money account. |
args.address_state String
|
[Optional] Note: not applicable for virtual account. Optional field for real money account. |
args.allow_copiers Number
|
[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. |
args.citizen Any
|
[Optional] Country of legal citizenship, 2-letter country code. |
args.date_of_birth String
|
[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts). |
args.email_consent Number
|
[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing |
args.feature_flag Any
|
|
args.first_name String
|
[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts). |
args.last_name String
|
[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts). |
args.non_pep_declaration Number
|
[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.phone Any
|
[Optional] Note: not applicable for virtual account. Starting with
+
followed by 9-35 digits, hyphens or space.
|
args.place_of_birth String
|
[Optional] Place of birth, 2-letter country code. |
args.preferred_language Any
|
[Optional] User's preferred language, ISO standard language code |
args.req_id Number
|
[Optional] Used to map request to response. |
args.request_professional_status Number
|
[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only. |
args.residence Any
|
[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set. |
args.salutation String
|
[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts). |
args.secret_answer String
|
[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. |
args.secret_question String
|
[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account. |
args.set_settings Number
|
Must be
1
|
args.tax_identification_number String
|
[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company. |
args.tax_residence String
|
[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company. |
Retrieve a summary of account transactions, according to given search criteria
(Object
= {}
)
Name | Description |
---|---|
args.action_type String
|
[Optional] To filter the statement according to the type of transaction. |
args.date_from Number
|
[Optional] Start date (epoch) |
args.date_to Number
|
[Optional] End date (epoch) |
args.description Number
|
[Optional] If set to 1, will return full contracts description. |
args.limit Number
|
[Optional] Maximum number of transactions to receive. |
args.offset Number
|
[Optional] Number of transactions to skip. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.statement Number
|
Must be
1
|
For a given country, returns a list of States of that country. This is useful to populate the account opening form.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.states_list String
|
Client's 2-letter country code (obtained from
residence_list
call)
|
Initiate a continuous stream of spot price updates for a given symbol.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional] If set to 1, will send updates whenever a new tick is received. |
args.ticks Any
|
The short symbol name or array of symbols (obtained from
active_symbols
call).
|
Get historic tick data for a given symbol.
(Object
= {}
)
Name | Description |
---|---|
args.adjust_start_time Number
|
[Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate. |
args.count Number
|
[Optional] An upper limit on ticks to receive. |
args.end String
|
Epoch value representing the latest boundary of the returned ticks. If
latest
is specified, this will be the latest available timestamp.
|
args.granularity Number
|
[Optional] Only applicable for style:
candles
. Candle time-dimension width setting. (default:
60
).
|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.start Number
|
[Optional] Epoch value representing the earliest boundary of the returned ticks.
|
args.style String
|
[Optional] The tick-output style. |
args.subscribe Number
|
[Optional] 1 - to send updates whenever a new tick is received. |
args.ticks_history String
|
Short symbol name (obtained from the
active_symbols
call).
|
Request back-end server epoch time.
To approve the latest version of terms and conditions.
(Object
= {}
)
Name | Description |
---|---|
args.affiliate_coc_agreement Number
|
[Optional] For Affiliate's Code of Conduct Agreement. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.tnc_approval Number
|
Must be
1
|
args.ukgc_funds_protection Number
|
[Optional] For
ASK_UK_FUNDS_PROTECTION
in
cashier
.
|
When a virtual-money's account balance becomes low, it can be topped up using this call.
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.
(Object
= {}
)
Name | Description |
---|---|
args.landing_company String
|
[Optional] If specified, will return only the underlyings for the specified landing company. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_durations Number
|
Must be
1
|
Get list of Trading Platform accounts for client
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Trading platform name |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_accounts Number
|
Must be
1
|
Deposit funds from wallet account to trading platform account
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
Amount to deposit (in the currency of from_wallet). |
args.from_account String
|
Wallet account to transfer money from. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.to_account String
|
Trading account login to deposit money to. |
args.trading_platform_deposit Number
|
Must be
1
|
Change the Trading Platform investor password
(Object
= {}
)
Name | Description |
---|---|
args.account_id String
|
Trading account ID. |
args.new_password String
|
New investor 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. |
args.old_password String
|
Old investor password for validation (non-empty string, accepts any printable ASCII character) |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_investor_password_change Number
|
Must be
1
|
Reset the investor password of a Trading Platform Account
(Object
= {}
)
Name | Description |
---|---|
args.account_id String
|
Trading account ID. |
args.new_password String
|
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). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_investor_password_reset Number
|
Must be
1
|
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
This call creates new Trading account, either demo or real money.
(Object
= {}
)
Name | Description |
---|---|
args.account_type String
|
Account type. |
args.currency String
|
[Optional] Trading account currency, the default value will be the qualified account currency. |
args.dry_run Number
|
[Optional] If set to 1, only validation is performed. |
args.market_type String
|
Market type |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.password String
|
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. |
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.sub_account_type String
|
[Optional] Sub account type. |
args.trading_platform_new_account Number
|
Must be
1
|
Change the Trading Platform password
(Object
= {}
)
Name | Description |
---|---|
args.new_password String
|
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. |
args.old_password String
|
Old password for validation. Must be empty if a password has not been set yet. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_password_change Number
|
Must be
1
|
Reset the password of a Trading Platform Account
(Object
= {}
)
Name | Description |
---|---|
args.new_password String
|
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). |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_password_reset Number
|
Must be
1
|
args.verification_code String
|
Email verification code (received from a
verify_email
call, which must be done first)
|
Get list of Trading Platform products for client
(Object
= {}
)
Name | Description |
---|---|
args.app_id Any
|
[Optional] Specific application
app_id
.
|
args.country_code String
|
[Optional] Country of legal citizenship, 2-letter country code. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_platform_product_listing Number
|
Must be 1. |
This call allows withdrawal from Trading account to a wallet account.
(Object
= {}
)
Name | Description |
---|---|
args.amount Number
|
Amount to withdraw (in the currency of the Trading account). |
args.from_account String
|
Trading account login to withdraw money from. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
Name of trading platform. |
args.req_id Number
|
[Optional] Used to map request to response. |
args.to_account String
|
Wallet account loginid to transfer money to. |
args.trading_platform_withdrawal Number
|
Must be
1
|
Get the list of servers for a trading platform.
(Object
= {}
)
Name | Description |
---|---|
args.account_type String
|
[Optional] Trading account type. |
args.environment String
|
[Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'. |
args.market_type String
|
[Optional] Market type. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.platform String
|
[Optional] Pass the trading platform name, default to mt5 |
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_servers Number
|
Must be
1
|
Receive a list of market opening times for a given date.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.trading_times String
|
Date to receive market opening times for. (
yyyy-mm-dd
format.
today
can also be specified).
|
Subscribe to transaction notifications
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
If set to 1, will send updates whenever there is an update to transactions. If not to 1 then it will not return any records. |
args.transaction Number
|
Must be
1
|
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.
(Object
= {}
)
Name | Description |
---|---|
args.account_from String
|
[Optional] The loginid of the account to transfer funds from. |
args.account_to String
|
[Optional] The loginid of the account to transfer funds to. |
args.accounts String
|
[Optional] To control the list of accounts returned when
account_from
or
account_to
is not provided.
brief
(default value) means that accounts with
mt5
account_type will be excluded; it will run faster.
all
means that all accounts with any account_type (including
mt5
) will be returned.
|
args.amount Number
|
[Optional] The amount to transfer. |
args.currency String
|
[Optional] Currency code. |
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.transfer_between_accounts Number
|
If
account_from
or
account_to
is not provided, it just returns the available accounts.
|
Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.type String
|
Purpose of the email verification call. |
args.url_parameters Any
|
|
args.verify_email String
|
Email address to be verified. |
Request server status.
(Object
= {}
)
Name | Description |
---|---|
args.passthrough Any
|
[Optional] Used to pass data through the websocket, which may be retrieved via the
echo_req
output field.
|
args.req_id Number
|
[Optional] Used to map request to response. |
args.subscribe Number
|
[Optional]
1
to stream the server/website status updates.
|
args.website_status Number
|
Must be
1
|
An in memory storage which can be used for caching
Type: Object
Type: Object
(DurationRange)
Type: Object