From 4117d41aee35371c11a663f27f962ca661103210 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 15 Aug 2023 08:32:21 +0800 Subject: [PATCH 01/74] add script --- scripts/regen-py.pl | 147 ++++++++++++++++++++++++++ scripts/templates/api-call-py.tt2 | 138 ++++++++++++++++++++++++ scripts/templates/streams_list.py.tt2 | 10 ++ 3 files changed, 295 insertions(+) create mode 100644 scripts/regen-py.pl create mode 100644 scripts/templates/api-call-py.tt2 create mode 100644 scripts/templates/streams_list.py.tt2 diff --git a/scripts/regen-py.pl b/scripts/regen-py.pl new file mode 100644 index 0000000..7a17775 --- /dev/null +++ b/scripts/regen-py.pl @@ -0,0 +1,147 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Dir::Self; +use File::Basename qw( basename dirname ); +use JSON::MaybeXS; +use Log::Any qw($log); +use Path::Tiny; +use Template; +use Syntax::Keyword::Try; + + +my $json = JSON::MaybeXS->new( + canonical => 1, + pretty => 1, + indent_length => 4 +); + +my $distroot = dirname(__DIR__); +my $path = "$distroot/scripts/py"; +my $api_calls_filename = "$path/deriv_api_calls.py"; +my $streams_list_filename = "$path/streams_list.py"; + +mkdir($path) unless -d $path; + +chomp(my $date = qx( date +%Y%m%d-%H%M%S )); + +my @methods; + +sub emit_functions { + my ($root, $api) = @_; + $api //= "Binary::API::Generated"; + + $root = path($root); + + # Helper for reporting on anything in the schema we can't handle + my $check = sub { + my $def = shift; + die "non-object def - " . $def->{type} unless $def->{type} eq 'object'; + die "unexpected schema " . $def->{'$schema'} unless $def->{'$schema'} =~ m{http://json-schema.org/draft-0[34]/schema#}; + }; + + # Expected path structure is $methodname/{send,receive}.json + foreach my $dir (sort $root->children) { + my $method = $dir->basename; + + $log->tracef("Applying method %s", $method); + + my ($send, $recv) = map { + try { + my $def = $json->decode(path($dir, $_ . '.json')->slurp_utf8); + $check->($def); + $def; + } + catch ($e) { + die "$method $_ load/validation failed: $e" + } + } qw(send receive); + + # NOTE: Some type definitions use arrays, we don't support that yet + + my $send_props = parse_properties($send); + chomp(my $encoded_props = $json->encode($send_props)); + + push @methods, { + # the real api method name e.g. proposal_open_contract + method => $method, + # Any request that supports req_id will automatically get an ID and this will be used + # in determining which response is which. + has_req_id => exists $send_props->{req_id}, + needs_method_arg => needs_method_arg($method, $send_props), + description => $send->{description}, + is_method => exists $send_props->{$method}, + encoded_props => $encoded_props =~ s/"/'/rg =~ s/\n/\n /rg =~ s/ :/:/rg, + props => parse_properties($send, full => 1), + }; + } +} + +sub parse_properties { + my $schema = shift; + my %options = @_; + my $props = $schema->{properties}; + my @required = ($schema->{required} || [])->@*; + my %data; + for my $prop (keys %$props) { + if (exists $props->{$prop}{properties}) { + $data{$prop} = parse_properties($props->{$prop}); + } else { + my $type; + $type = 'numeric' if ($props->{$prop}{type} || '') =~ /^(?:number)$/; + $type = 'integer' if ($props->{$prop}{type} || '') =~ /^(?:integer)$/; + $type = $1 if ($props->{$prop}{type} || '') =~ /^(string|boolean)$/; + my $description = $props->{$prop}->%{description}; + $description =~ s/`//g if $description; + $data{$prop} = { + $type ? (type => $type) : (), + (grep { /^$prop$/ } @required) ? (required => 1) : (), + $options{full} ? (description => $description) : (), + }; + } + } + return \%data; +} + +sub to_camel_case { shift =~ s/_(\w)/\U$1/rg } + +sub needs_method_arg { + my ($method, $send_props) = @_; + + # { "method": { "type": "integer", "enum": [1] } } + return 1 unless my $enum = $send_props->{$method}{enum}; + + return 0 if scalar($enum->@*) == 1 and $enum->[0] == 1; + + return 1; +} + +emit_functions($ENV{BINARYCOM_API_SCHEMA_PATH} // '/home/git/regentmarkets/binary-websocket-api/config/v3'); + +my $template = Template->new( + INCLUDE_PATH => "$distroot/scripts/templates", +); + +$template->process( + "api-call-py.tt2", + { + scriptname => $0, + date => $date, + methods => \@methods, + }, \my $output) or die $template->error . "\n"; + +path($api_calls_filename)->spew_utf8($output); + +$output = ''; +$template->process( + 'streams_list.py.tt2', + { + scriptname => $0, + date => $date, + methods => \@methods, + }, \$output +) or die $template->error . "\n"; + +path($streams_list_filename)->spew_utf8($output); diff --git a/scripts/templates/api-call-py.tt2 b/scripts/templates/api-call-py.tt2 new file mode 100644 index 0000000..682a4dc --- /dev/null +++ b/scripts/templates/api-call-py.tt2 @@ -0,0 +1,138 @@ +# This file was automatically generated by [% scriptname %] at [% date %] +[%# Convert JSON schema API definition into a Python class %] + +from numbers import Number + +# ======================= +# ----- API Methods ----- +# ======================= + + +class DerivAPICalls: +[% FOREACH m IN methods -%] + + async def [% m.method %](self, args=None): + """ + [% m.description %] + + Parameters: + ----------- + args : dict [% IF m.props %]with following keys[% END %] +[% FOREACH p IN m.props -%] +[% type = p.value.type -%] +[% SWITCH type -%] +[% CASE 'integer' -%] +[% type = 'int' -%] +[% CASE 'numeric' -%] +[% type = 'Number' -%] +[% CASE 'string' -%] +[% type = 'str' -%] +[% CASE 'boolean' -%] +[% type = 'bool' -%] +[% CASE -%] +[% type = 'Any' -%] +[% END -%] + [% p.key %] : [% type %] +[% IF p.value.description -%] + [% p.value.description %] +[% END -%] +[% END -%] + """ + + if args is None: + args = {} + + config = [% m.encoded_props %] + + all_args = { + 'method': '[% m.method %]', + 'needs_method_arg': '[% m.needs_method_arg %]', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) +[% END -%] + + async def process_request(self, all_args): + """ + Process request + """ + + config = all_args['config'] + parsed_args = parse_args(all_args) + error = validate_args(config=config, args=parsed_args) + if error: + raise ValueError(error) + return await self.send(parsed_args) + +__pdoc__ = { + 'parse_args' : False, + 'validate_args' : False, + 'deriv_api.deriv_api_calls.DerivAPICalls.process_request' : False +} + +def parse_args(all_args): + """ + Parse request args + """ + + parsed_args = all_args['args'] + method = all_args['method'] + + if all_args['needs_method_arg'] and not(isinstance(parsed_args, dict)): + parsed_args = {method: parsed_args} + + parsed_args[method] = parsed_args.get(method, 1) + + config = all_args['config'] + for param in parsed_args: + value = parsed_args[param] + if not (param in config): + return + + ptype = config[param].get('type') + if ptype and ptype == 'string': + parsed_args[param] = f'{value}' + elif ptype and (ptype == 'numeric' or ptype == 'boolean'): + parsed_args[param] = int(float(value)) + + return parsed_args + + +type_checkers = { + 'dict': lambda value: isinstance(value, dict), + 'numeric': lambda value: isinstance(value, Number), + 'string': lambda value: isinstance(value, str), + 'boolean': lambda value: value in [True, False, 0, 1], + 'integer': lambda value: isinstance(value, int) +} + + +def validate_args(config, args): + """ + Validate request args + """ + + if not isinstance(args, dict): + return f"Requires an dict but a {type(args)} is passed." + + error_messages = [] + missing = [k for k in config.keys() if (config.get(k) or {}).get('required') and not (k in args)] + if len(missing): + error_messages.append(f'Required parameters missing: {", ".join(missing)}') + + for param in args.keys(): + value = args[param] + if param not in config: + continue + expected_type = config[param].get('type') + + if not expected_type: + continue + + checker = type_checkers.get(expected_type) + if not checker or not checker(value): + error_messages.append(f'{expected_type} value expected but found {type(value)}: {param}') + + return ' - '.join(error_messages) if len(error_messages) else '' diff --git a/scripts/templates/streams_list.py.tt2 b/scripts/templates/streams_list.py.tt2 new file mode 100644 index 0000000..3d4db4b --- /dev/null +++ b/scripts/templates/streams_list.py.tt2 @@ -0,0 +1,10 @@ +# This file was automatically generated by [% scriptname %] at [% date %] + +# streams_list is the list of subscriptions msg_types available. +# Please update it by [% scriptname %] +# Refer https://developers.binary.com/ +streams_list = [[% FOREACH m IN methods -%] +[% FOREACH p IN m.props -%] +[% IF p.key == 'subscribe' -%] '[% m.method -%]', [% END -%] +[% END -%] +[% END -%]] From 56b2bf9eb500e862bec137e6f3bd5056d76c8e4e Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 15 Aug 2023 09:42:49 +0800 Subject: [PATCH 02/74] refactor --- scripts/regen-py.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/regen-py.pl b/scripts/regen-py.pl index 7a17775..2264203 100644 --- a/scripts/regen-py.pl +++ b/scripts/regen-py.pl @@ -19,19 +19,15 @@ ); my $distroot = dirname(__DIR__); -my $path = "$distroot/scripts/py"; -my $api_calls_filename = "$path/deriv_api_calls.py"; -my $streams_list_filename = "$path/streams_list.py"; - -mkdir($path) unless -d $path; +my $api_calls_filename = "$distroot/deriv_api/deriv_api_calls.py"; +my $streams_list_filename = "$distroot/deriv_api/streams_list.py"; chomp(my $date = qx( date +%Y%m%d-%H%M%S )); my @methods; sub emit_functions { - my ($root, $api) = @_; - $api //= "Binary::API::Generated"; + my ($root) = @_; $root = path($root); @@ -118,7 +114,7 @@ sub needs_method_arg { return 1; } -emit_functions($ENV{BINARYCOM_API_SCHEMA_PATH} // '/home/git/regentmarkets/binary-websocket-api/config/v3'); +emit_functions($ENV{BINARYCOM_API_SCHEMA_PATH} // '/home/git/binary-com/deriv-developers-portal/config/v3'); my $template = Template->new( INCLUDE_PATH => "$distroot/scripts/templates", From 240c0cc3691402d887bd3636522218a21b0ed373 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 15 Aug 2023 09:51:10 +0800 Subject: [PATCH 03/74] update schema --- deriv_api/deriv_api_calls.py | 2024 ++++++++++------------------------ deriv_api/streams_list.py | 4 +- 2 files changed, 602 insertions(+), 1426 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 961c545..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20220627-142751 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -10,136 +10,6 @@ class DerivAPICalls: - async def account_closure(self, args=None): - """ - 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. - - Parameters: - ----------- - args : dict with following keys - account_closure : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - reason : str - Reason for closing off accounts. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'account_closure': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'reason': { - 'required': 1, - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'account_closure', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def account_security(self, args=None): - """ - This call manages two-factor account authentication - - Parameters: - ----------- - args : dict with following keys - account_security : int - Must be 1 - otp : str - [Optional] OTP (one-time passcode) generated by a 2FA application like Authy, Google Authenticator or Yubikey. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - totp_action : str - [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. - """ - - if args is None: - args = {} - - config = { - 'account_security': { - 'required': 1, - 'type': 'integer' - }, - 'otp': { - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'totp_action': { - 'type': 'string' - } - } - - all_args = { - 'method': 'account_security', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def account_statistics(self, args=None): - """ - Send request to get account statistics - - Parameters: - ----------- - args : dict with following keys - account_statistics : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'account_statistics': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'account_statistics', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def active_symbols(self, args=None): """ Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading). @@ -150,6 +20,8 @@ async def active_symbols(self, args=None): active_symbols : str If you use brief, only a subset of fields will be returned. landing_company : str + Deprecated - replaced by landing_company_short. + landing_company_short : str [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. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -170,132 +42,20 @@ async def active_symbols(self, args=None): 'landing_company': { 'type': 'string' }, - 'passthrough': {}, - 'product_type': { - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'active_symbols', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def affiliate_account_add(self, args=None): - """ - Register a new affiliate - - Parameters: - ----------- - args : dict with following keys - address_city : str - City name within 50 characters. - address_line_1 : str - Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/- - address_line_2 : str - [Optional] Within 70 characters. - address_postcode : str - Within 20 characters and may not contain '+'. - address_state : str - Possible value receive from states_list call. - affiliate_account_add : int - [Required] Must be 1 - country : str - Country of legal citizenship, 2-letter country code. - first_name : str - The official first name of the affiliate. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - last_name : str - The official last name of the affiliate. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - non_pep_declaration : int - Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - password : str - Password for the affiliate account. (Accepts any printable ASCII character. Must be between 6-50 characters, and include numbers, lowercase and uppercase letters.). - phone : str - Registered phone number of the affiliate. Starting with + followed by 8-35 digits, allowing hyphens or space. - req_id : int - [Optional] Used to map request to response. - tnc_accepted : int - Indicates client has agreed to the terms and conditions. - username : str - Desired username for the affiliate account. Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - """ - - if args is None: - args = {} - - config = { - 'address_city': { - 'required': 1, - 'type': 'string' - }, - 'address_line_1': { - 'required': 1, - 'type': 'string' - }, - 'address_line_2': { - 'type': 'string' - }, - 'address_postcode': { - 'required': 1, - 'type': 'string' - }, - 'address_state': { - 'required': 1, - 'type': 'string' - }, - 'affiliate_account_add': { - 'required': 1, - 'type': 'integer' - }, - 'country': { - 'required': 1, - 'type': 'string' - }, - 'first_name': { - 'required': 1, - 'type': 'string' - }, - 'last_name': { - 'required': 1, + 'landing_company_short': { 'type': 'string' }, - 'non_pep_declaration': { - 'required': 1, - 'type': 'integer' - }, 'passthrough': {}, - 'password': { - 'required': 1, - 'type': 'string' - }, - 'phone': { - 'required': 1, + 'product_type': { 'type': 'string' }, 'req_id': { 'type': 'integer' - }, - 'tnc_accepted': { - 'required': 1, - 'type': 'integer' - }, - 'username': { - 'required': 1, - 'type': 'string' } } all_args = { - 'method': 'affiliate_account_add', + 'method': 'active_symbols', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -494,7 +254,7 @@ async def app_markup_details(self, args=None): [Optional] If set to 1, will return app_markup transaction details. limit : Number [Optional] Apply upper limit to count of transactions received. - offset : Number + offset : int [Optional] Number of transactions to skip. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -535,7 +295,7 @@ async def app_markup_details(self, args=None): 'type': 'numeric' }, 'offset': { - 'type': 'numeric' + 'type': 'integer' }, 'passthrough': {}, 'req_id': { @@ -556,6 +316,56 @@ async def app_markup_details(self, args=None): return await self.process_request(all_args) + async def app_markup_statistics(self, args=None): + """ + Retrieve statistics of `app_markup`. + + Parameters: + ----------- + args : dict with following keys + app_markup_statistics : int + Must be 1 + date_from : str + Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time. + date_to : str + End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'app_markup_statistics': { + 'required': 1, + 'type': 'integer' + }, + 'date_from': { + 'required': 1, + 'type': 'string' + }, + 'date_to': { + 'required': 1, + 'type': 'string' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'app_markup_statistics', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def app_register(self, args=None): """ Register a new OAuth application @@ -564,7 +374,7 @@ async def app_register(self, args=None): ----------- args : dict with following keys app_markup_percentage : Number - [Optional] Markup to be added to contract prices (as a percentage of contract payout). + [Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%. app_register : int Must be 1 appstore : str @@ -648,7 +458,7 @@ async def app_update(self, args=None): ----------- args : dict with following keys app_markup_percentage : Number - [Optional] Markup to be added to contract prices (as a percentage of contract payout). + [Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%. app_update : int Application app_id. appstore : str @@ -734,6 +544,8 @@ async def asset_index(self, args=None): asset_index : int Must be 1 landing_company : str + Deprecated - replaced by landing_company_short. + landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -752,6 +564,9 @@ async def asset_index(self, args=None): 'landing_company': { 'type': 'string' }, + 'landing_company_short': { + 'type': 'string' + }, 'passthrough': {}, 'req_id': { 'type': 'integer' @@ -928,6 +743,9 @@ async def buy(self, args=None): 'duration_unit': { 'type': 'string' }, + 'growth_rate': { + 'type': 'numeric' + }, 'limit_order': { 'stop_loss': { 'type': 'numeric' @@ -1178,211 +996,9 @@ async def cashier(self, args=None): return await self.process_request(all_args) - async def cashier_payments(self, args=None): + async def contract_update(self, args=None): """ - List pending transactions. This can only be used for crypto transactions. - - Parameters: - ----------- - args : dict with following keys - cashier_payments : Number - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - provider : str - [Optional] Cashier provider. crypto will be default option for crypto currency accounts. - req_id : int - [Optional] Used to map request to response. - subscribe : int - [Optional] If set to 1, will send updates whenever there is update to crypto payments. - transaction_type : str - [Optional] Type of transactions to receive. - """ - - if args is None: - args = {} - - config = { - 'cashier_payments': { - 'required': 1, - 'type': 'numeric' - }, - 'passthrough': {}, - 'provider': { - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - }, - 'subscribe': { - 'type': 'integer' - }, - 'transaction_type': { - 'type': 'string' - } - } - - all_args = { - 'method': 'cashier_payments', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def cashier_withdrawal_cancel(self, args=None): - """ - Request for cancelling a withdrawal. This can only be used for crypto transactions. - - Parameters: - ----------- - args : dict with following keys - cashier_withdrawal_cancel : Number - Must be 1 - id : str - The unique identifier for the transaction. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'cashier_withdrawal_cancel': { - 'required': 1, - 'type': 'numeric' - }, - 'id': { - 'required': 1, - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'cashier_withdrawal_cancel', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def change_email(self, args=None): - """ - Change Email. - - Parameters: - ----------- - args : dict with following keys - change_email : str - Must be verify or update. - new_email : str - Email address to be verified. - new_password : str - [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. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - verification_code : str - Email verification code (received from a verify_email call, which must be done first) - """ - - if args is None: - args = {} - - config = { - 'change_email': { - 'required': 1, - 'type': 'string' - }, - 'new_email': { - 'required': 1, - 'type': 'string' - }, - 'new_password': { - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'verification_code': { - 'required': 1, - 'type': 'string' - } - } - - all_args = { - 'method': 'change_email', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def change_password(self, args=None): - """ - Change Password. Note: This call is only available when authenticated using an OAuth token. - - Parameters: - ----------- - args : dict with following keys - change_password : Number - Must be 1 - new_password : str - New password (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address) - old_password : str - Old password for validation (non-empty string, accepts any printable ASCII character) - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'change_password': { - 'required': 1, - 'type': 'numeric' - }, - 'new_password': { - 'required': 1, - 'type': 'string' - }, - 'old_password': { - 'required': 1, - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'change_password', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def contract_update(self, args=None): - """ - Update a contract condition. + Update a contract condition. Parameters: ----------- @@ -1490,7 +1106,9 @@ async def contracts_for(self, args=None): currency : str [Optional] Currency of the contract's stake and payout (obtained from payout_currencies call). landing_company : str - [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. + Deprecated - Replaced by landing_company_short. + landing_company_short : str + [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str @@ -1513,6 +1131,9 @@ async def contracts_for(self, args=None): 'landing_company': { 'type': 'string' }, + 'landing_company_short': { + 'type': 'string' + }, 'passthrough': {}, 'product_type': { 'type': 'string' @@ -1760,7 +1381,7 @@ async def document_upload(self, args=None): document_id : str [Optional] Document ID (required for Passport, Proof of ID and Driver's License) document_issuing_country : str - [Optional] 2-letter country code + 2-letter country code, mandatory for POI only document_type : str Document type document_upload : int @@ -2065,88 +1686,6 @@ async def get_account_status(self, args=None): return await self.process_request(all_args) - async def get_account_types(self, args=None): - """ - Types of accounts available to create or link to. - - Parameters: - ----------- - args : dict with following keys - get_account_types : Number - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'get_account_types': { - 'required': 1, - 'type': 'numeric' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'get_account_types', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def get_available_accounts_to_transfer(self, args=None): - """ - Get Available Accounts to Transfer. - - Parameters: - ----------- - args : dict with following keys - get_available_accounts_to_transfer : Number - Must be 1 - loginid : str - The unique identifier for this trading/wallet account. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'get_available_accounts_to_transfer': { - 'required': 1, - 'type': 'numeric' - }, - 'loginid': { - 'required': 1, - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'get_available_accounts_to_transfer', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def get_financial_assessment(self, args=None): """ 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. @@ -2306,6 +1845,8 @@ async def identity_verification_document_add(self, args=None): Parameters: ----------- args : dict with following keys + document_additional : str + [Optional] Additional info required by some document types. document_number : str The identification number of the document. document_type : str @@ -2324,6 +1865,9 @@ async def identity_verification_document_add(self, args=None): args = {} config = { + 'document_additional': { + 'type': 'string' + }, 'document_number': { 'required': 1, 'type': 'string' @@ -2400,6 +1944,8 @@ async def landing_company_details(self, args=None): Parameters: ----------- args : dict with following keys + country : str + [Optional] Will return an extra field tin_not_mandatory indicating if the landing company does not require tax identification number for the provided country. landing_company_details : str Landing company shortcode. passthrough : Any @@ -2412,6 +1958,9 @@ async def landing_company_details(self, args=None): args = {} config = { + 'country': { + 'type': 'string' + }, 'landing_company_details': { 'required': 1, 'type': 'string' @@ -2431,66 +1980,16 @@ async def landing_company_details(self, args=None): return await self.process_request(all_args) - async def link_wallet(self, args=None): + async def login_history(self, args=None): """ - Link a wallet to a trading app. + Retrieve a summary of login history for user. Parameters: ----------- args : dict with following keys - client_id : str - The unique identifier for this trading account. - link_wallet : Number - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - wallet_id : str - The unique identifier for this wallet. - """ - - if args is None: - args = {} - - config = { - 'client_id': { - 'required': 1, - 'type': 'string' - }, - 'link_wallet': { - 'required': 1, - 'type': 'numeric' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'wallet_id': { - 'required': 1, - 'type': 'string' - } - } - - all_args = { - 'method': 'link_wallet', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def login_history(self, args=None): - """ - Retrieve a summary of login history for user. - - Parameters: - ----------- - args : dict with following keys - limit : int - [Optional] Apply limit to count of login history records. - login_history : int + limit : int + [Optional] Apply limit to count of login history records. + login_history : int Must be 1 passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -2728,7 +2227,7 @@ async def mt5_new_account(self, args=None): mainPassword : str The master password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). This field is required. mt5_account_category : str - [Optional] To choose whether account is conventional or not. Unavailable for financial_stp MT5_account_type + [Optional] To choose whether account is conventional or swap_free. Unavailable for financial_stp MT5_account_type mt5_account_type : str [Optional] Financial: Variable spreads, High leverage. Financial STP: Variable spreads, Medium Leverage, more products. If 'account_type' set to 'financial', setting 'mt5_account_type' is also required. mt5_new_account : int @@ -2737,7 +2236,7 @@ async def mt5_new_account(self, args=None): Client's name. The maximum length here is 101 characters. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - phone : str + phone : Any [Optional] User's phone number. phonePassword : str [Optional] The user's phone password. @@ -2747,6 +2246,8 @@ async def mt5_new_account(self, args=None): [Optional] Trade server. state : str [Optional] User's state (region) of residence. + sub_account_category : str + [Optional] Indicate the sub account category that we have in the cfd group naming convention. zipCode : str [Optional] User's zip code. """ @@ -2807,9 +2308,7 @@ async def mt5_new_account(self, args=None): 'type': 'string' }, 'passthrough': {}, - 'phone': { - 'type': 'string' - }, + 'phone': {}, 'phonePassword': { 'type': 'string' }, @@ -2820,6 +2319,9 @@ async def mt5_new_account(self, args=None): 'state': { 'type': 'string' }, + 'sub_account_category': { + 'type': 'string' + }, 'zipCode': { 'type': 'string' } @@ -3092,14 +2594,12 @@ async def new_account_maltainvest(self, args=None): [Optional] Possible value receive from states_list call. affiliate_token : str [Optional] Affiliate token, within 32 characters. - binary_options_trading_experience : str - [Optional] Binary options trading experience. - binary_options_trading_frequency : str - [Optional] Binary options trading frequency. - cfd_trading_experience : str - [Optional] CFDs trading experience. - cfd_trading_frequency : str - [Optional] CFDs trading frequency. + cfd_experience : str + How much experience do you have in CFD trading? + cfd_frequency : str + How many CFD trades have you placed in the past 12 months? + cfd_trading_definition : str + In your understanding, CFD trading allows you to: citizen : str [Optional] Country of legal citizenship, 2-letter country code. Possible value receive from residence_list call. client_type : str @@ -3113,19 +2613,19 @@ async def new_account_maltainvest(self, args=None): employment_industry : str Industry of Employment. employment_status : str - [Optional] Employment Status. + Employment Status. estimated_worth : str Estimated Net Worth. first_name : str Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - forex_trading_experience : str - [Optional] Forex trading experience. - forex_trading_frequency : str - [Optional] Forex trading frequency. income_source : str Income Source. last_name : str Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. + leverage_impact_trading : str + How does leverage affect CFD trading? + leverage_trading_high_risk_stop_loss : str + Leverage trading is high-risk, so it's a good idea to use risk management features such as stop loss. Stop loss allows you to net_income : str Net Annual Income. new_account_maltainvest : int @@ -3134,10 +2634,6 @@ async def new_account_maltainvest(self, args=None): [Optional] Indicates client's self-declaration of not being a PEP/RCA. occupation : str Occupation. - other_instruments_trading_experience : str - [Optional] Trading experience in other financial instruments. - other_instruments_trading_frequency : str - [Optional] Trading frequency in other financial instruments. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any @@ -3146,20 +2642,30 @@ async def new_account_maltainvest(self, args=None): [Optional] Place of birth, 2-letter country code. req_id : int [Optional] Used to map request to response. + required_initial_margin : str + When would you be required to pay an initial margin? residence : str 2-letter country code, possible value receive from residence_list call. + risk_tolerance : str + Do you understand that you could potentially lose 100% of the money you use to trade? salutation : str Accept any value in enum list. secret_answer : str [Optional] Answer to secret question, within 4-50 characters. secret_question : str [Optional] Accept any value in enum list. + source_of_experience : str + How much knowledge and experience do you have in relation to online trading? source_of_wealth : str [Optional] Source of wealth. tax_identification_number : str Tax identification number. Only applicable for real money account. Required for maltainvest landing company. tax_residence : str Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company. + trading_experience_financial_instruments : str + How much experience do you have with other financial instruments? + trading_frequency_financial_instruments : str + How many trades have you placed with other financial instruments in the past 12 months? """ if args is None: @@ -3167,7 +2673,6 @@ async def new_account_maltainvest(self, args=None): config = { 'accept_risk': { - 'required': 1, 'type': 'integer' }, 'account_opening_reason': { @@ -3196,16 +2701,13 @@ async def new_account_maltainvest(self, args=None): 'affiliate_token': { 'type': 'string' }, - 'binary_options_trading_experience': { - 'type': 'string' - }, - 'binary_options_trading_frequency': { + 'cfd_experience': { 'type': 'string' }, - 'cfd_trading_experience': { + 'cfd_frequency': { 'type': 'string' }, - 'cfd_trading_frequency': { + 'cfd_trading_definition': { 'type': 'string' }, 'citizen': { @@ -3222,40 +2724,36 @@ async def new_account_maltainvest(self, args=None): 'type': 'string' }, 'education_level': { - 'required': 1, 'type': 'string' }, 'employment_industry': { - 'required': 1, 'type': 'string' }, 'employment_status': { + 'required': 1, 'type': 'string' }, 'estimated_worth': { - 'required': 1, 'type': 'string' }, 'first_name': { 'required': 1, 'type': 'string' }, - 'forex_trading_experience': { + 'income_source': { 'type': 'string' }, - 'forex_trading_frequency': { + 'last_name': { + 'required': 1, 'type': 'string' }, - 'income_source': { - 'required': 1, + 'leverage_impact_trading': { 'type': 'string' }, - 'last_name': { - 'required': 1, + 'leverage_trading_high_risk_stop_loss': { 'type': 'string' }, 'net_income': { - 'required': 1, 'type': 'string' }, 'new_account_maltainvest': { @@ -3266,13 +2764,6 @@ async def new_account_maltainvest(self, args=None): 'type': 'integer' }, 'occupation': { - 'required': 1, - 'type': 'string' - }, - 'other_instruments_trading_experience': { - 'type': 'string' - }, - 'other_instruments_trading_frequency': { 'type': 'string' }, 'passthrough': {}, @@ -3283,10 +2774,16 @@ async def new_account_maltainvest(self, args=None): 'req_id': { 'type': 'integer' }, + 'required_initial_margin': { + 'type': 'string' + }, 'residence': { 'required': 1, 'type': 'string' }, + 'risk_tolerance': { + 'type': 'string' + }, 'salutation': { 'required': 1, 'type': 'string' @@ -3297,6 +2794,9 @@ async def new_account_maltainvest(self, args=None): 'secret_question': { 'type': 'string' }, + 'source_of_experience': { + 'type': 'string' + }, 'source_of_wealth': { 'type': 'string' }, @@ -3307,6 +2807,12 @@ async def new_account_maltainvest(self, args=None): 'tax_residence': { 'required': 1, 'type': 'string' + }, + 'trading_experience_financial_instruments': { + 'type': 'string' + }, + 'trading_frequency_financial_instruments': { + 'type': 'string' } } @@ -3587,160 +3093,6 @@ async def new_account_virtual(self, args=None): return await self.process_request(all_args) - async def new_account_wallet(self, args=None): - """ - Create a new account real-money wallet account. - - Parameters: - ----------- - args : dict with following keys - address_city : str - [Optional] Within 35 characters. - address_line_1 : str - [Optional] Mailing address. - address_line_2 : str - [Optional] Within 70 characters. - address_postcode : str - [Optional] Within 20 characters and may not contain '+'. - address_state : str - [Optional] Possible value receive from states_list call. - currency : str - [Optional] To set currency of the account. List of supported currencies can be acquired with payout_currencies call. - date_of_birth : str - [Optional] Date of birth format: yyyy-mm-dd. - first_name : str - [Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - last_name : str - [Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes. - new_account_wallet : int - Must be 1 - non_pep_declaration : int - [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - payment_method : str - To set method which is used to transfer to/from wallet. - phone : str - [Optional] Starting with + followed by 8-35 digits, allowing hyphens or space. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'address_city': { - 'type': 'string' - }, - 'address_line_1': { - 'type': 'string' - }, - 'address_line_2': { - 'type': 'string' - }, - 'address_postcode': { - 'type': 'string' - }, - 'address_state': { - 'type': 'string' - }, - 'currency': { - 'required': 1, - 'type': 'string' - }, - 'date_of_birth': { - 'type': 'string' - }, - 'first_name': { - 'type': 'string' - }, - 'last_name': { - 'type': 'string' - }, - 'new_account_wallet': { - 'required': 1, - 'type': 'integer' - }, - 'non_pep_declaration': { - 'type': 'integer' - }, - 'passthrough': {}, - 'payment_method': { - 'required': 1, - 'type': 'string' - }, - 'phone': { - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'new_account_wallet', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def notification_event(self, args=None): - """ - Notify the backend about a specific event. - - Parameters: - ----------- - args : dict with following keys - args : Any - category : str - The category or nature of the event. - event : str - The name of the event. - notification_event : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'args': { - 'documents': {} - }, - 'category': { - 'required': 1, - 'type': 'string' - }, - 'event': { - 'required': 1, - 'type': 'string' - }, - 'notification_event': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'notification_event', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def oauth_apps(self, args=None): """ List all my used OAuth applications. @@ -3788,6 +3140,8 @@ async def p2p_advert_create(self, args=None): args : dict with following keys amount : Number The total amount of the advert, in advertiser's account currency. + block_trade : int + [Optional] Indicates if this is block trade ad or not. Default: 0. contact_info : str [Optional] Advertiser contact information. description : str @@ -3828,6 +3182,9 @@ async def p2p_advert_create(self, args=None): 'required': 1, 'type': 'numeric' }, + 'block_trade': { + 'type': 'integer' + }, 'contact_info': { 'type': 'string' }, @@ -3949,6 +3306,8 @@ async def p2p_advert_list(self, args=None): [Optional] Search for advertiser by name. Partial matches will be returned. amount : Number [Optional] How much to buy or sell, used to calculate prices. + block_trade : int + [Optional] Return block trade adverts when 1, non-block trade adverts when 0 (default). counterparty_type : str [Optional] Filter the adverts by counterparty_type. favourites_only : int @@ -3956,7 +3315,7 @@ async def p2p_advert_list(self, args=None): limit : int [Optional] Used for paging. local_currency : str - [Optional] Currency to conduct payment transaction in, defaults to the main currency for the client's country. + [Optional] Currency to conduct payment transaction in. If not provided, only ads from country of residence will be returned. offset : int [Optional] Used for paging. p2p_advert_list : int @@ -3986,6 +3345,9 @@ async def p2p_advert_list(self, args=None): 'amount': { 'type': 'numeric' }, + 'block_trade': { + 'type': 'integer' + }, 'counterparty_type': { 'type': 'string' }, @@ -4292,37 +3654,105 @@ async def p2p_advertiser_info(self, args=None): return await self.process_request(all_args) - async def p2p_advertiser_payment_methods(self, args=None): + async def p2p_advertiser_list(self, args=None): """ - Manage or list P2P advertiser payment methods. + Retrieve advertisers has/had trade with the current advertiser. Parameters: ----------- args : dict with following keys - create : Any - Contains new payment method entries. - delete : Any - Contains payment methods to delete. - p2p_advertiser_payment_methods : int + advertiser_name : str + [Optional] Search for advertiser by name. Partial matches will be returned. + is_blocked : int + [Optional] Used to return only blocked or unblocked partners + limit : int + [Optional] Used for paging. + offset : int + [Optional] Used for paging. + p2p_advertiser_list : int Must be 1 passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. - update : Any - Contains payment methods to update. + sort_by : str + [Optional] How the results are sorted. + trade_partners : int + [Optional] Get all advertisers has/had trade. """ if args is None: args = {} config = { - 'create': {}, - 'delete': {}, - 'p2p_advertiser_payment_methods': { - 'required': 1, - 'type': 'integer' - }, + 'advertiser_name': { + 'type': 'string' + }, + 'is_blocked': { + 'type': 'integer' + }, + 'limit': { + 'type': 'integer' + }, + 'offset': { + 'type': 'integer' + }, + 'p2p_advertiser_list': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + }, + 'sort_by': { + 'type': 'string' + }, + 'trade_partners': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'p2p_advertiser_list', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + + async def p2p_advertiser_payment_methods(self, args=None): + """ + Manage or list P2P advertiser payment methods. + + Parameters: + ----------- + args : dict with following keys + create : Any + Contains new payment method entries. + delete : Any + Contains payment methods to delete. + p2p_advertiser_payment_methods : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + req_id : int + [Optional] Used to map request to response. + update : Any + Contains payment methods to update. + """ + + if args is None: + args = {} + + config = { + 'create': {}, + 'delete': {}, + 'p2p_advertiser_payment_methods': { + 'required': 1, + 'type': 'integer' + }, 'passthrough': {}, 'req_id': { 'type': 'integer' @@ -4412,6 +3842,8 @@ async def p2p_advertiser_update(self, args=None): [Optional] Used to map request to response. show_name : int [Optional] When 1, the advertiser's real name will be displayed on to other users on adverts and orders. + upgrade_limits : int + [Optional] Used to upgrade daily limits of eligible advertiser. """ if args is None: @@ -4440,6 +3872,9 @@ async def p2p_advertiser_update(self, args=None): }, 'show_name': { 'type': 'integer' + }, + 'upgrade_limits': { + 'type': 'integer' } } @@ -4547,6 +3982,8 @@ async def p2p_order_confirm(self, args=None): Parameters: ----------- args : dict with following keys + dry_run : int + [Optional] If set to 1, only validation is performed. id : str The unique identifier for this order. p2p_order_confirm : int @@ -4555,12 +3992,17 @@ async def p2p_order_confirm(self, args=None): [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. + verification_code : str + [Optional] Verification code received from email. """ if args is None: args = {} config = { + 'dry_run': { + 'type': 'integer' + }, 'id': { 'required': 1, 'type': 'string' @@ -4572,6 +4014,9 @@ async def p2p_order_confirm(self, args=None): 'passthrough': {}, 'req_id': { 'type': 'integer' + }, + 'verification_code': { + 'type': 'string' } } @@ -5302,6 +4747,49 @@ async def paymentagent_withdraw(self, args=None): return await self.process_request(all_args) + async def paymentagent_withdraw_justification(self, args=None): + """ + Provide justification to perform withdrawal using a Payment Agent. + + Parameters: + ----------- + args : dict with following keys + message : str + Reasons for needing to withdraw using a Payment Agent. + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + paymentagent_withdraw_justification : int + Must be 1 + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'message': { + 'type': 'string' + }, + 'passthrough': {}, + 'paymentagent_withdraw_justification': { + 'required': 1, + 'type': 'integer' + }, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'paymentagent_withdraw_justification', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def payout_currencies(self, args=None): """ Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned. @@ -5436,7 +4924,7 @@ async def profit_table(self, args=None): [Optional] If set to 1, will return full contracts description. limit : Number [Optional] Apply upper limit to count of transactions received. - offset : Number + offset : int [Optional] Number of transactions to skip. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -5466,7 +4954,7 @@ async def profit_table(self, args=None): 'type': 'numeric' }, 'offset': { - 'type': 'numeric' + 'type': 'integer' }, 'passthrough': {}, 'profit_table': { @@ -5521,6 +5009,8 @@ async def proposal(self, args=None): [Optional] Duration quantity. Either date_expiry or duration is required. duration_unit : str [Optional] Duration unit - s: seconds, m: minutes, h: hours, d: days, t: ticks. + growth_rate : Number + [Optional] Growth rate of an accumulator contract. limit_order : Any multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. @@ -5584,6 +5074,9 @@ async def proposal(self, args=None): 'duration_unit': { 'type': 'string' }, + 'growth_rate': { + 'type': 'numeric' + }, 'limit_order': { 'stop_loss': { 'type': 'numeric' @@ -5716,117 +5209,6 @@ async def reality_check(self, args=None): return await self.process_request(all_args) - async def request_report(self, args=None): - """ - Send report to client's registered e-mail - - Parameters: - ----------- - args : dict with following keys - date_from : int - Start date of the report - date_to : int - End date of the report - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - report_type : str - Type of report to be sent to client's registered e-mail address - req_id : int - [Optional] Used to map request to response. - request_report : int - Must be 1 - """ - - if args is None: - args = {} - - config = { - 'date_from': { - 'required': 1, - 'type': 'integer' - }, - 'date_to': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'report_type': { - 'required': 1, - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - }, - 'request_report': { - 'required': 1, - 'type': 'integer' - } - } - - all_args = { - 'method': 'request_report', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def reset_password(self, args=None): - """ - Reset Password. - - Parameters: - ----------- - args : dict with following keys - date_of_birth : str - [Optional] Date of birth format: yyyy-mm-dd. Only required for clients with real-money accounts. - new_password : str - 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). - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - reset_password : int - Must be 1 - verification_code : str - Email verification code (received from a verify_email call, which must be done first) - """ - - if args is None: - args = {} - - config = { - 'date_of_birth': { - 'type': 'string' - }, - 'new_password': { - 'required': 1, - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'reset_password': { - 'required': 1, - 'type': 'integer' - }, - 'verification_code': { - 'required': 1, - 'type': 'string' - } - } - - all_args = { - 'method': 'reset_password', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def residence_list(self, args=None): """ This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form. @@ -6040,64 +5422,6 @@ async def sell_expired(self, args=None): return await self.process_request(all_args) - async def service_token(self, args=None): - """ - Retrieves the authorization token for the specified service. - - Parameters: - ----------- - args : dict with following keys - country : str - [Optional] The 2-letter country code. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - referrer : str - [Optional] The URL of the web page where the Web SDK will be used. - req_id : int - [Optional] Used to map request to response. - server : str - Server (dxtrade only). - service : Any - The service(s) to retrieve token(s) for. - service_token : int - Must be 1 - """ - - if args is None: - args = {} - - config = { - 'country': { - 'type': 'string' - }, - 'passthrough': {}, - 'referrer': { - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - }, - 'server': { - 'type': 'string' - }, - 'service': { - 'required': 1 - }, - 'service_token': { - 'required': 1, - 'type': 'integer' - } - } - - all_args = { - 'method': 'service_token', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def set_account_currency(self, args=None): """ 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. @@ -6154,23 +5478,24 @@ async def set_financial_assessment(self, args=None): cfd_trading_frequency : str [Optional] CFDs trading frequency. education_level : str - Level of Education. + [Optional] Level of Education. employment_industry : str - Industry of Employment. + [Optional] Industry of Employment. employment_status : str [Optional] Employment Status. estimated_worth : str - Estimated Net Worth. + [Optional] Estimated Net Worth. + financial_information : Any forex_trading_experience : str [Optional] Forex trading experience. forex_trading_frequency : str [Optional] Forex trading frequency. income_source : str - Income Source. + [Optional] Income Source. net_income : str - Net Annual Income. + [Optional] Net Annual Income. occupation : str - Occupation. + [Optional] Occupation. other_instruments_trading_experience : str [Optional] Trading experience in other financial instruments. other_instruments_trading_frequency : str @@ -6183,6 +5508,8 @@ async def set_financial_assessment(self, args=None): Must be 1 source_of_wealth : str [Optional] Source of wealth. + trading_experience : Any + trading_experience_regulated : Any """ if args is None: @@ -6205,20 +5532,52 @@ async def set_financial_assessment(self, args=None): 'type': 'string' }, 'education_level': { - 'required': 1, 'type': 'string' }, 'employment_industry': { - 'required': 1, 'type': 'string' }, 'employment_status': { 'type': 'string' }, 'estimated_worth': { - 'required': 1, 'type': 'string' }, + 'financial_information': { + 'account_turnover': { + 'type': 'string' + }, + 'education_level': { + 'required': 1, + 'type': 'string' + }, + 'employment_industry': { + 'required': 1, + 'type': 'string' + }, + 'employment_status': { + 'type': 'string' + }, + 'estimated_worth': { + 'required': 1, + 'type': 'string' + }, + 'income_source': { + 'required': 1, + 'type': 'string' + }, + 'net_income': { + 'required': 1, + 'type': 'string' + }, + 'occupation': { + 'required': 1, + 'type': 'string' + }, + 'source_of_wealth': { + 'type': 'string' + } + }, 'forex_trading_experience': { 'type': 'string' }, @@ -6226,15 +5585,12 @@ async def set_financial_assessment(self, args=None): 'type': 'string' }, 'income_source': { - 'required': 1, 'type': 'string' }, 'net_income': { - 'required': 1, 'type': 'string' }, 'occupation': { - 'required': 1, 'type': 'string' }, 'other_instruments_trading_experience': { @@ -6253,6 +5609,74 @@ async def set_financial_assessment(self, args=None): }, 'source_of_wealth': { 'type': 'string' + }, + 'trading_experience': { + 'binary_options_trading_experience': { + 'type': 'string' + }, + 'binary_options_trading_frequency': { + 'type': 'string' + }, + 'cfd_trading_experience': { + 'type': 'string' + }, + 'cfd_trading_frequency': { + 'type': 'string' + }, + 'forex_trading_experience': { + 'type': 'string' + }, + 'forex_trading_frequency': { + 'type': 'string' + }, + 'other_instruments_trading_experience': { + 'type': 'string' + }, + 'other_instruments_trading_frequency': { + 'type': 'string' + } + }, + 'trading_experience_regulated': { + 'cfd_experience': { + 'required': 1, + 'type': 'string' + }, + 'cfd_frequency': { + 'required': 1, + 'type': 'string' + }, + 'cfd_trading_definition': { + 'required': 1, + 'type': 'string' + }, + 'leverage_impact_trading': { + 'required': 1, + 'type': 'string' + }, + 'leverage_trading_high_risk_stop_loss': { + 'required': 1, + 'type': 'string' + }, + 'required_initial_margin': { + 'required': 1, + 'type': 'string' + }, + 'risk_tolerance': { + 'required': 1, + 'type': 'string' + }, + 'source_of_experience': { + 'required': 1, + 'type': 'string' + }, + 'trading_experience_financial_instruments': { + 'required': 1, + 'type': 'string' + }, + 'trading_frequency_financial_instruments': { + 'required': 1, + 'type': 'string' + } } } @@ -6370,8 +5794,12 @@ async def set_settings(self, args=None): [Optional] Country of legal citizenship, 2-letter country code. date_of_birth : str [Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts). + dxtrade_user_exception : int + Boolean value 1 or 0, indicating if user email belong to dxtrade exception list. email_consent : int [Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing + employment_status : str + [Optional] Employment Status. feature_flag : Any first_name : str [Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts). @@ -6405,6 +5833,8 @@ async def set_settings(self, args=None): [Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company. tax_residence : str [Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company. + trading_hub : int + [Optional] Enable/Disable Trading Hub dashboard """ if args is None: @@ -6434,9 +5864,15 @@ async def set_settings(self, args=None): 'date_of_birth': { 'type': 'string' }, + 'dxtrade_user_exception': { + 'type': 'integer' + }, 'email_consent': { 'type': 'integer' }, + 'employment_status': { + 'type': 'string' + }, 'feature_flag': { 'wallet': { 'type': 'integer' @@ -6482,6 +5918,9 @@ async def set_settings(self, args=None): }, 'tax_residence': { 'type': 'string' + }, + 'trading_hub': { + 'type': 'integer' } } @@ -6511,7 +5950,7 @@ async def statement(self, args=None): [Optional] If set to 1, will return full contracts description. limit : Number [Optional] Maximum number of transactions to receive. - offset : Number + offset : int [Optional] Number of transactions to skip. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -6541,7 +5980,7 @@ async def statement(self, args=None): 'type': 'numeric' }, 'offset': { - 'type': 'numeric' + 'type': 'integer' }, 'passthrough': {}, 'req_id': { @@ -6850,6 +6289,8 @@ async def trading_durations(self, args=None): ----------- args : dict with following keys landing_company : str + Deprecated - Replaced by landing_company_short. + landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. @@ -6866,6 +6307,9 @@ async def trading_durations(self, args=None): 'landing_company': { 'type': 'string' }, + 'landing_company_short': { + 'type': 'string' + }, 'passthrough': {}, 'req_id': { 'type': 'integer' @@ -6885,27 +6329,41 @@ async def trading_durations(self, args=None): return await self.process_request(all_args) - async def trading_platform_accounts(self, args=None): + async def trading_platform_investor_password_reset(self, args=None): """ - Get list of Trading Platform accounts for client + Reset the investor password of a Trading Platform Account Parameters: ----------- args : dict with following keys + account_id : str + Trading account ID. + new_password : str + New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str - Trading platform name + Name of trading platform. req_id : int [Optional] Used to map request to response. - trading_platform_accounts : int + trading_platform_investor_password_reset : int Must be 1 + verification_code : str + Email verification code (received from a verify_email call, which must be done first) """ if args is None: args = {} config = { + 'account_id': { + 'required': 1, + 'type': 'string' + }, + 'new_password': { + 'required': 1, + 'type': 'string' + }, 'passthrough': {}, 'platform': { 'required': 1, @@ -6914,14 +6372,18 @@ async def trading_platform_accounts(self, args=None): 'req_id': { 'type': 'integer' }, - 'trading_platform_accounts': { + 'trading_platform_investor_password_reset': { 'required': 1, 'type': 'integer' + }, + 'verification_code': { + 'required': 1, + 'type': 'string' } } all_args = { - 'method': 'trading_platform_accounts', + 'method': 'trading_platform_investor_password_reset', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -6929,37 +6391,33 @@ async def trading_platform_accounts(self, args=None): return await self.process_request(all_args) - async def trading_platform_deposit(self, args=None): + async def trading_platform_password_reset(self, args=None): """ - Deposit funds from wallet account to trading platform account + Reset the password of a Trading Platform Account Parameters: ----------- args : dict with following keys - amount : Number - Amount to deposit (in the currency of from_wallet). - from_account : str - Wallet account to transfer money from. + new_password : str + New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int [Optional] Used to map request to response. - to_account : str - Trading account login to deposit money to. - trading_platform_deposit : int + trading_platform_password_reset : int Must be 1 + verification_code : str + Email verification code (received from a verify_email call, which must be done first) """ if args is None: args = {} config = { - 'amount': { - 'type': 'numeric' - }, - 'from_account': { + 'new_password': { + 'required': 1, 'type': 'string' }, 'passthrough': {}, @@ -6970,18 +6428,18 @@ async def trading_platform_deposit(self, args=None): 'req_id': { 'type': 'integer' }, - 'to_account': { + 'trading_platform_password_reset': { 'required': 1, - 'type': 'string' + 'type': 'integer' }, - 'trading_platform_deposit': { + 'verification_code': { 'required': 1, - 'type': 'integer' + 'type': 'string' } } all_args = { - 'method': 'trading_platform_deposit', + 'method': 'trading_platform_password_reset', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -6989,26 +6447,26 @@ async def trading_platform_deposit(self, args=None): return await self.process_request(all_args) - async def trading_platform_investor_password_change(self, args=None): + async def trading_servers(self, args=None): """ - Change the Trading Platform investor password + Get the list of servers for a trading platform. Parameters: ----------- args : dict with following keys - account_id : str - Trading account ID. - new_password : str - 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. - old_password : str - Old investor password for validation (non-empty string, accepts any printable ASCII character) + account_type : str + [Optional] Trading account type. + environment : str + [Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'. + market_type : str + [Optional] Market type. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str - Name of trading platform. + [Optional] Pass the trading platform name, default to mt5 req_id : int [Optional] Used to map request to response. - trading_platform_investor_password_change : Number + trading_servers : int Must be 1 """ @@ -7016,34 +6474,30 @@ async def trading_platform_investor_password_change(self, args=None): args = {} config = { - 'account_id': { - 'required': 1, + 'account_type': { 'type': 'string' }, - 'new_password': { - 'required': 1, + 'environment': { 'type': 'string' }, - 'old_password': { - 'required': 1, + 'market_type': { 'type': 'string' }, 'passthrough': {}, 'platform': { - 'required': 1, 'type': 'string' }, 'req_id': { 'type': 'integer' }, - 'trading_platform_investor_password_change': { + 'trading_servers': { 'required': 1, - 'type': 'numeric' + 'type': 'integer' } } all_args = { - 'method': 'trading_platform_investor_password_change', + 'method': 'trading_servers', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7051,61 +6505,37 @@ async def trading_platform_investor_password_change(self, args=None): return await self.process_request(all_args) - async def trading_platform_investor_password_reset(self, args=None): + async def trading_times(self, args=None): """ - Reset the investor password of a Trading Platform Account + Receive a list of market opening times for a given date. Parameters: ----------- args : dict with following keys - account_id : str - Trading account ID. - new_password : str - New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - platform : str - Name of trading platform. req_id : int [Optional] Used to map request to response. - trading_platform_investor_password_reset : int - Must be 1 - verification_code : str - Email verification code (received from a verify_email call, which must be done first) + trading_times : str + Date to receive market opening times for. (yyyy-mm-dd format. today can also be specified). """ if args is None: args = {} config = { - 'account_id': { - 'required': 1, - 'type': 'string' - }, - 'new_password': { - 'required': 1, - 'type': 'string' - }, 'passthrough': {}, - 'platform': { - 'required': 1, - 'type': 'string' - }, 'req_id': { 'type': 'integer' }, - 'trading_platform_investor_password_reset': { - 'required': 1, - 'type': 'integer' - }, - 'verification_code': { + 'trading_times': { 'required': 1, 'type': 'string' } } all_args = { - 'method': 'trading_platform_investor_password_reset', + 'method': 'trading_times', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7113,32 +6543,20 @@ async def trading_platform_investor_password_reset(self, args=None): return await self.process_request(all_args) - async def trading_platform_new_account(self, args=None): + async def transaction(self, args=None): """ - This call creates new Trading account, either demo or real money. + Subscribe to transaction notifications Parameters: ----------- args : dict with following keys - account_type : str - Account type. - currency : str - [Optional] Trading account currency, the default value will be the qualified account currency. - dry_run : int - [Optional] If set to 1, only validation is performed. - market_type : str - Market type passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - password : str - The master password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). This field is required. - platform : str - Name of trading platform. req_id : int [Optional] Used to map request to response. - sub_account_type : str - [Optional] Sub account type. - trading_platform_new_account : int + subscribe : int + 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. + transaction : int Must be 1 """ @@ -7146,43 +6564,22 @@ async def trading_platform_new_account(self, args=None): args = {} config = { - 'account_type': { - 'required': 1, - 'type': 'string' - }, - 'currency': { - 'type': 'string' - }, - 'dry_run': { - 'type': 'integer' - }, - 'market_type': { - 'required': 1, - 'type': 'string' - }, 'passthrough': {}, - 'password': { - 'required': 1, - 'type': 'string' - }, - 'platform': { - 'required': 1, - 'type': 'string' - }, 'req_id': { 'type': 'integer' }, - 'sub_account_type': { - 'type': 'string' + 'subscribe': { + 'required': 1, + 'type': 'integer' }, - 'trading_platform_new_account': { + 'transaction': { 'required': 1, 'type': 'integer' } } all_args = { - 'method': 'trading_platform_new_account', + 'method': 'transaction', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7190,219 +6587,62 @@ async def trading_platform_new_account(self, args=None): return await self.process_request(all_args) - async def trading_platform_password_change(self, args=None): + async def transfer_between_accounts(self, args=None): """ - Change the Trading Platform password + This call allows transfers between accounts held by a given user. Transfer funds between your fiat and cryptocurrency accounts (for a fee). Please note that account_from should be same as current authorized account. Parameters: ----------- args : dict with following keys - new_password : str - New trading password. Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address. - old_password : str - Old password for validation. Must be empty if a password has not been set yet. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - platform : str - Name of trading platform. - req_id : int - [Optional] Used to map request to response. - trading_platform_password_change : Number - Must be 1 - """ - - if args is None: - args = {} - - config = { - 'new_password': { - 'required': 1, - 'type': 'string' - }, - 'old_password': { - 'type': 'string' - }, - 'passthrough': {}, - 'platform': { - 'required': 1, - 'type': 'string' - }, - 'req_id': { - 'type': 'integer' - }, - 'trading_platform_password_change': { - 'required': 1, - 'type': 'numeric' - } - } - - all_args = { - 'method': 'trading_platform_password_change', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def trading_platform_password_reset(self, args=None): - """ - Reset the password of a Trading Platform Account - - Parameters: - ----------- - args : dict with following keys - new_password : str - New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). + account_from : str + [Optional] The loginid of the account to transfer funds from. + account_to : str + [Optional] The loginid of the account to transfer funds to. + accounts : str + [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. + amount : Number + [Optional] The amount to transfer. + currency : str + [Optional] Currency code. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - platform : str - Name of trading platform. req_id : int [Optional] Used to map request to response. - trading_platform_password_reset : int - Must be 1 - verification_code : str - Email verification code (received from a verify_email call, which must be done first) + transfer_between_accounts : int + If account_from or account_to is not provided, it just returns the available accounts. """ if args is None: args = {} config = { - 'new_password': { - 'required': 1, + 'account_from': { 'type': 'string' }, - 'passthrough': {}, - 'platform': { - 'required': 1, + 'account_to': { 'type': 'string' }, - 'req_id': { - 'type': 'integer' - }, - 'trading_platform_password_reset': { - 'required': 1, - 'type': 'integer' - }, - 'verification_code': { - 'required': 1, - 'type': 'string' - } - } - - all_args = { - 'method': 'trading_platform_password_reset', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def trading_platform_product_listing(self, args=None): - """ - Get list of Trading Platform products for client - - Parameters: - ----------- - args : dict with following keys - app_id : Any - [Optional] Specific application app_id. - country_code : str - [Optional] Country of legal citizenship, 2-letter country code. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - trading_platform_product_listing : int - Must be 1. - """ - - if args is None: - args = {} - - config = { - 'app_id': {}, - 'country_code': { - 'required': 1, + 'accounts': { 'type': 'string' }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'trading_platform_product_listing': { - 'required': 1, - 'type': 'integer' - } - } - - all_args = { - 'method': 'trading_platform_product_listing', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def trading_platform_withdrawal(self, args=None): - """ - This call allows withdrawal from Trading account to a wallet account. - - Parameters: - ----------- - args : dict with following keys - amount : Number - Amount to withdraw (in the currency of the Trading account). - from_account : str - Trading account login to withdraw money from. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - platform : str - Name of trading platform. - req_id : int - [Optional] Used to map request to response. - to_account : str - Wallet account loginid to transfer money to. - trading_platform_withdrawal : int - Must be 1 - """ - - if args is None: - args = {} - - config = { 'amount': { - 'required': 1, 'type': 'numeric' }, - 'from_account': { - 'required': 1, + 'currency': { 'type': 'string' }, 'passthrough': {}, - 'platform': { - 'required': 1, - 'type': 'string' - }, 'req_id': { 'type': 'integer' }, - 'to_account': { - 'required': 1, - 'type': 'string' - }, - 'trading_platform_withdrawal': { + 'transfer_between_accounts': { 'required': 1, 'type': 'integer' } } all_args = { - 'method': 'trading_platform_withdrawal', + 'method': 'transfer_between_accounts', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7410,26 +6650,22 @@ async def trading_platform_withdrawal(self, args=None): return await self.process_request(all_args) - async def trading_servers(self, args=None): + async def unsubscribe_email(self, args=None): """ - Get the list of servers for a trading platform. + It unsubscribe user from the email subscription. Parameters: ----------- args : dict with following keys - account_type : str - [Optional] Trading account type. - environment : str - [Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'. - market_type : str - [Optional] Market type. + binary_user_id : Number + Customer User ID. + checksum : str + The generated checksum for the customer. passthrough : Any [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - platform : str - [Optional] Pass the trading platform name, default to mt5 req_id : int [Optional] Used to map request to response. - trading_servers : int + unsubscribe_email : int Must be 1 """ @@ -7437,30 +6673,26 @@ async def trading_servers(self, args=None): args = {} config = { - 'account_type': { - 'type': 'string' - }, - 'environment': { - 'type': 'string' + 'binary_user_id': { + 'required': 1, + 'type': 'numeric' }, - 'market_type': { + 'checksum': { + 'required': 1, 'type': 'string' }, 'passthrough': {}, - 'platform': { - 'type': 'string' - }, 'req_id': { 'type': 'integer' }, - 'trading_servers': { + 'unsubscribe_email': { 'required': 1, 'type': 'integer' } } all_args = { - 'method': 'trading_servers', + 'method': 'unsubscribe_email', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7468,9 +6700,9 @@ async def trading_servers(self, args=None): return await self.process_request(all_args) - async def trading_times(self, args=None): + async def verify_email(self, args=None): """ - Receive a list of market opening times for a given date. + Verify an email address for various purposes. The system will send an email to the address containing a security code for verification. Parameters: ----------- @@ -7479,8 +6711,11 @@ async def trading_times(self, args=None): [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. - trading_times : str - Date to receive market opening times for. (yyyy-mm-dd format. today can also be specified). + type : str + Purpose of email verification, request_email and reset_password are the only two types restricted from all unoffical apps + url_parameters : Any + verify_email : str + Email address to be verified. """ if args is None: @@ -7491,121 +6726,59 @@ async def trading_times(self, args=None): 'req_id': { 'type': 'integer' }, - 'trading_times': { + 'type': { 'required': 1, 'type': 'string' - } - } - - all_args = { - 'method': 'trading_times', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def transaction(self, args=None): - """ - Subscribe to transaction notifications - - Parameters: - ----------- - args : dict with following keys - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - subscribe : int - 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. - transaction : int - Must be 1 - """ - - if args is None: - args = {} - - config = { - 'passthrough': {}, - 'req_id': { - 'type': 'integer' }, - 'subscribe': { - 'required': 1, - 'type': 'integer' + 'url_parameters': { + 'affiliate_token': { + 'type': 'string' + }, + 'date_first_contact': { + 'type': 'string' + }, + 'gclid_url': { + 'type': 'string' + }, + 'pa_amount': { + 'type': 'numeric' + }, + 'pa_currency': { + 'type': 'string' + }, + 'pa_loginid': { + 'type': 'string' + }, + 'pa_remarks': { + 'type': 'string' + }, + 'redirect_to': { + 'type': 'integer' + }, + 'signup_device': { + 'type': 'string' + }, + 'utm_ad_id': {}, + 'utm_adgroup_id': {}, + 'utm_adrollclk_id': {}, + 'utm_campaign': {}, + 'utm_campaign_id': {}, + 'utm_content': {}, + 'utm_fbcl_id': {}, + 'utm_gl_client_id': {}, + 'utm_medium': {}, + 'utm_msclk_id': {}, + 'utm_source': {}, + 'utm_term': {} }, - 'transaction': { + 'verify_email': { 'required': 1, - 'type': 'integer' - } - } - - all_args = { - 'method': 'transaction', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - - async def transfer_between_accounts(self, args=None): - """ - This call allows transfers between accounts held by a given user. Transfer funds between your fiat and cryptocurrency accounts (for a fee). Please note that account_from should be same as current authorized account. - - Parameters: - ----------- - args : dict with following keys - account_from : str - [Optional] The loginid of the account to transfer funds from. - account_to : str - [Optional] The loginid of the account to transfer funds to. - accounts : str - [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. - amount : Number - [Optional] The amount to transfer. - currency : str - [Optional] Currency code. - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. - req_id : int - [Optional] Used to map request to response. - transfer_between_accounts : int - If account_from or account_to is not provided, it just returns the available accounts. - """ - - if args is None: - args = {} - - config = { - 'account_from': { - 'type': 'string' - }, - 'account_to': { 'type': 'string' - }, - 'accounts': { - 'type': 'string' - }, - 'amount': { - 'type': 'numeric' - }, - 'currency': { - 'type': 'string' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - }, - 'transfer_between_accounts': { - 'required': 1, - 'type': 'integer' } } all_args = { - 'method': 'transfer_between_accounts', + 'method': 'verify_email', 'needs_method_arg': '1', 'args': args, 'config': config, @@ -7613,9 +6786,9 @@ async def transfer_between_accounts(self, args=None): return await self.process_request(all_args) - async def verify_email(self, args=None): + async def verify_email_cellxpert(self, args=None): """ - Verify an email address for various purposes. The system will send an email to the address containing a security code for verification. + Verify an email address for Cellxpert. The system will send an email to the address containing a security code for verification. Parameters: ----------- @@ -7627,7 +6800,7 @@ async def verify_email(self, args=None): type : str Purpose of the email verification call. url_parameters : Any - verify_email : str + verify_email_cellxpert : str Email address to be verified. """ @@ -7647,6 +6820,9 @@ async def verify_email(self, args=None): 'affiliate_token': { 'type': 'string' }, + 'bta': { + 'type': 'integer' + }, 'date_first_contact': { 'type': 'string' }, @@ -7684,14 +6860,14 @@ async def verify_email(self, args=None): 'utm_source': {}, 'utm_term': {} }, - 'verify_email': { + 'verify_email_cellxpert': { 'required': 1, 'type': 'string' } } all_args = { - 'method': 'verify_email', + 'method': 'verify_email_cellxpert', 'needs_method_arg': '1', 'args': args, 'config': config, diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 0c54bbb..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,6 +1,6 @@ -# This file was automatically generated by scripts/regen-py.pl at 20220627-142751 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl # Refer https://developers.binary.com/ -streams_list = [ 'balance', 'buy', 'cashier_payments', 'exchange_rates', 'p2p_advert_info', 'p2p_advertiser_create', 'p2p_advertiser_info', 'p2p_order_create', 'p2p_order_info', 'p2p_order_list', 'proposal', 'proposal_open_contract', 'ticks', 'ticks_history', 'transaction', 'website_status', ] +streams_list = [ 'balance', 'buy', 'exchange_rates', 'p2p_advert_info', 'p2p_advertiser_create', 'p2p_advertiser_info', 'p2p_order_create', 'p2p_order_info', 'p2p_order_list', 'proposal', 'proposal_open_contract', 'ticks', 'ticks_history', 'transaction', 'website_status', ] From 3adc58e72571e2cac2bbdddf728a0c569219a13b Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Thu, 24 Aug 2023 09:24:49 +0800 Subject: [PATCH 04/74] fix test --- .gitignore | 1 + tests/test_deriv_api_calls.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 730e11c..bf35fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ venv/ dist .coverage build +tags diff --git a/tests/test_deriv_api_calls.py b/tests/test_deriv_api_calls.py index 55fbab1..f9504df 100644 --- a/tests/test_deriv_api_calls.py +++ b/tests/test_deriv_api_calls.py @@ -10,10 +10,10 @@ async def send(self, args): async def test_deriv_api_calls(mocker): api = DerivedDerivAPICalls() assert isinstance(api, DerivAPICalls) - assert (await api.account_closure({'account_closure': 1, 'reason': 'want'})) == {'account_closure': 1, - 'reason': 'want'}, 'account_closure can get right result' - with pytest.raises(ValueError, match='Required parameters missing: reason'): - await api.account_closure({}) + assert (await api.exchange_rates({'exchange_rates': 1, 'base_currency': 'USD'})) == {'exchange_rates': 1, + 'base_currency': 'USD'}, 'exchange_rates can get right result' + with pytest.raises(ValueError, match='Required parameters missing: base_currency'): + await api.exchange_rates({}) def test_parse_parse_args(): From db68ec83b923003ef6945873d75e842c9a5553de Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Thu, 24 Aug 2023 16:07:37 +0800 Subject: [PATCH 05/74] update changelog --- CHANGELOG.md | 8 ++++++-- setup.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d680ef..68d0305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ # Changelog +## 0.1.4 + +Sync API + ## 0.1.3 Fix a typo, which cause ws connection no response + ## 0.1.2 Added middleware support @@ -10,10 +15,9 @@ Added middleware support ## 0.1.1 ### Fixed: -Fixed a PyPI constraint where the package can only be installed on python ==3.9.6 +Fixed a PyPI constraint where the package can only be installed on python ==3.9.6 ## 0.1.0 Initial version. - diff --git a/setup.py b/setup.py index 1632ac4..f31b57e 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.3', + version='0.1.4', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 616664523e89ca8ad99d433d6b2c62f38f8733a2 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Thu, 24 Aug 2023 17:22:46 +0800 Subject: [PATCH 06/74] rename default ws server --- deriv_api/deriv_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deriv_api/deriv_api.py b/deriv_api/deriv_api.py index eabbd30..62d8eab 100644 --- a/deriv_api/deriv_api.py +++ b/deriv_api/deriv_api.py @@ -85,7 +85,7 @@ class DerivAPI(DerivAPICalls): storage: None def __init__(self, **options: str) -> None: - endpoint = options.get('endpoint', 'frontend.binaryws.com') + endpoint = options.get('endpoint', 'ws.derivws.com') lang = options.get('lang', 'EN') brand = options.get('brand', '') cache = options.get('cache', InMemory()) From 05e66098b4d023e4a94f847b58538e1349acba91 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Thu, 24 Aug 2023 17:23:24 +0800 Subject: [PATCH 07/74] update ChangeLog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d0305..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.5 + +Change default ws server + ## 0.1.4 Sync API From 5776d26859ac65cb8f472127cf258afdaf2ad29d Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Thu, 24 Aug 2023 17:28:41 +0800 Subject: [PATCH 08/74] increase version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f31b57e..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.4', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 971d1f01fd729810a867ea82c4f525aca310f98c Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:03:02 +0800 Subject: [PATCH 09/74] try update --- .circleci/config.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea741ee..f6daf5f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout # check out source code to working directory - run: sudo chown -R circleci:circleci /usr/local/bin - restore_cache: - # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - run: command: | @@ -45,8 +45,8 @@ jobs: - restore_cache: key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} - run: - command: | - make setup + command: | + make setup - save_cache: key: deps9-{{ .Branch }}-{{ checksum "Pipfile.lock" }} paths: @@ -56,6 +56,15 @@ jobs: git config --local user.email "sysadmin@binary.com" git config --local user.name "gh-pages deploy bot" make gh-pages + update_schema: + <<: *default + steps: + - run: + command: | + git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal + BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl + git status + workflows: build: jobs: @@ -81,4 +90,5 @@ workflows: filters: branches: only: - - master + - master + - update_schema: From 22517db77d6ee9144d6bdcbc028207e36a9dae12 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:10:59 +0800 Subject: [PATCH 10/74] try update --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f6daf5f..48dd8a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -91,4 +91,4 @@ workflows: branches: only: - master - - update_schema: + - update_schema From 5dcae6b42e19f8ec4662f4a7979f157b00f08e46 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:22:09 +0800 Subject: [PATCH 11/74] fix command --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48dd8a9..860d15f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,10 +60,10 @@ jobs: <<: *default steps: - run: - command: | - git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal - BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl - git status + command: | + git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal + BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl + git status workflows: build: From e540498087da67242872dc1934b478e31d12d472 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:32:06 +0800 Subject: [PATCH 12/74] checkout --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 860d15f..6398e26 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,6 +59,7 @@ jobs: update_schema: <<: *default steps: + - checkout - run: command: | git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal From 535967955efeb2f0913d1ea7869f41f457c0413d Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:40:08 +0800 Subject: [PATCH 13/74] install modules --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6398e26..ef20603 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,6 +63,7 @@ jobs: - run: command: | git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal + cpanm -n Dir::Self File::Basename JSON::MaybeXS Log::Any Path::Tiny Template Syntax::Keyword::Try BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl git status From a46ba28f4b85cbf7abe17c2ca6693aaf66ac5ccf Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 17:44:42 +0800 Subject: [PATCH 14/74] install cpanm --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef20603..883af85 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,7 +63,8 @@ jobs: - run: command: | git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal - cpanm -n Dir::Self File::Basename JSON::MaybeXS Log::Any Path::Tiny Template Syntax::Keyword::Try + curl -L https://cpanmin.us | perl - --sudo App::cpanminus + sudo cpanm -n Dir::Self File::Basename JSON::MaybeXS Log::Any Path::Tiny Template Syntax::Keyword::Try BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl git status From 1310399605ff887ff12fbc16f31089a3948719a2 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 18:11:55 +0800 Subject: [PATCH 15/74] test status --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 883af85..132aef3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,7 +66,12 @@ jobs: curl -L https://cpanmin.us | perl - --sudo App::cpanminus sudo cpanm -n Dir::Self File::Basename JSON::MaybeXS Log::Any Path::Tiny Template Syntax::Keyword::Try BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl - git status + if [[ $(git diff --shortstat) == ' 2 files changed, 2 insertions(+), 2 deletions(-)' ]] + then + echo 'no change' + else + echo "has change" + fi workflows: build: From ce51d66f00fb5533893f90b921d2a929695dd33a Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 18:12:49 +0800 Subject: [PATCH 16/74] add name --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 132aef3..7be6064 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -61,6 +61,7 @@ jobs: steps: - checkout - run: + name: update schema command: | git clone https://github.com/binary-com/deriv-developers-portal.git /tmp/deriv-developers-portal curl -L https://cpanmin.us | perl - --sudo App::cpanminus From e29a3b476f1a5ddc8469b253d31200ccb1489729 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 22:18:05 +0800 Subject: [PATCH 17/74] try push --- .circleci/config.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7be6064..d77140c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,6 +60,11 @@ jobs: <<: *default steps: - checkout + - run: + name: check git message + command: | + GIT_COMMIT_DESC="$(git log --format=oneline -n 1 $CIRCLE_SHA1)"; + if echo $GIT_COMMIT_DESC | grep -E "\[\s*\bci\b.*]"; then exit 0; else echo "need tag [ci] to trigger tests"; exit 1; fi - run: name: update schema command: | @@ -69,9 +74,13 @@ jobs: BINARYCOM_API_SCHEMA_PATH=/tmp/deriv-developers-portal/config/v3 perl scripts/regen-py.pl if [[ $(git diff --shortstat) == ' 2 files changed, 2 insertions(+), 2 deletions(-)' ]] then - echo 'no change' + echo 'Schema no change' + exit 0 else - echo "has change" + echo "Schama updated" + git add . + git commit -m 'update schema automatically' + git push fi workflows: From 880ab7a60b1ed694d31311a5c6feefa9b4f96ac4 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 22:40:08 +0800 Subject: [PATCH 18/74] no check git --- .circleci/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d77140c..c996eb8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,11 +60,6 @@ jobs: <<: *default steps: - checkout - - run: - name: check git message - command: | - GIT_COMMIT_DESC="$(git log --format=oneline -n 1 $CIRCLE_SHA1)"; - if echo $GIT_COMMIT_DESC | grep -E "\[\s*\bci\b.*]"; then exit 0; else echo "need tag [ci] to trigger tests"; exit 1; fi - run: name: update schema command: | From ec189698f9f98d10ea15a5aaeaec5377c0d1c27b Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 22:47:57 +0800 Subject: [PATCH 19/74] config git --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c996eb8..1a9d16f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,6 +60,11 @@ jobs: <<: *default steps: - checkout + - run: + name: config git + command: | + git config --global user.email "nobody@deriv.com" + git config --global user.name "Nobody" - run: name: update schema command: | From 9eb1fc2d9036f64e35b936eaaa643ee79645ed03 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 22:52:13 +0800 Subject: [PATCH 20/74] push to origin --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a9d16f..8ddefa2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,7 +80,7 @@ jobs: echo "Schama updated" git add . git commit -m 'update schema automatically' - git push + git push -u origin fi workflows: From 3c7523365dc280f043b5d838bf7188d30cdbef35 Mon Sep 17 00:00:00 2001 From: Nobody Date: Sun, 27 Aug 2023 15:06:57 +0000 Subject: [PATCH 21/74] update schema automatically --- deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- 2 files changed, 153 insertions(+), 115 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..f89e622 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230827-150657 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..1006094 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230827-150657 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From 4974401d3fef0664e7a29eb7b2f0c92ab965a3f5 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 23:17:40 +0800 Subject: [PATCH 22/74] filter --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ddefa2..ca03a08 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -110,3 +110,9 @@ workflows: only: - master - update_schema + filters: + branches: + only: + - master + + From ac5a2f6a8ec289d767475f7cd3889a2df4f01f85 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Sun, 27 Aug 2023 23:20:41 +0800 Subject: [PATCH 23/74] filter --- .circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca03a08..5f2bf01 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,10 +109,8 @@ workflows: branches: only: - master - - update_schema + - update_schema: filters: branches: only: - master - - From 52045812e394e3997129d01a62ec80763dfa929d Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 08:11:19 +0800 Subject: [PATCH 24/74] try add NEXTVER --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f2bf01..1a39cf4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,10 +78,15 @@ jobs: exit 0 else echo "Schama updated" + sed -i '/# CHANGE LOG/a NEXTVER' CHANGELOG.md git add . git commit -m 'update schema automatically' git push -u origin fi + deploy_pypi: + <<: *default + steps: + - checkout workflows: build: @@ -114,3 +119,8 @@ workflows: branches: only: - master + - deploy_pypi: + filters: + branches: + only: + - master From 4161f46375942d743ba15b2a8436caad977315fa Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 08:11:36 +0800 Subject: [PATCH 25/74] revert update schema to test NEXTVER Revert "update schema automatically" This reverts commit 3c7523365dc280f043b5d838bf7188d30cdbef35. --- deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- 2 files changed, 115 insertions(+), 153 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index f89e622..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230827-150657 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 1006094..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230827-150657 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From 71ab237377e63e5464d5bfefbda8fbd575ab85af Mon Sep 17 00:00:00 2001 From: Nobody Date: Mon, 28 Aug 2023 00:12:36 +0000 Subject: [PATCH 26/74] update schema automatically --- deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- 2 files changed, 153 insertions(+), 115 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..85c7a70 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-001235 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..abc9e61 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-001235 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From 3f9b9793b4ded1726d65ff7757edf6f96350c6f1 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 08:52:30 +0800 Subject: [PATCH 27/74] run status before commit --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a39cf4..e982754 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,7 @@ jobs: else echo "Schama updated" sed -i '/# CHANGE LOG/a NEXTVER' CHANGELOG.md + git status git add . git commit -m 'update schema automatically' git push -u origin @@ -87,7 +88,8 @@ jobs: <<: *default steps: - checkout - + - run: + if ! grep 'NEXTVER' CHANGELOG.md workflows: build: jobs: From 9f8741bc878105611dfbfa801b49ee8f4b284e6c Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 08:53:03 +0800 Subject: [PATCH 28/74] revert again for test Revert "update schema automatically" This reverts commit 71ab237377e63e5464d5bfefbda8fbd575ab85af. --- deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- 2 files changed, 115 insertions(+), 153 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 85c7a70..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-001235 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index abc9e61..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-001235 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From 8524b43f6a2fb14f20810a3051a4715a5621002f Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 09:00:33 +0800 Subject: [PATCH 29/74] test --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e982754..7c5e45c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,8 +88,6 @@ jobs: <<: *default steps: - checkout - - run: - if ! grep 'NEXTVER' CHANGELOG.md workflows: build: jobs: From 1476914845e00d02de05ae6333731ee8432685dc Mon Sep 17 00:00:00 2001 From: Nobody Date: Mon, 28 Aug 2023 01:01:25 +0000 Subject: [PATCH 30/74] update schema automatically --- deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- 2 files changed, 153 insertions(+), 115 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..58c199d 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-010125 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..0e8d7d6 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-010125 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From c1ef0408656f0f9918cec8cbe1b107426a6d71d7 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 09:06:51 +0800 Subject: [PATCH 31/74] Revert "update schema automatically" This reverts commit 1476914845e00d02de05ae6333731ee8432685dc. --- deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- 2 files changed, 115 insertions(+), 153 deletions(-) diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 58c199d..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-010125 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 0e8d7d6..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-010125 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From f8df187f06ede5921b3a70207834c3d1777b23c9 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 09:16:05 +0800 Subject: [PATCH 32/74] fix typo --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c5e45c..260cd53 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,8 +78,7 @@ jobs: exit 0 else echo "Schama updated" - sed -i '/# CHANGE LOG/a NEXTVER' CHANGELOG.md - git status + sed -i '/# Changelog/a ## NEXTVER' CHANGELOG.md git add . git commit -m 'update schema automatically' git push -u origin From 979c896e560da68249a212df47a17df8d6b5c728 Mon Sep 17 00:00:00 2001 From: Nobody Date: Mon, 28 Aug 2023 01:16:52 +0000 Subject: [PATCH 33/74] update schema automatically --- CHANGELOG.md | 1 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- 3 files changed, 154 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..d28f415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Changelog +## NEXTVER ## 0.1.5 diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..ecca925 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-011652 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..92c0c94 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-011652 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From e179eee27554ae435c93a273e1ac2cdd3af6e437 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 10:26:07 +0800 Subject: [PATCH 34/74] add more lines --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 260cd53..daf3ac4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,7 +78,7 @@ jobs: exit 0 else echo "Schama updated" - sed -i '/# Changelog/a ## NEXTVER' CHANGELOG.md + sed -i '/# Changelog/{s/$/\n\n## NEXTVER\n\nSync API/}' CHANGELOG.md git add . git commit -m 'update schema automatically' git push -u origin From 841ae63cbb4c3adea9aa01f564cb23b93bb5a6db Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 10:26:55 +0800 Subject: [PATCH 35/74] Revert "update schema automatically" This reverts commit 979c896e560da68249a212df47a17df8d6b5c728. --- CHANGELOG.md | 1 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- 3 files changed, 115 insertions(+), 154 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d28f415..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ # Changelog -## NEXTVER ## 0.1.5 diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index ecca925..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-011652 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 92c0c94..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-011652 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From ffb1d342abd0a1905d4cba99cc28c3ded50735e9 Mon Sep 17 00:00:00 2001 From: Nobody Date: Mon, 28 Aug 2023 02:27:54 +0000 Subject: [PATCH 36/74] update schema automatically --- CHANGELOG.md | 4 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- 3 files changed, 157 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..eee37c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## NEXTVER + +Sync API + ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..006a6d0 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-022754 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..e9e882c 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230828-022754 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From a03d7ca8f81b8c7bc305e90f656334636861c81d Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 11:24:06 +0800 Subject: [PATCH 37/74] to check cron run --- .circleci/config.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index daf3ac4..c0a0bd8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,7 +113,12 @@ workflows: branches: only: - master - - update_schema: + update_schema: + jobs: + - update_schema + triggers: + - schedule: + cron: * * * * * filters: branches: only: From 4542ef890272bf45cd78a7489ccbed7efed11a51 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:17:46 +0800 Subject: [PATCH 38/74] try upload --- .circleci/config.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0a0bd8..6fe3103 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,10 +83,34 @@ jobs: git commit -m 'update schema automatically' git push -u origin fi - deploy_pypi: + release: <<: *default steps: - checkout + - run: + name: setup pypi + command: | + echo "[testpypi]" >> ~/.pypirc + echo "username=__token__" >> ~/.pypirc + echo "password=$PYPI_TOKEN" >> ~/.pypirc + - run: + name: update version + command: | + name: update version + command: | + if ! grep -q 'NEXTVER' CHANGELOG.md + then + echo "No NEXTVER in CHANGELOG.md, no need release" + exit 0 + fi + pip3 install bump + NEXT_VER=$(bump) + sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md + git add . + git commit -m 'release $NEXT_VER' + python3 -m pip install --upgrade twine + make build + python3 -m twine upload --repository testpypi dist/* workflows: build: jobs: @@ -115,15 +139,16 @@ workflows: - master update_schema: jobs: + - test - update_schema triggers: - schedule: - cron: * * * * * + cron: 0 0 * * * filters: branches: only: - master - - deploy_pypi: + - release: filters: branches: only: From 62c8712ec4ca979cbbd57e824787871c970334ec Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:24:06 +0800 Subject: [PATCH 39/74] fix error --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fe3103..ff3376e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,12 +142,12 @@ workflows: - test - update_schema triggers: - - schedule: - cron: 0 0 * * * - filters: - branches: - only: - - master + - schedule: + cron: 0 0 * * * + filters: + branches: + only: + - master - release: filters: branches: From ce2b4b1a3f206de481fada58d4b6c79c3d1b1877 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:26:15 +0800 Subject: [PATCH 40/74] try release --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff3376e..2f78112 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,8 +148,8 @@ workflows: branches: only: - master - - release: - filters: - branches: - only: - - master + release: + filters: + branches: + only: + - master From d59c376a34ea01280f1ecdd27d9168d9036130f2 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:42:42 +0800 Subject: [PATCH 41/74] try fix --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f78112..7c4f794 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -144,10 +144,10 @@ workflows: triggers: - schedule: cron: 0 0 * * * - filters: - branches: - only: - - master + filters: + branches: + only: + - master release: filters: branches: From 364ac6d7edbe02c439a9d2f329158bb3a99819ba Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:51:31 +0800 Subject: [PATCH 42/74] from bottom --- .circleci/config.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c4f794..ae9b28c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,8 +94,8 @@ jobs: echo "username=__token__" >> ~/.pypirc echo "password=$PYPI_TOKEN" >> ~/.pypirc - run: - name: update version - command: | + name: update version + command: | name: update version command: | if ! grep -q 'NEXTVER' CHANGELOG.md @@ -141,15 +141,3 @@ workflows: jobs: - test - update_schema - triggers: - - schedule: - cron: 0 0 * * * - filters: - branches: - only: - - master - release: - filters: - branches: - only: - - master From 1f29d88ac4a5062652a258fabff81854b1d3dd8c Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 17:58:09 +0800 Subject: [PATCH 43/74] add requirement --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae9b28c..769014a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,10 @@ workflows: branches: only: - master - update_schema: + update_schema_flow: jobs: - test - update_schema + requires: + - check_git_message + From 29888ad101ed582b293436c790e146818baaf23c Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:01:31 +0800 Subject: [PATCH 44/74] require test --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 769014a..39c2402 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -140,7 +140,7 @@ workflows: update_schema_flow: jobs: - test - - update_schema - requires: - - check_git_message + - update_schema: + requires: + - test From 4d86b8341b31708bbd933ad60198b7c80d3ba9d9 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:06:53 +0800 Subject: [PATCH 45/74] schedule --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 39c2402..8dc65b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -139,8 +139,11 @@ workflows: - master update_schema_flow: jobs: - - test - - update_schema: - requires: - - test - + - update_schema + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master From ae45d2234f991f0861c684bf123bb91d23ed85dd Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:14:03 +0800 Subject: [PATCH 46/74] try run every minutes --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8dc65b8..ebf611a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,7 +142,7 @@ workflows: - update_schema triggers: - schedule: - cron: "0 0 * * *" + cron: "* * * * *" filters: branches: only: From bc17a23ff8f5dc1664a10c76138e92eb3efbe7de Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:15:40 +0800 Subject: [PATCH 47/74] run it every day --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ebf611a..8dc65b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,7 +142,7 @@ workflows: - update_schema triggers: - schedule: - cron: "* * * * *" + cron: "0 0 * * *" filters: branches: only: From 6353bbc03fd49a72e0d2f4667cac8ba06ff1216f Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:28:03 +0800 Subject: [PATCH 48/74] cascade --- .circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8dc65b8..cef52c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,6 +133,15 @@ workflows: - "3.10.4" - "3.10.10" - docs-build-deploy: + requires: + - release + filters: + branches: + only: + - master + - release: + requires: + - test filters: branches: only: @@ -146,4 +155,4 @@ workflows: filters: branches: only: - - master + - master \ No newline at end of file From 70fda5d5d48d0b7bacdab82072f0569845ceeac3 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:53:39 +0800 Subject: [PATCH 49/74] fix error --- .circleci/config.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cef52c4..034de77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,21 +96,19 @@ jobs: - run: name: update version command: | - name: update version - command: | - if ! grep -q 'NEXTVER' CHANGELOG.md - then - echo "No NEXTVER in CHANGELOG.md, no need release" - exit 0 - fi - pip3 install bump - NEXT_VER=$(bump) - sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md - git add . - git commit -m 'release $NEXT_VER' - python3 -m pip install --upgrade twine - make build - python3 -m twine upload --repository testpypi dist/* + if ! grep -q 'NEXTVER' CHANGELOG.md + then + echo "No NEXTVER in CHANGELOG.md, no need release" + exit 0 + fi + pip3 install bump + NEXT_VER=$(bump) + sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md + git add . + git commit -m 'release $NEXT_VER' + python3 -m pip install --upgrade twine + make build + python3 -m twine upload --repository testpypi dist/* workflows: build: jobs: From b5ac2a9e82b62daf7afc470d5bf21c8018ff36a9 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Mon, 28 Aug 2023 18:56:51 +0800 Subject: [PATCH 50/74] try set git --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 034de77..a1a05e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -93,6 +93,11 @@ jobs: echo "[testpypi]" >> ~/.pypirc echo "username=__token__" >> ~/.pypirc echo "password=$PYPI_TOKEN" >> ~/.pypirc + - run: + name: config git + command: | + git config --global user.email "nobody@deriv.com" + git config --global user.name "Nobody" - run: name: update version command: | From 4b342791f6fdb8bd8bd408cbd6d17220df478ddc Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 08:01:01 +0800 Subject: [PATCH 51/74] push back --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a1a05e7..035e57d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -113,7 +113,8 @@ jobs: git commit -m 'release $NEXT_VER' python3 -m pip install --upgrade twine make build - python3 -m twine upload --repository testpypi dist/* + # python3 -m twine upload --repository testpypi dist/* + git push origin master workflows: build: jobs: From 9577591b72a17cced892000719cf5431f1d35f37 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 29 Aug 2023 00:02:57 +0000 Subject: [PATCH 52/74] release $NEXT_VER --- CHANGELOG.md | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eee37c3..5fa1b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## NEXTVER +## 0.1.6 Sync API diff --git a/setup.py b/setup.py index 92e61a9..33f36ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.5', + version='0.1.6', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From c4b058e450b8135accc0cf8a5d3cdcc6116b943e Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 08:45:15 +0800 Subject: [PATCH 53/74] try no nextver --- .circleci/config.yml | 46 +++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 035e57d..e67c243 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,13 +76,15 @@ jobs: then echo 'Schema no change' exit 0 - else - echo "Schama updated" - sed -i '/# Changelog/{s/$/\n\n## NEXTVER\n\nSync API/}' CHANGELOG.md - git add . - git commit -m 'update schema automatically' - git push -u origin fi + echo "Schama updated" + pip3 install bump + NEXT_VER=$(bump) + sed -i '/# Changelog/{s/$/\n\n## NEXTVER\n\nSync API/}' CHANGELOG.md + sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md + git add . + git commit -m 'update schema automatically' + git push -u origin release: <<: *default steps: @@ -90,31 +92,15 @@ jobs: - run: name: setup pypi command: | - echo "[testpypi]" >> ~/.pypirc + echo "[pypi]" >> ~/.pypirc echo "username=__token__" >> ~/.pypirc echo "password=$PYPI_TOKEN" >> ~/.pypirc - - run: - name: config git - command: | - git config --global user.email "nobody@deriv.com" - git config --global user.name "Nobody" - run: name: update version command: | - if ! grep -q 'NEXTVER' CHANGELOG.md - then - echo "No NEXTVER in CHANGELOG.md, no need release" - exit 0 - fi - pip3 install bump - NEXT_VER=$(bump) - sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md - git add . - git commit -m 'release $NEXT_VER' python3 -m pip install --upgrade twine make build # python3 -m twine upload --repository testpypi dist/* - git push origin master workflows: build: jobs: @@ -153,10 +139,10 @@ workflows: update_schema_flow: jobs: - update_schema - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master \ No newline at end of file + #triggers: + # - schedule: + # cron: "0 0 * * *" + # filters: + # branches: + # only: + # - master \ No newline at end of file From fb04cf9b14cd76079ee4acadc0ec6f5f5cfe54fe Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 08:46:06 +0800 Subject: [PATCH 54/74] Revert "release $NEXT_VER" This reverts commit 9577591b72a17cced892000719cf5431f1d35f37. --- CHANGELOG.md | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa1b14..eee37c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.1.6 +## NEXTVER Sync API diff --git a/setup.py b/setup.py index 33f36ee..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.6', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From ebf259e2b324760f78aff9afe698997eddcfa9c3 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 08:46:26 +0800 Subject: [PATCH 55/74] Revert "update schema automatically" This reverts commit ffb1d342abd0a1905d4cba99cc28c3ded50735e9. --- CHANGELOG.md | 4 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- 3 files changed, 115 insertions(+), 157 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eee37c3..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## NEXTVER - -Sync API - ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 006a6d0..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-022754 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index e9e882c..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230828-022754 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl From b9b65f269cbdda76300765ecbf156a979727e484 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 29 Aug 2023 00:49:53 +0000 Subject: [PATCH 56/74] update schema automatically --- CHANGELOG.md | 4 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 158 insertions(+), 116 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..5fa1b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.6 + +Sync API + ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..6f1228f 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-004952 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..29223e5 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-004952 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 92e61a9..33f36ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.5', + version='0.1.6', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 77d9ed5fd0bb0c2c0f1c65f3001366bb70909c26 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:03:40 +0800 Subject: [PATCH 57/74] enable cron [ci skip] --- .circleci/config.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e67c243..86b2cd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -101,6 +101,7 @@ jobs: python3 -m pip install --upgrade twine make build # python3 -m twine upload --repository testpypi dist/* + echo "deployed to pypi" workflows: build: jobs: @@ -139,10 +140,10 @@ workflows: update_schema_flow: jobs: - update_schema - #triggers: - # - schedule: - # cron: "0 0 * * *" - # filters: - # branches: - # only: - # - master \ No newline at end of file + triggers: + - schedule: + cron: "* * * * *" + filters: + branches: + only: + - master \ No newline at end of file From 5262d7a570b64e84e45d3ba0e6450bf10a91c214 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:06:44 +0800 Subject: [PATCH 58/74] revert update automatically [ci skip] --- CHANGELOG.md | 4 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 116 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa1b14..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## 0.1.6 - -Sync API - ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 6f1228f..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-004952 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 29223e5..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-004952 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 33f36ee..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.6', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 1384395c42fb7246a0bd9ac763db9cfa7be27207 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 29 Aug 2023 01:07:57 +0000 Subject: [PATCH 59/74] update schema automatically --- CHANGELOG.md | 4 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 158 insertions(+), 116 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..5fa1b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.6 + +Sync API + ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..59a148b 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-010756 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..fd3a63b 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-010756 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 92e61a9..33f36ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.5', + version='0.1.6', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From a7269560f4e3f91d86d2edc1c2d36c31a71f8b42 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:10:23 +0800 Subject: [PATCH 60/74] Revert "update schema automatically" This reverts commit 1384395c42fb7246a0bd9ac763db9cfa7be27207. --- CHANGELOG.md | 4 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 116 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa1b14..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## 0.1.6 - -Sync API - ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 59a148b..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-010756 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index fd3a63b..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-010756 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 33f36ee..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.6', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 0ee27ee874607697d3373028355af811f302413c Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:11:00 +0800 Subject: [PATCH 61/74] try run every 5 minutes [ci skip] --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86b2cd4..e867517 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,7 +142,7 @@ workflows: - update_schema triggers: - schedule: - cron: "* * * * *" + cron: "*/5 * * * *" filters: branches: only: From 5b5852239b9d5aad89126e74da7b10ea3b9afb07 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 29 Aug 2023 01:11:43 +0000 Subject: [PATCH 62/74] update schema automatically --- CHANGELOG.md | 4 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 158 insertions(+), 116 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..5fa1b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.6 + +Sync API + ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..7ae80c9 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-011141 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..9dd25e5 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-011141 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 92e61a9..33f36ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.5', + version='0.1.6', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 24eed7b06111ea1d5d38a3700c2e6751837e0140 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:15:45 +0800 Subject: [PATCH 63/74] try again [ci skip] --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e867517..86b2cd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -142,7 +142,7 @@ workflows: - update_schema triggers: - schedule: - cron: "*/5 * * * *" + cron: "* * * * *" filters: branches: only: From 93425673ad677dd6b3fd4780d51e4e6cd25d6e2e Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:20:52 +0800 Subject: [PATCH 64/74] [ci skip] Revert "update schema automatically" This reverts commit 5b5852239b9d5aad89126e74da7b10ea3b9afb07. --- CHANGELOG.md | 4 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 116 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa1b14..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## 0.1.6 - -Sync API - ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 7ae80c9..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-011141 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 9dd25e5..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-011141 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 33f36ee..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.6', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 8b867bed3c9f60d7d681666d40274159e7ca6377 Mon Sep 17 00:00:00 2001 From: Nobody Date: Tue, 29 Aug 2023 01:21:44 +0000 Subject: [PATCH 65/74] update schema automatically --- CHANGELOG.md | 4 + deriv_api/deriv_api_calls.py | 266 ++++++++++++++++++++--------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 158 insertions(+), 116 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bbd064..5fa1b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.1.6 + +Sync API + ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index 23a10cc..bf2e05f 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-012142 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1899,6 +1899,44 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) + async def kyc_auth_status(self, args=None): + """ + Get KYC Authentication Status + + Parameters: + ----------- + args : dict with following keys + kyc_auth_status : int + Must be 1 + passthrough : Any + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + req_id : int + [Optional] Used to map request to response. + """ + + if args is None: + args = {} + + config = { + 'kyc_auth_status': { + 'required': 1, + 'type': 'integer' + }, + 'passthrough': {}, + 'req_id': { + 'type': 'integer' + } + } + + all_args = { + 'method': 'kyc_auth_status', + 'needs_method_arg': '1', + 'args': args, + 'config': config, + } + + return await self.process_request(all_args) + async def landing_company(self, args=None): """ 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). @@ -1909,7 +1947,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1949,7 +1987,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -1992,7 +2030,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2033,7 +2071,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2075,7 +2113,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2127,7 +2165,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2169,7 +2207,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -2235,7 +2273,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] User's phone number. phonePassword : str @@ -2352,7 +2390,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to change. req_id : int @@ -2409,7 +2447,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password : str The password of the account. password_type : str @@ -2466,7 +2504,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2527,7 +2565,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2635,7 +2673,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2865,7 +2903,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2994,7 +3032,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence : str @@ -3103,7 +3141,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3155,7 +3193,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3252,7 +3290,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3321,7 +3359,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3415,7 +3453,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3508,7 +3546,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3558,7 +3596,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3618,7 +3656,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3672,7 +3710,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3736,7 +3774,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. update : Any @@ -3783,7 +3821,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3835,7 +3873,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3899,7 +3937,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3943,7 +3981,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -3989,7 +4027,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4045,7 +4083,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4116,7 +4154,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4164,7 +4202,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4219,7 +4257,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4276,7 +4314,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4327,7 +4365,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4365,7 +4403,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4441,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_methods : int Must be 1 req_id : int @@ -4456,7 +4494,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4536,7 +4574,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_details : int Must be 1 req_id : int @@ -4576,7 +4614,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4625,7 +4663,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_transfer : int Must be 1 req_id : int @@ -4691,7 +4729,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4757,7 +4795,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4798,7 +4836,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. payout_currencies : int Must be 1 req_id : int @@ -4836,7 +4874,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. ping : int Must be 1 req_id : int @@ -4876,7 +4914,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. portfolio : int Must be 1 req_id : int @@ -4927,7 +4965,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. profit_table : int Must be 1 req_id : int @@ -5015,7 +5053,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. product_type : str [Optional] The product type. proposal : int @@ -5133,7 +5171,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. proposal_open_contract : int Must be 1 req_id : int @@ -5179,7 +5217,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. reality_check : int Must be 1 req_id : int @@ -5217,7 +5255,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5255,7 +5293,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5293,7 +5331,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5337,7 +5375,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5392,7 +5430,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5430,7 +5468,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5501,7 +5539,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5721,7 +5759,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5808,7 +5846,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5953,7 +5991,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. statement : int @@ -6009,7 +6047,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. states_list : str @@ -6047,7 +6085,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6097,7 +6135,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. start : int @@ -6165,7 +6203,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. time : int @@ -6205,7 +6243,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6251,7 +6289,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6293,7 +6331,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6341,7 +6379,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6401,7 +6439,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str Name of trading platform. req_id : int @@ -6461,7 +6499,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6513,7 +6551,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6551,7 +6589,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6605,7 +6643,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6662,7 +6700,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6708,7 +6746,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6794,7 +6832,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. type : str @@ -6883,7 +6921,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index c846121..17abe82 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 +# This file was automatically generated by scripts/regen-py.pl at 20230829-012142 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 92e61a9..33f36ee 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.5', + version='0.1.6', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From d5f9c7318e2e24493e3db8b2b786ca04302e95e9 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:25:08 +0800 Subject: [PATCH 66/74] refactor --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 86b2cd4..0b979cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -96,11 +96,11 @@ jobs: echo "username=__token__" >> ~/.pypirc echo "password=$PYPI_TOKEN" >> ~/.pypirc - run: - name: update version + name: release command: | python3 -m pip install --upgrade twine make build - # python3 -m twine upload --repository testpypi dist/* + python3 -m twine upload --repository testpypi dist/* echo "deployed to pypi" workflows: build: @@ -142,7 +142,7 @@ workflows: - update_schema triggers: - schedule: - cron: "* * * * *" + cron: "0 0 * * *" filters: branches: only: From 7ef1ea8638d1948d4932ad162aca77fec6627045 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 09:29:35 +0800 Subject: [PATCH 67/74] change to pypi --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b979cb..23ad2cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,7 +100,7 @@ jobs: command: | python3 -m pip install --upgrade twine make build - python3 -m twine upload --repository testpypi dist/* + python3 -m twine upload --repository pypi dist/* echo "deployed to pypi" workflows: build: From af8ff102384a988dbdfa8ff8da4141e265e330f8 Mon Sep 17 00:00:00 2001 From: chylli-deriv <52912308+chylli-deriv@users.noreply.github.com> Date: Tue, 29 Aug 2023 14:29:06 +0800 Subject: [PATCH 68/74] Update .circleci/config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23ad2cd..7cb4572 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,7 +84,7 @@ jobs: sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md git add . git commit -m 'update schema automatically' - git push -u origin + git push origin master release: <<: *default steps: From c545003b7d4f6d83e6168452edd0bed889d8e1d8 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:15:15 +0800 Subject: [PATCH 69/74] try ssh key --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7cb4572..ca3a16a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,6 +59,9 @@ jobs: update_schema: <<: *default steps: + - add_ssh_keys: + fingerprints: + - "c8:f7:fc:a0:0d:2c:43:93:e3:c7:b6:cf:16:93:98:e1" - checkout - run: name: config git @@ -84,7 +87,7 @@ jobs: sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md git add . git commit -m 'update schema automatically' - git push origin master + git push origin test_branch release: <<: *default steps: @@ -146,4 +149,4 @@ workflows: filters: branches: only: - - master \ No newline at end of file + - master From 65ac76354cc58fec0207063aa4cdf8560717a17e Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:16:32 +0800 Subject: [PATCH 70/74] no cron , for test --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca3a16a..058fc4d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,10 +143,10 @@ workflows: update_schema_flow: jobs: - update_schema - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master + #triggers: + # - schedule: + # cron: "0 0 * * *" + # filters: + # branches: + # only: + # - master From 77d78ad7935c980ce47a975e678871de3ea73bf8 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:21:01 +0800 Subject: [PATCH 71/74] Revert "update schema automatically" This reverts commit 8b867bed3c9f60d7d681666d40274159e7ca6377. --- CHANGELOG.md | 4 - deriv_api/deriv_api_calls.py | 266 +++++++++++++++-------------------- deriv_api/streams_list.py | 2 +- setup.py | 2 +- 4 files changed, 116 insertions(+), 158 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fa1b14..6bbd064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # Changelog -## 0.1.6 - -Sync API - ## 0.1.5 Change default ws server diff --git a/deriv_api/deriv_api_calls.py b/deriv_api/deriv_api_calls.py index bf2e05f..23a10cc 100644 --- a/deriv_api/deriv_api_calls.py +++ b/deriv_api/deriv_api_calls.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-012142 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 from numbers import Number @@ -24,7 +24,7 @@ async def active_symbols(self, args=None): landing_company_short : str [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. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only symbols that can be traded through that product type will be returned. req_id : int @@ -79,7 +79,7 @@ async def api_token(self, args=None): new_token_scopes : Any [Optional] List of permission scopes to provide with the token. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. valid_for_current_ip_only : int @@ -129,7 +129,7 @@ async def app_delete(self, args=None): app_delete : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -167,7 +167,7 @@ async def app_get(self, args=None): app_get : int Application app_id passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -205,7 +205,7 @@ async def app_list(self, args=None): app_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -257,7 +257,7 @@ async def app_markup_details(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort : str @@ -330,7 +330,7 @@ async def app_markup_statistics(self, args=None): date_to : str End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -388,7 +388,7 @@ async def app_register(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage req_id : int @@ -472,7 +472,7 @@ async def app_update(self, args=None): name : str Application name. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. redirect_uri : str [Optional] The URL to redirect to after a successful login. Required if charging markup percentage. req_id : int @@ -548,7 +548,7 @@ async def asset_index(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -594,7 +594,7 @@ async def authorize(self, args=None): authorize : str Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -637,7 +637,7 @@ async def balance(self, args=None): balance : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -684,7 +684,7 @@ async def buy(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -804,7 +804,7 @@ async def buy_contract_for_multiple_accounts(self, args=None): Either the ID received from a Price Proposal (proposal call), or 1 if contract buy parameters are passed in the parameters field. parameters : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Maximum price at which to purchase the contract. req_id : int @@ -900,7 +900,7 @@ async def cancel(self, args=None): cancel : int Value should be the contract_id which received from the portfolio call. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -944,7 +944,7 @@ async def cashier(self, args=None): dry_run : int [Optional] If set to 1, only validation is performed. Only applicable for withdraw using crypto provider and api type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. provider : str [Optional] Cashier provider. crypto will be default option for crypto currency accounts. req_id : int @@ -1009,7 +1009,7 @@ async def contract_update(self, args=None): Must be 1 limit_order : Any passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1059,7 +1059,7 @@ async def contract_update_history(self, args=None): limit : Number [Optional] Maximum number of historical updates to receive. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1110,7 +1110,7 @@ async def contracts_for(self, args=None): landing_company_short : str [Optional] Indicates which landing company to get a list of contracts for. If you are logged in, your account's landing company will override this field. Note that when landing_company_short is set to 'virtual', landing_company will take precendce until the deprecated field is removed from the api. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] If you specify this field, only contracts tradable through that contract type will be returned. req_id : int @@ -1168,7 +1168,7 @@ async def copy_start(self, args=None): min_trade_stake : Number [Optional] Used to set minimal trade stake to be copied. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trade_types : Any @@ -1216,7 +1216,7 @@ async def copy_stop(self, args=None): copy_stop : str API tokens identifying the accounts which needs not to be copied passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1254,7 +1254,7 @@ async def copytrading_list(self, args=None): copytrading_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1292,7 +1292,7 @@ async def copytrading_statistics(self, args=None): copytrading_statistics : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trader_id : str @@ -1338,7 +1338,7 @@ async def crypto_config(self, args=None): currency_code : str [Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1397,7 +1397,7 @@ async def document_upload(self, args=None): page_type : str [Optional] To determine document side passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proof_of_ownership : Any req_id : int [Optional] Used to map request to response. @@ -1480,7 +1480,7 @@ async def economic_calendar(self, args=None): end_date : int [Optional] End date. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start_date : int @@ -1531,7 +1531,7 @@ async def exchange_rates(self, args=None): exchange_rates : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -1583,7 +1583,7 @@ async def forget(self, args=None): forget : str ID of the real-time stream of messages to cancel. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1621,7 +1621,7 @@ async def forget_all(self, args=None): 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"]. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1658,7 +1658,7 @@ async def get_account_status(self, args=None): get_account_status : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1696,7 +1696,7 @@ async def get_financial_assessment(self, args=None): get_financial_assessment : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1734,7 +1734,7 @@ async def get_limits(self, args=None): get_limits : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1772,7 +1772,7 @@ async def get_self_exclusion(self, args=None): get_self_exclusion : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1810,7 +1810,7 @@ async def get_settings(self, args=None): get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1856,7 +1856,7 @@ async def identity_verification_document_add(self, args=None): issuing_country : str 2-letter country code (can obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1899,44 +1899,6 @@ async def identity_verification_document_add(self, args=None): return await self.process_request(all_args) - async def kyc_auth_status(self, args=None): - """ - Get KYC Authentication Status - - Parameters: - ----------- - args : dict with following keys - kyc_auth_status : int - Must be 1 - passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. - req_id : int - [Optional] Used to map request to response. - """ - - if args is None: - args = {} - - config = { - 'kyc_auth_status': { - 'required': 1, - 'type': 'integer' - }, - 'passthrough': {}, - 'req_id': { - 'type': 'integer' - } - } - - all_args = { - 'method': 'kyc_auth_status', - 'needs_method_arg': '1', - 'args': args, - 'config': config, - } - - return await self.process_request(all_args) - async def landing_company(self, args=None): """ 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). @@ -1947,7 +1909,7 @@ async def landing_company(self, args=None): landing_company : str Client's 2-letter country code (obtained from residence_list call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -1987,7 +1949,7 @@ async def landing_company_details(self, args=None): landing_company_details : str Landing company shortcode. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2030,7 +1992,7 @@ async def login_history(self, args=None): login_history : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2071,7 +2033,7 @@ async def logout(self, args=None): logout : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2113,7 +2075,7 @@ async def mt5_deposit(self, args=None): mt5_deposit : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_mt5 : str @@ -2165,7 +2127,7 @@ async def mt5_get_settings(self, args=None): mt5_get_settings : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2207,7 +2169,7 @@ async def mt5_login_list(self, args=None): mt5_login_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -2273,7 +2235,7 @@ async def mt5_new_account(self, args=None): name : str Client's name. The maximum length here is 101 characters. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] User's phone number. phonePassword : str @@ -2390,7 +2352,7 @@ async def mt5_password_change(self, args=None): old_password : str Old password for validation (non-empty string, accepts any printable ASCII character) passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to change. req_id : int @@ -2447,7 +2409,7 @@ async def mt5_password_check(self, args=None): mt5_password_check : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password : str The password of the account. password_type : str @@ -2504,7 +2466,7 @@ async def mt5_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. password_type : str [Optional] Type of the password to reset. req_id : int @@ -2565,7 +2527,7 @@ async def mt5_withdrawal(self, args=None): mt5_withdrawal : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. to_binary : str @@ -2673,7 +2635,7 @@ async def new_account_maltainvest(self, args=None): occupation : str Occupation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -2903,7 +2865,7 @@ async def new_account_real(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -3032,7 +2994,7 @@ async def new_account_virtual(self, args=None): new_account_virtual : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence : str @@ -3141,7 +3103,7 @@ async def oauth_apps(self, args=None): oauth_apps : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3193,7 +3155,7 @@ async def p2p_advert_create(self, args=None): p2p_advert_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method : str @@ -3290,7 +3252,7 @@ async def p2p_advert_info(self, args=None): p2p_advert_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3359,7 +3321,7 @@ async def p2p_advert_list(self, args=None): p2p_advert_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_method : Any [Optional] Search by supported payment methods. req_id : int @@ -3453,7 +3415,7 @@ async def p2p_advert_update(self, args=None): p2p_advert_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions. payment_method_ids : Any @@ -3546,7 +3508,7 @@ async def p2p_advertiser_adverts(self, args=None): p2p_advertiser_adverts : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3596,7 +3558,7 @@ async def p2p_advertiser_create(self, args=None): p2p_advertiser_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3656,7 +3618,7 @@ async def p2p_advertiser_info(self, args=None): p2p_advertiser_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -3710,7 +3672,7 @@ async def p2p_advertiser_list(self, args=None): p2p_advertiser_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sort_by : str @@ -3774,7 +3736,7 @@ async def p2p_advertiser_payment_methods(self, args=None): p2p_advertiser_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. update : Any @@ -3821,7 +3783,7 @@ async def p2p_advertiser_relations(self, args=None): p2p_advertiser_relations : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. remove_blocked : Any IDs of advertisers to remove from blocked. remove_favourites : Any @@ -3873,7 +3835,7 @@ async def p2p_advertiser_update(self, args=None): p2p_advertiser_update : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Advertiser's payment information, to be used as a default for new sell adverts. req_id : int @@ -3937,7 +3899,7 @@ async def p2p_chat_create(self, args=None): p2p_chat_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -3981,7 +3943,7 @@ async def p2p_order_cancel(self, args=None): p2p_order_cancel : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4027,7 +3989,7 @@ async def p2p_order_confirm(self, args=None): p2p_order_confirm : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. verification_code : str @@ -4083,7 +4045,7 @@ async def p2p_order_create(self, args=None): p2p_order_create : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_info : str [Optional] Payment instructions, only applicable for sell orders. payment_method_ids : Any @@ -4154,7 +4116,7 @@ async def p2p_order_dispute(self, args=None): p2p_order_dispute : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4202,7 +4164,7 @@ async def p2p_order_info(self, args=None): p2p_order_info : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4257,7 +4219,7 @@ async def p2p_order_list(self, args=None): p2p_order_list : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -4314,7 +4276,7 @@ async def p2p_order_review(self, args=None): p2p_order_review : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. rating : int Rating for the transaction, 1 to 5. recommended : Any @@ -4365,7 +4327,7 @@ async def p2p_payment_methods(self, args=None): p2p_payment_methods : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4403,7 +4365,7 @@ async def p2p_ping(self, args=None): p2p_ping : int Must be 1 passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. """ @@ -4441,7 +4403,7 @@ async def payment_methods(self, args=None): country : str [Optional] 2-letter country code (ISO standard). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_methods : int Must be 1 req_id : int @@ -4494,7 +4456,7 @@ async def paymentagent_create(self, args=None): information : str [Optional] Information about payment agent and their proposed service. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payment_agent_name : str The name with which the payment agent is going to be identified. paymentagent_create : int @@ -4574,7 +4536,7 @@ async def paymentagent_details(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_details : int Must be 1 req_id : int @@ -4614,7 +4576,7 @@ async def paymentagent_list(self, args=None): currency : str [Optional] If specified, only payment agents that supports that currency will be returned (obtained from payout_currencies call). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_list : str Client's 2-letter country code (obtained from residence_list call). req_id : int @@ -4663,7 +4625,7 @@ async def paymentagent_transfer(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_transfer : int Must be 1 req_id : int @@ -4729,7 +4691,7 @@ async def paymentagent_withdraw(self, args=None): dry_run : int [Optional] If set to 1, just do validation. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_loginid : str The payment agent loginid received from the paymentagent_list call. paymentagent_withdraw : int @@ -4795,7 +4757,7 @@ async def paymentagent_withdraw_justification(self, args=None): message : str Reasons for needing to withdraw using a Payment Agent. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. paymentagent_withdraw_justification : int Must be 1 req_id : int @@ -4836,7 +4798,7 @@ async def payout_currencies(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. payout_currencies : int Must be 1 req_id : int @@ -4874,7 +4836,7 @@ async def ping(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. ping : int Must be 1 req_id : int @@ -4914,7 +4876,7 @@ async def portfolio(self, args=None): contract_type : Any Return only contracts of the specified types passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. portfolio : int Must be 1 req_id : int @@ -4965,7 +4927,7 @@ async def profit_table(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. profit_table : int Must be 1 req_id : int @@ -5053,7 +5015,7 @@ async def proposal(self, args=None): multiplier : Number [Optional] The multiplier for non-binary options. E.g. lookbacks. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. product_type : str [Optional] The product type. proposal : int @@ -5171,7 +5133,7 @@ async def proposal_open_contract(self, args=None): contract_id : int [Optional] Contract ID received from a portfolio request. If not set, you will receive stream of all open contracts. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. proposal_open_contract : int Must be 1 req_id : int @@ -5217,7 +5179,7 @@ async def reality_check(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. reality_check : int Must be 1 req_id : int @@ -5255,7 +5217,7 @@ async def residence_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. residence_list : int @@ -5293,7 +5255,7 @@ async def revoke_oauth_app(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. revoke_oauth_app : int @@ -5331,7 +5293,7 @@ async def sell(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5375,7 +5337,7 @@ async def sell_contract_for_multiple_accounts(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. price : Number Minimum price at which to sell the contract, or 0 for 'sell at market'. req_id : int @@ -5430,7 +5392,7 @@ async def sell_expired(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. sell_expired : int @@ -5468,7 +5430,7 @@ async def set_account_currency(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_account_currency : str @@ -5539,7 +5501,7 @@ async def set_financial_assessment(self, args=None): other_instruments_trading_frequency : str [Optional] Trading frequency in other financial instruments. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. set_financial_assessment : int @@ -5759,7 +5721,7 @@ async def set_self_exclusion(self, args=None): max_turnover : Any [Optional] Daily turnover limit. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. session_duration_limit : Any @@ -5846,7 +5808,7 @@ async def set_settings(self, args=None): non_pep_declaration : int [Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. phone : Any [Optional] Note: not applicable for virtual account. Starting with + followed by 9-35 digits, hyphens or space. place_of_birth : str @@ -5991,7 +5953,7 @@ async def statement(self, args=None): offset : int [Optional] Number of transactions to skip. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. statement : int @@ -6047,7 +6009,7 @@ async def states_list(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. states_list : str @@ -6085,7 +6047,7 @@ async def ticks(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6135,7 +6097,7 @@ async def ticks_history(self, args=None): granularity : int [Optional] Only applicable for style: candles. Candle time-dimension width setting. (default: 60). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. start : int @@ -6203,7 +6165,7 @@ async def time(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. time : int @@ -6243,7 +6205,7 @@ async def tnc_approval(self, args=None): affiliate_coc_agreement : int [Optional] For Affiliate's Code of Conduct Agreement. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. tnc_approval : Number @@ -6289,7 +6251,7 @@ async def topup_virtual(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. topup_virtual : int @@ -6331,7 +6293,7 @@ async def trading_durations(self, args=None): landing_company_short : str [Optional] If specified, will return only the underlyings for the specified landing company. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_durations : int @@ -6379,7 +6341,7 @@ async def trading_platform_investor_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6439,7 +6401,7 @@ async def trading_platform_password_reset(self, args=None): new_password : str New password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address). passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str Name of trading platform. req_id : int @@ -6499,7 +6461,7 @@ async def trading_servers(self, args=None): market_type : str [Optional] Market type. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. platform : str [Optional] Pass the trading platform name, default to mt5 req_id : int @@ -6551,7 +6513,7 @@ async def trading_times(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. trading_times : str @@ -6589,7 +6551,7 @@ async def transaction(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int @@ -6643,7 +6605,7 @@ async def transfer_between_accounts(self, args=None): currency : str [Optional] Currency code. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. transfer_between_accounts : int @@ -6700,7 +6662,7 @@ async def unsubscribe_email(self, args=None): checksum : str The generated checksum for the customer. passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. unsubscribe_email : int @@ -6746,7 +6708,7 @@ async def verify_email(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6832,7 +6794,7 @@ async def verify_email_cellxpert(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. type : str @@ -6921,7 +6883,7 @@ async def website_status(self, args=None): ----------- args : dict with following keys passthrough : Any - [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. Maximum size is 3500 bytes. + [Optional] Used to pass data through the websocket, which may be retrieved via the echo_req output field. req_id : int [Optional] Used to map request to response. subscribe : int diff --git a/deriv_api/streams_list.py b/deriv_api/streams_list.py index 17abe82..c846121 100644 --- a/deriv_api/streams_list.py +++ b/deriv_api/streams_list.py @@ -1,4 +1,4 @@ -# This file was automatically generated by scripts/regen-py.pl at 20230829-012142 +# This file was automatically generated by scripts/regen-py.pl at 20230815-094214 # streams_list is the list of subscriptions msg_types available. # Please update it by scripts/regen-py.pl diff --git a/setup.py b/setup.py index 33f36ee..92e61a9 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='python_deriv_api', packages=find_packages(include=['deriv_api']), - version='0.1.6', + version='0.1.5', description='Python bindings for deriv.com websocket API', author='Deriv Group Services Ltd', author_email='learning+python@deriv.com', From 22c59d0e29a91237f9cd08823e29cf0e6957a465 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:24:20 +0800 Subject: [PATCH 72/74] show remote -v --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 058fc4d..dc4db13 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,6 +87,7 @@ jobs: sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md git add . git commit -m 'update schema automatically' + git remote -v git push origin test_branch release: <<: *default From c81b8a3c3b06d074d059fa2743e1e6349fb36323 Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:32:41 +0800 Subject: [PATCH 73/74] push --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dc4db13..311a98e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,7 +88,7 @@ jobs: git add . git commit -m 'update schema automatically' git remote -v - git push origin test_branch + git push origin HEAD:test_branch release: <<: *default steps: From b03103022feec947d9eba85c1307c46027a4959b Mon Sep 17 00:00:00 2001 From: chylli-deriv Date: Tue, 29 Aug 2023 16:36:52 +0800 Subject: [PATCH 74/74] add back filter --- .circleci/config.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 311a98e..1d9e66e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,8 +87,7 @@ jobs: sed -i "s/NEXTVER/$NEXT_VER/g" CHANGELOG.md git add . git commit -m 'update schema automatically' - git remote -v - git push origin HEAD:test_branch + git push origin HEAD:master release: <<: *default steps: @@ -144,10 +143,10 @@ workflows: update_schema_flow: jobs: - update_schema - #triggers: - # - schedule: - # cron: "0 0 * * *" - # filters: - # branches: - # only: - # - master + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master