From e00229df6074cb8041ef43ba2b24175e1dcf3f73 Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 18 Dec 2023 03:18:15 +0000 Subject: [PATCH] JSON Schema Update --- _data/v3.yml | 2 + config/v3/account_list/example.json | 3 + config/v3/account_list/receive.json | 123 + config/v3/account_list/send.json | 31 + config/v3/active_symbols/send.json | 173 +- config/v3/api_token/send.json | 119 +- config/v3/app_delete/send.json | 56 +- config/v3/app_get/send.json | 56 +- config/v3/app_list/send.json | 60 +- config/v3/app_markup_details/send.json | 178 +- config/v3/app_markup_statistics/send.json | 82 +- config/v3/app_register/send.json | 168 +- config/v3/app_update/send.json | 164 +- config/v3/asset_index/send.json | 112 +- config/v3/authorize/receive.json | 8 +- config/v3/authorize/send.json | 81 +- config/v3/balance/send.json | 86 +- config/v3/buy/send.json | 412 +-- .../send.json | 323 +- config/v3/cancel/send.json | 56 +- config/v3/cashier/send.json | 143 +- config/v3/contract_update/send.json | 102 +- config/v3/contract_update_history/send.json | 83 +- config/v3/contracts_for/send.json | 138 +- config/v3/copy_start/send.json | 132 +- config/v3/copy_stop/send.json | 60 +- config/v3/copytrading_list/send.json | 60 +- config/v3/copytrading_statistics/send.json | 57 +- config/v3/crypto_config/send.json | 66 +- config/v3/crypto_estimations/example.json | 4 +- config/v3/crypto_estimations/receive.json | 149 +- config/v3/crypto_estimations/send.json | 79 +- config/v3/document_upload/send.json | 282 +- config/v3/economic_calendar/send.json | 80 +- config/v3/exchange_rates/receive.json | 6 +- config/v3/exchange_rates/send.json | 89 +- config/v3/forget/send.json | 44 +- config/v3/forget_all/send.json | 100 +- config/v3/get_account_status/receive.json | 11 +- config/v3/get_account_status/send.json | 60 +- config/v3/get_financial_assessment/send.json | 60 +- config/v3/get_limits/receive.json | 52 + config/v3/get_limits/send.json | 60 +- config/v3/get_self_exclusion/send.json | 60 +- config/v3/get_settings/send.json | 60 +- .../send.json | 102 +- config/v3/kyc_auth_status/send.json | 104 +- config/v3/landing_company/receive.json | 3084 +++++++++-------- config/v3/landing_company/send.json | 46 +- config/v3/landing_company_details/send.json | 80 +- config/v3/login_history/send.json | 74 +- config/v3/logout/send.json | 56 +- config/v3/mt5_deposit/send.json | 84 +- config/v3/mt5_get_settings/send.json | 66 +- config/v3/mt5_login_list/send.json | 55 +- config/v3/mt5_new_account/send.json | 307 +- config/v3/mt5_password_change/send.json | 107 +- config/v3/mt5_password_check/send.json | 94 +- config/v3/mt5_password_reset/send.json | 105 +- config/v3/mt5_withdrawal/send.json | 86 +- config/v3/new_account_maltainvest/send.json | 777 +++-- config/v3/new_account_real/send.json | 353 +- config/v3/new_account_virtual/send.json | 445 +-- config/v3/oauth_apps/send.json | 60 +- config/v3/p2p_advert_create/receive.json | 864 ++--- config/v3/p2p_advert_create/send.json | 263 +- config/v3/p2p_advert_info/receive.json | 885 ++--- config/v3/p2p_advert_info/send.json | 92 +- config/v3/p2p_advert_list/receive.json | 747 ++-- config/v3/p2p_advert_list/send.json | 204 +- config/v3/p2p_advert_update/receive.json | 816 +++-- config/v3/p2p_advert_update/send.json | 248 +- config/v3/p2p_advertiser_adverts/receive.json | 725 ++-- config/v3/p2p_advertiser_adverts/send.json | 77 +- config/v3/p2p_advertiser_create/send.json | 116 +- config/v3/p2p_advertiser_info/send.json | 77 +- config/v3/p2p_advertiser_list/send.json | 127 +- .../p2p_advertiser_payment_methods/send.json | 173 +- config/v3/p2p_advertiser_relations/send.json | 127 +- config/v3/p2p_advertiser_update/send.json | 129 +- config/v3/p2p_chat_create/send.json | 66 +- config/v3/p2p_order_cancel/send.json | 66 +- config/v3/p2p_order_confirm/send.json | 89 +- config/v3/p2p_order_create/send.json | 135 +- config/v3/p2p_order_dispute/send.json | 89 +- config/v3/p2p_order_info/send.json | 78 +- config/v3/p2p_order_list/send.json | 132 +- config/v3/p2p_order_review/send.json | 96 +- config/v3/p2p_payment_methods/send.json | 55 +- config/v3/p2p_ping/send.json | 55 +- config/v3/p2p_settings/send.json | 67 +- config/v3/payment_methods/send.json | 66 +- config/v3/paymentagent_create/send.json | 245 +- config/v3/paymentagent_details/send.json | 55 +- config/v3/paymentagent_list/send.json | 61 +- config/v3/paymentagent_transfer/send.json | 109 +- config/v3/paymentagent_withdraw/send.json | 126 +- .../send.json | 67 +- config/v3/payout_currencies/send.json | 56 +- config/v3/ping/send.json | 46 +- config/v3/portfolio/send.json | 156 +- config/v3/profit_table/receive.json | 34 +- config/v3/profit_table/send.json | 229 +- config/v3/proposal/send.json | 376 +- config/v3/proposal_open_contract/receive.json | 1313 ++++--- config/v3/proposal_open_contract/send.json | 81 +- config/v3/reality_check/send.json | 61 +- config/v3/residence_list/send.json | 46 +- config/v3/revoke_oauth_app/send.json | 56 +- config/v3/sell/send.json | 65 +- .../send.json | 99 +- config/v3/sell_expired/send.json | 60 +- config/v3/set_account_currency/send.json | 58 +- config/v3/set_financial_assessment/send.json | 1003 +++--- config/v3/set_self_exclusion/send.json | 226 +- config/v3/set_settings/send.json | 420 ++- config/v3/statement/send.json | 150 +- config/v3/states_list/send.json | 46 +- config/v3/ticks/send.json | 74 +- config/v3/ticks_history/send.json | 139 +- config/v3/time/send.json | 46 +- config/v3/tnc_approval/send.json | 84 +- config/v3/topup_virtual/send.json | 60 +- config/v3/trading_durations/send.json | 112 +- .../send.json | 107 +- .../trading_platform_password_reset/send.json | 93 +- config/v3/trading_servers/send.json | 121 +- config/v3/trading_times/send.json | 44 +- config/v3/transaction/send.json | 74 +- .../v3/transfer_between_accounts/receive.json | 254 +- config/v3/transfer_between_accounts/send.json | 115 +- config/v3/unsubscribe_email/send.json | 64 +- config/v3/verify_email/send.json | 466 +-- config/v3/verify_email_cellxpert/send.json | 456 +-- config/v3/website_status/send.json | 59 +- 135 files changed, 13713 insertions(+), 10978 deletions(-) create mode 100644 config/v3/account_list/example.json create mode 100644 config/v3/account_list/receive.json create mode 100644 config/v3/account_list/send.json diff --git a/_data/v3.yml b/_data/v3.yml index 2f17517d..a765408d 100644 --- a/_data/v3.yml +++ b/_data/v3.yml @@ -1,6 +1,8 @@ groups: - label: All Calls methods: + - name: account_list + title: Account List - name: active_symbols title: Active Symbols - name: api_token diff --git a/config/v3/account_list/example.json b/config/v3/account_list/example.json new file mode 100644 index 00000000..594ccfab --- /dev/null +++ b/config/v3/account_list/example.json @@ -0,0 +1,3 @@ +{ + "account_list": 1 +} diff --git a/config/v3/account_list/receive.json b/config/v3/account_list/receive.json new file mode 100644 index 00000000..cf79e483 --- /dev/null +++ b/config/v3/account_list/receive.json @@ -0,0 +1,123 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account List (response)", + "description": "Returns all accounts belonging to the authorized user.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "account_list": { + "description": "List of accounts for current user. This is also available from the `authroize` call.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_category", + "account_type", + "broker_code", + "created_at", + "currency", + "is_disabled", + "is_virtual", + "landing_company_name", + "linked_to", + "loginid" + ], + "properties": { + "account_category": { + "description": "Account category.", + "type": "string", + "enum": [ + "trading", + "wallet" + ] + }, + "account_type": { + "description": "Account type.", + "type": "string" + }, + "broker": { + "description": "2 letter broker code.", + "type": "string" + }, + "created_at": { + "description": "Creation time of the account as epoch.", + "type": "integer" + }, + "currency": { + "description": "Currency of specified account.", + "type": "string" + }, + "is_disabled": { + "description": "Boolean value: 1 or 0, indicating whether the account is marked as disabled or not.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "is_virtual": { + "description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "landing_company_name": { + "description": "Landing company shortcode the account belongs to.", + "type": "string" + }, + "linked_to": { + "description": "Details of the list of Trading accounts linked to the Wallet account.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "loginid": { + "description": "Account ID.", + "type": "string" + }, + "platform": { + "description": "Account platform name.", + "type": "string", + "enum": [ + "ctrader", + "derivez", + "dtrade", + "dwallet", + "dxtrade", + "mt5" + ] + } + } + } + }, + "loginid": { + "description": "The account ID of specified account.", + "type": "string" + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "account_list" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" + } + } +} diff --git a/config/v3/account_list/send.json b/config/v3/account_list/send.json new file mode 100644 index 00000000..9f4c1282 --- /dev/null +++ b/config/v3/account_list/send.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account List (request)", + "description": "Returns all accounts belonging to the authorized user.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "account_list" + ], + "properties": { + "account_list": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } + } +} diff --git a/config/v3/active_symbols/send.json b/config/v3/active_symbols/send.json index f4d56649..73ea36a7 100644 --- a/config/v3/active_symbols/send.json +++ b/config/v3/active_symbols/send.json @@ -1,62 +1,117 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Active Symbols (request)", - "description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["active_symbols"], - "properties": { - "active_symbols": { - "description": "If you use `brief`, only a subset of fields will be returned.", - "type": "string", - "enum": ["brief", "full"] - }, - "landing_company": { - "description": "Deprecated - replaced by landing_company_short.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "landing_company_short": { - "description": "[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.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "product_type": { - "description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.", - "type": "string", - "enum": ["basic"] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Active Symbols (request)", + "description": "Retrieve a list of all currently active symbols (underlying markets upon which contracts are available for trading).", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "active_symbols" + ], + "properties": { + "active_symbols": { + "description": "If you use `brief`, only a subset of fields will be returned.", + "type": "string", + "enum": [ + "brief", + "full" + ] + }, + "contract_type": { + "description": "[Optional] The proposed contract type", + "type": "array", + "items": { + "description": "", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "ACCU", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + } + }, + "landing_company": { + "description": "Deprecated - replaced by landing_company_short.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "landing_company_short": { + "description": "[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.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "product_type": { + "description": "[Optional] If you specify this field, only symbols that can be traded through that product type will be returned.", + "type": "string", + "enum": [ + "basic" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/api_token/send.json b/config/v3/api_token/send.json index b6b0b50c..0e5e67d8 100644 --- a/config/v3/api_token/send.json +++ b/config/v3/api_token/send.json @@ -1,55 +1,70 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "API Token (request)", - "description": "This call manages API tokens", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["api_token"], - "properties": { - "api_token": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "delete_token": { - "description": "[Optional] The token to remove.", - "type": "string", - "pattern": "^\\w+$" - }, - "new_token": { - "description": "[Optional] The name of the created token.", - "type": "string", - "pattern": "^[A-Za-z0-9\\s_]+$" - }, - "new_token_scopes": { - "description": "[Optional] List of permission scopes to provide with the token.", - "type": "array", - "items": { - "description": "Required when create new token", - "type": "string", - "enum": ["read", "trade", "trading_information", "payments", "admin"] - }, - "uniqueItems": true - }, - "valid_for_current_ip_only": { - "description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token", - "type": "integer", - "enum": [0, 1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "API Token (request)", + "description": "This call manages API tokens", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "api_token" + ], + "properties": { + "api_token": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "delete_token": { + "description": "[Optional] The token to remove.", + "type": "string", + "pattern": "^\\w+$" + }, + "new_token": { + "description": "[Optional] The name of the created token.", + "type": "string", + "pattern": "^[A-Za-z0-9\\s_]+$" + }, + "new_token_scopes": { + "description": "[Optional] List of permission scopes to provide with the token.", + "type": "array", + "items": { + "description": "Required when create new token", + "type": "string", + "enum": [ + "read", + "trade", + "trading_information", + "payments", + "admin" + ] + }, + "uniqueItems": true + }, + "valid_for_current_ip_only": { + "description": "[Optional] If you set this parameter during token creation, then the token created will only work for the IP address that was used to create the token", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_delete/send.json b/config/v3/app_delete/send.json index efe4bad7..7db1ac28 100644 --- a/config/v3/app_delete/send.json +++ b/config/v3/app_delete/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Delete (request)", - "description": "The request for deleting an application.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["app_delete"], - "properties": { - "app_delete": { - "description": "Application app_id", - "type": "integer" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Delete (request)", + "description": "The request for deleting an application.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "app_delete" + ], + "properties": { + "app_delete": { + "description": "Application app_id", + "type": "integer" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_get/send.json b/config/v3/app_get/send.json index dcc42b04..80cd1697 100644 --- a/config/v3/app_get/send.json +++ b/config/v3/app_get/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Get Details (request)", - "description": "To get the information of the OAuth application specified by 'app_id'", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["app_get"], - "properties": { - "app_get": { - "description": "Application app_id", - "type": "integer" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Get Details (request)", + "description": "To get the information of the OAuth application specified by 'app_id'", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "app_get" + ], + "properties": { + "app_get": { + "description": "Application app_id", + "type": "integer" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_list/send.json b/config/v3/app_list/send.json index 875d6603..a1acbe9e 100644 --- a/config/v3/app_list/send.json +++ b/config/v3/app_list/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: List (request)", - "description": "List all of the account's OAuth applications", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["app_list"], - "properties": { - "app_list": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: List (request)", + "description": "List all of the account's OAuth applications", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "app_list" + ], + "properties": { + "app_list": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_markup_details/send.json b/config/v3/app_markup_details/send.json index 0157bd93..88a65891 100644 --- a/config/v3/app_markup_details/send.json +++ b/config/v3/app_markup_details/send.json @@ -1,83 +1,101 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Markup Details (request)", - "description": "Retrieve details of `app_markup` according to criteria specified.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["app_markup_details", "date_from", "date_to"], - "properties": { - "app_markup_details": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "app_id": { - "description": "[Optional] Specific application `app_id` to report on.", - "type": "integer" - }, - "client_loginid": { - "description": "[Optional] Specific client loginid to report on, like CR12345", - "type": "string", - "pattern": "^[A-Za-z]{2,5}[0-9]{2,20}$" - }, - "date_from": { - "description": "Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" - }, - "date_to": { - "description": "End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time.", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" - }, - "description": { - "description": "[Optional] If set to 1, will return `app_markup` transaction details.", - "type": "integer", - "enum": [0, 1] - }, - "limit": { - "description": "[Optional] Apply upper limit to count of transactions received.", - "type": "number", - "default": 1000, - "maximum": 1000, - "minimum": 0 - }, - "offset": { - "description": "[Optional] Number of transactions to skip.", - "type": "integer", - "minimum": 0 - }, - "sort": { - "description": "[Optional] Sort direction on `transaction_time`. Other fields sort order is ASC.", - "type": "string", - "default": "DESC", - "enum": ["ASC", "DESC"] - }, - "sort_fields": { - "description": "[Optional] One or more of the specified fields to sort on. Default sort field is by `transaction_time`.", - "type": "array", - "items": { - "type": "string", - "enum": ["app_id", "client_loginid", "transaction_time"] - }, - "maxItems": 3, - "minItems": 0, - "uniqueItems": true - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Markup Details (request)", + "description": "Retrieve details of `app_markup` according to criteria specified.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "app_markup_details", + "date_from", + "date_to" + ], + "properties": { + "app_markup_details": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "app_id": { + "description": "[Optional] Specific application `app_id` to report on.", + "type": "integer" + }, + "client_loginid": { + "description": "[Optional] Specific client loginid to report on, like CR12345", + "type": "string", + "pattern": "^[A-Za-z]{2,5}[0-9]{2,20}$" + }, + "date_from": { + "description": "Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" + }, + "date_to": { + "description": "End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time.", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" + }, + "description": { + "description": "[Optional] If set to 1, will return `app_markup` transaction details.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit": { + "description": "[Optional] Apply upper limit to count of transactions received.", + "type": "number", + "default": 1000, + "maximum": 1000, + "minimum": 0 + }, + "offset": { + "description": "[Optional] Number of transactions to skip.", + "type": "integer", + "minimum": 0 + }, + "sort": { + "description": "[Optional] Sort direction on `transaction_time`. Other fields sort order is ASC.", + "type": "string", + "default": "DESC", + "enum": [ + "ASC", + "DESC" + ] + }, + "sort_fields": { + "description": "[Optional] One or more of the specified fields to sort on. Default sort field is by `transaction_time`.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "app_id", + "client_loginid", + "transaction_time" + ] + }, + "maxItems": 3, + "minItems": 0, + "uniqueItems": true + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_markup_statistics/send.json b/config/v3/app_markup_statistics/send.json index d7bfd45a..f5254428 100644 --- a/config/v3/app_markup_statistics/send.json +++ b/config/v3/app_markup_statistics/send.json @@ -1,40 +1,48 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Markup Statistics (request)", - "description": "Retrieve statistics of `app_markup`.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["app_markup_statistics", "date_from", "date_to"], - "properties": { - "app_markup_statistics": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "date_from": { - "description": "Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" - }, - "date_to": { - "description": "End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time.", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Markup Statistics (request)", + "description": "Retrieve statistics of `app_markup`.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "app_markup_statistics", + "date_from", + "date_to" + ], + "properties": { + "app_markup_statistics": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "date_from": { + "description": "Start date (epoch or YYYY-MM-DD HH:MM:SS). Results are inclusive of this time.", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" + }, + "date_to": { + "description": "End date (epoch or YYYY-MM-DD HH::MM::SS). Results are inclusive of this time.", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]?[0-9]|2[0-3]):([0-5]?[0-9]):([0-5]?[0-9])|[0-9]{1,10})$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_register/send.json b/config/v3/app_register/send.json index 3ccc7b05..a788f0d3 100644 --- a/config/v3/app_register/send.json +++ b/config/v3/app_register/send.json @@ -1,80 +1,94 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Register (request)", - "description": "Register a new OAuth application", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["app_register", "name", "scopes"], - "properties": { - "app_register": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "app_markup_percentage": { - "description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.", - "type": "number", - "maximum": 3, - "minimum": 0 - }, - "appstore": { - "description": "[Optional] Application's App Store URL (if applicable).", - "type": "string", - "pattern": "^https?://itunes\\.apple\\.com/\\S+$" - }, - "github": { - "description": "[Optional] Application's GitHub page (for open-source projects).", - "type": "string", - "pattern": "^https?://(www\\.)?github\\.com/\\S+$" - }, - "googleplay": { - "description": "[Optional] Application's Google Play URL (if applicable).", - "type": "string", - "pattern": "^https?://play\\.google\\.com/store/apps/details\\?id=[\\w \\.]+$" - }, - "homepage": { - "description": "[Optional] Application's homepage URL.", - "type": "string", - "pattern": "^https?://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "name": { - "description": "Application name.", - "type": "string", - "pattern": "^[\\w\\s-]{1,48}$" - }, - "redirect_uri": { - "description": "[Optional] The URL to redirect to after a successful login. Required if charging markup percentage", - "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "scopes": { - "description": "List of permission scopes to grant the application.", - "type": "array", - "items": { - "type": "string", - "enum": ["read", "trade", "trading_information", "payments", "admin"] - }, - "uniqueItems": true - }, - "verification_uri": { - "description": "[Optional] Used when `verify_email` called. If available, a URL containing the verification token will be sent to the client's email, otherwise only the token will be sent.", - "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Register (request)", + "description": "Register a new OAuth application", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "app_register", + "name", + "scopes" + ], + "properties": { + "app_register": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "app_markup_percentage": { + "description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.", + "type": "number", + "maximum": 3, + "minimum": 0 + }, + "appstore": { + "description": "[Optional] Application's App Store URL (if applicable).", + "type": "string", + "pattern": "^https?://itunes\\.apple\\.com/\\S+$" + }, + "github": { + "description": "[Optional] Application's GitHub page (for open-source projects).", + "type": "string", + "pattern": "^https?://(www\\.)?github\\.com/\\S+$" + }, + "googleplay": { + "description": "[Optional] Application's Google Play URL (if applicable).", + "type": "string", + "pattern": "^https?://play\\.google\\.com/store/apps/details\\?id=[\\w \\.]+$" + }, + "homepage": { + "description": "[Optional] Application's homepage URL.", + "type": "string", + "pattern": "^https?://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "name": { + "description": "Application name.", + "type": "string", + "pattern": "^[\\w\\s-]{1,48}$" + }, + "redirect_uri": { + "description": "[Optional] The URL to redirect to after a successful login. Required if charging markup percentage", + "type": "string", + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "scopes": { + "description": "List of permission scopes to grant the application.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "read", + "trade", + "trading_information", + "payments", + "admin" + ] + }, + "uniqueItems": true + }, + "verification_uri": { + "description": "[Optional] Used when `verify_email` called. If available, a URL containing the verification token will be sent to the client's email, otherwise only the token will be sent.", + "type": "string", + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_update/send.json b/config/v3/app_update/send.json index 8fee6b7d..14242096 100644 --- a/config/v3/app_update/send.json +++ b/config/v3/app_update/send.json @@ -1,79 +1,91 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Update (request)", - "description": "Update a new OAuth application", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["app_update", "name", "scopes"], - "properties": { - "app_update": { - "description": "Application app_id.", - "type": "integer" - }, - "app_markup_percentage": { - "description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.", - "type": "number", - "maximum": 3, - "minimum": 0 - }, - "appstore": { - "description": "[Optional] Application's App Store URL (if applicable).", - "type": "string", - "pattern": "^https?://itunes\\.apple\\.com/\\S+$" - }, - "github": { - "description": "[Optional] Application's GitHub page (for open-source projects).", - "type": "string", - "pattern": "^https?://(www\\.)?github\\.com/\\S+$" - }, - "googleplay": { - "description": "[Optional] Application's Google Play URL (if applicable).", - "type": "string", - "pattern": "^https?://play\\.google\\.com/store/apps/details\\?id=[\\w \\.]+$" - }, - "homepage": { - "description": "[Optional] Application's homepage URL.", - "type": "string", - "pattern": "^https?://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "name": { - "description": "Application name.", - "type": "string", - "pattern": "^[\\w\\s-]{1,48}$" - }, - "redirect_uri": { - "description": "[Optional] The URL to redirect to after a successful login. Required if charging markup percentage.", - "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "scopes": { - "description": "Change scopes will revoke all user's grants and log them out.", - "type": "array", - "items": { - "type": "string", - "enum": ["read", "trade", "trading_information", "payments", "admin"] - }, - "uniqueItems": true - }, - "verification_uri": { - "description": "[Optional] Used when `verify_email` called. If available, a URL containing the verification token will send to the client's email, otherwise only the token will be sent.", - "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Update (request)", + "description": "Update a new OAuth application", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "app_update", + "name", + "scopes" + ], + "properties": { + "app_update": { + "description": "Application app_id.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "[Optional] Markup to be added to contract prices (as a percentage of contract payout). Max markup: 3%.", + "type": "number", + "maximum": 3, + "minimum": 0 + }, + "appstore": { + "description": "[Optional] Application's App Store URL (if applicable).", + "type": "string", + "pattern": "^https?://itunes\\.apple\\.com/\\S+$" + }, + "github": { + "description": "[Optional] Application's GitHub page (for open-source projects).", + "type": "string", + "pattern": "^https?://(www\\.)?github\\.com/\\S+$" + }, + "googleplay": { + "description": "[Optional] Application's Google Play URL (if applicable).", + "type": "string", + "pattern": "^https?://play\\.google\\.com/store/apps/details\\?id=[\\w \\.]+$" + }, + "homepage": { + "description": "[Optional] Application's homepage URL.", + "type": "string", + "pattern": "^https?://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "name": { + "description": "Application name.", + "type": "string", + "pattern": "^[\\w\\s-]{1,48}$" + }, + "redirect_uri": { + "description": "[Optional] The URL to redirect to after a successful login. Required if charging markup percentage.", + "type": "string", + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "scopes": { + "description": "Change scopes will revoke all user's grants and log them out.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "read", + "trade", + "trading_information", + "payments", + "admin" + ] + }, + "uniqueItems": true + }, + "verification_uri": { + "description": "[Optional] Used when `verify_email` called. If available, a URL containing the verification token will send to the client's email, otherwise only the token will be sent.", + "type": "string", + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/asset_index/send.json b/config/v3/asset_index/send.json index 1037b1fc..39c2f5a1 100644 --- a/config/v3/asset_index/send.json +++ b/config/v3/asset_index/send.json @@ -1,57 +1,61 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Asset Index (request)", - "description": "Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["asset_index"], - "properties": { - "asset_index": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "landing_company": { - "description": "Deprecated - replaced by landing_company_short.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "landing_company_short": { - "description": "[Optional] If specified, will return only the underlyings for the specified landing company.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Asset Index (request)", + "description": "Retrieve a list of all available underlyings and the corresponding contract types and duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "asset_index" + ], + "properties": { + "asset_index": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "landing_company": { + "description": "Deprecated - replaced by landing_company_short.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "landing_company_short": { + "description": "[Optional] If specified, will return only the underlyings for the specified landing company.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/authorize/receive.json b/config/v3/authorize/receive.json index e3020c88..d9e4c97d 100644 --- a/config/v3/authorize/receive.json +++ b/config/v3/authorize/receive.json @@ -15,7 +15,7 @@ "additionalProperties": false, "properties": { "account_list": { - "description": "List of accounts for current user.", + "description": "List of accounts for current user. This is also available from the `account_list` call.", "type": "array", "items": { "type": "object", @@ -33,6 +33,10 @@ "description": "Account type.", "type": "string" }, + "broker": { + "description": "2 letter broker code.", + "type": "string" + }, "created_at": { "description": "Creation time of the account as epoch.", "type": "integer" @@ -80,6 +84,7 @@ "description": "Account platform name.", "type": "string", "enum": [ + "ctrader", "derivez", "dtrade", "dwallet", @@ -149,6 +154,7 @@ "description": "Account platform name.", "type": "string", "enum": [ + "ctrader", "derivez", "dtrade", "dwallet", diff --git a/config/v3/authorize/send.json b/config/v3/authorize/send.json index be46396f..6406085c 100644 --- a/config/v3/authorize/send.json +++ b/config/v3/authorize/send.json @@ -1,41 +1,46 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Authorize (request)", - "description": "Authorize current WebSocket session to act on behalf of the owner of a given token. Must precede requests that need to access client account, for example purchasing and selling contracts or viewing portfolio.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["authorize"], - "properties": { - "authorize": { - "description": "Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html", - "type": "string", - "pattern": "^[\\w\\-]{1,128}$", - "sensitive": 1 - }, - "add_to_login_history": { - "description": "[Optional] Send this when you use api tokens for authorization and want to track activity using `login_history` call.", - "type": "integer", - "default": 0, - "enum": [1, 0] - }, - "tokens": { - "description": "Additional Authentication tokens of authorized user that may be used in this session. Upto 10 tokens.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[\\w\\-]{1,128}$" - }, - "maxItems": 10, - "sensitive": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Authorize (request)", + "description": "Authorize current WebSocket session to act on behalf of the owner of a given token. Must precede requests that need to access client account, for example purchasing and selling contracts or viewing portfolio.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "authorize" + ], + "properties": { + "authorize": { + "description": "Authentication token. May be retrieved from https://www.binary.com/en/user/security/api_tokenws.html", + "type": "string", + "pattern": "^[\\w\\-]{1,128}$", + "sensitive": 1 + }, + "add_to_login_history": { + "description": "[Optional] Send this when you use api tokens for authorization and want to track activity using `login_history` call.", + "type": "integer", + "default": 0, + "enum": [ + 1, + 0 + ] + }, + "tokens": { + "description": "Additional Authentication tokens of authorized user that may be used in this session. Upto 10 tokens.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[\\w\\-]{1,128}$" + }, + "maxItems": 10, + "sensitive": 1 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/balance/send.json b/config/v3/balance/send.json index b9610f0d..6b59b663 100644 --- a/config/v3/balance/send.json +++ b/config/v3/balance/send.json @@ -1,41 +1,51 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Balance (request)", - "description": "Get user account balance", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["balance"], - "properties": { - "balance": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account": { - "description": "[Optional] If set to `all`, return the balances of all accounts one by one; if set to `current`, return the balance of current account; if set as an account id, return the balance of that account.", - "type": "string", - "pattern": "^(current|all|[A-Z]{2,4}[0-9]{1,10})$", - "default": "current" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever the balance changes.", - "type": "integer", - "enum": [0, 1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Balance (request)", + "description": "Get user account balance", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "balance" + ], + "properties": { + "balance": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account": { + "description": "[Optional] If set to `all`, return the balances of all accounts one by one; if set to `current`, return the balance of current account; if set as an account id, return the balance of that account.", + "type": "string", + "pattern": "^(current|all|[A-Z]{2,4}[0-9]{1,10})$", + "default": "current" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever the balance changes.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/buy/send.json b/config/v3/buy/send.json index 14850501..334d53f9 100644 --- a/config/v3/buy/send.json +++ b/config/v3/buy/send.json @@ -1,199 +1,225 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Buy Contract (request)", - "description": "Buy a Contract", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["buy", "price"], - "properties": { - "buy": { - "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", - "type": "string", - "pattern": "^(?:[\\w-]{32,128}|1)$" - }, - "parameters": { - "description": "[Optional] Used to pass the parameters for contract buy.", - "type": "object", - "additionalProperties": false, - "required": ["contract_type", "currency", "symbol"], - "properties": { - "amount": { - "description": "[Optional] Proposed payout or stake value", - "type": "number", - "minimum": 0 - }, - "app_markup_percentage": { - "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", - "type": "number" - }, - "barrier": { - "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" - }, - "barrier2": { - "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" - }, - "barrier_range": { - "description": "[Optional] Barrier range for callputspread.", - "type": "string", - "enum": ["tight", "middle", "wide"] - }, - "basis": { - "description": "[Optional] Indicates whether amount is 'payout' or 'stake' for binary options.", - "type": "string", - "enum": ["payout", "stake"] - }, - "cancellation": { - "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", - "type": "string", - "pattern": "^\\w+$" - }, - "contract_type": { - "description": "A valid contract-type", - "type": "string", - "enum": [ - "MULTUP", - "MULTDOWN", - "UPORDOWN", - "EXPIRYRANGE", - "ONETOUCH", - "CALLE", - "LBHIGHLOW", - "ASIAND", - "EXPIRYRANGEE", - "DIGITDIFF", - "DIGITMATCH", - "DIGITOVER", - "PUTE", - "DIGITUNDER", - "NOTOUCH", - "CALL", - "RANGE", - "LBFLOATPUT", - "DIGITODD", - "PUT", - "ASIANU", - "LBFLOATCALL", - "EXPIRYMISSE", - "EXPIRYMISS", - "DIGITEVEN", - "TICKHIGH", - "TICKLOW", - "RESETCALL", - "RESETPUT", - "CALLSPREAD", - "PUTSPREAD", - "RUNHIGH", - "RUNLOW", - "ACCU", - "VANILLALONGCALL", - "VANILLALONGPUT", - "TURBOSLONG", - "TURBOSSHORT" - ] - }, - "currency": { - "description": "This can only be the account-holder's currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify date_expiry or duration.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "date_start": { - "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity", - "type": "integer", - "maximum": 99999999, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", - "type": "string", - "enum": ["d", "m", "s", "h", "t"] - }, - "growth_rate": { - "description": "[Optional] Growth rate of an accumulator contract.", - "type": "number" - }, - "limit_order": { - "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and `ACCU` contracts).", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", - "type": "number" - }, - "take_profit": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract (request)", + "description": "Buy a Contract", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "buy", + "price" + ], + "properties": { + "buy": { + "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", + "type": "string", + "pattern": "^(?:[\\w-]{32,128}|1)$" + }, + "parameters": { + "description": "[Optional] Used to pass the parameters for contract buy.", + "type": "object", + "additionalProperties": false, + "required": [ + "contract_type", + "currency", + "symbol" + ], + "properties": { + "amount": { + "description": "[Optional] Proposed payout or stake value", + "type": "number", + "minimum": 0 + }, + "app_markup_percentage": { + "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", + "type": "number" + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier_range": { + "description": "[Optional] Barrier range for callputspread.", + "type": "string", + "enum": [ + "tight", + "middle", + "wide" + ] + }, + "basis": { + "description": "[Optional] Indicates whether amount is 'payout' or 'stake' for binary options.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "cancellation": { + "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", + "type": "string", + "pattern": "^\\w+$" + }, + "contract_type": { + "description": "A valid contract-type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "ACCU", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify date_expiry or duration.", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + }, + "date_start": { + "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity", + "type": "integer", + "maximum": 99999999, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", + "type": "string", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "growth_rate": { + "description": "[Optional] Growth rate of an accumulator contract.", + "type": "number" + }, + "limit_order": { + "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and `ACCU` contracts).", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", + "type": "number" + }, + "take_profit": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", + "type": "number" + } + } + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "product_type": { + "description": "[Optional] The product type.", + "type": "string", + "default": "basic", + "enum": [ + "basic" + ] + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", + "type": "integer" + }, + "symbol": { + "description": "Symbol code", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "trading_period_start": { + "description": "[Optional] An epoch value of a predefined trading period start time", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + } } - } - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "product_type": { - "description": "[Optional] The product type.", - "type": "string", - "default": "basic", - "enum": ["basic"] - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", - "type": "integer" - }, - "symbol": { - "description": "Symbol code", - "type": "string", - "pattern": "^\\w{2,30}$" }, - "trading_period_start": { - "description": "[Optional] An epoch value of a predefined trading period start time", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 + "price": { + "description": "Maximum price at which to purchase the contract.", + "type": "number", + "minimum": 0 + }, + "subscribe": { + "description": "[Optional] `1` to stream.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "price": { - "description": "Maximum price at which to purchase the contract.", - "type": "number", - "minimum": 0 - }, - "subscribe": { - "description": "[Optional] `1` to stream.", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/buy_contract_for_multiple_accounts/send.json b/config/v3/buy_contract_for_multiple_accounts/send.json index 07da8c64..1efef840 100644 --- a/config/v3/buy_contract_for_multiple_accounts/send.json +++ b/config/v3/buy_contract_for_multiple_accounts/send.json @@ -1,162 +1,181 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Buy Contract for Multiple Accounts (request)", - "description": "Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["buy_contract_for_multiple_accounts", "price", "tokens"], - "properties": { - "buy_contract_for_multiple_accounts": { - "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", - "type": "string", - "pattern": "^(?:[\\w-]{32,128}|1)$" - }, - "parameters": { - "description": "[Optional] Used to pass the parameters for contract buy.", - "type": "object", - "additionalProperties": false, - "required": ["contract_type", "currency", "symbol"], - "properties": { - "amount": { - "description": "[Optional] Proposed `payout` or `stake` value", - "type": "number", - "minimum": 0 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract for Multiple Accounts (request)", + "description": "Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "buy_contract_for_multiple_accounts", + "price", + "tokens" + ], + "properties": { + "buy_contract_for_multiple_accounts": { + "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", + "type": "string", + "pattern": "^(?:[\\w-]{32,128}|1)$" }, - "app_markup_percentage": { - "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", - "type": "number" + "parameters": { + "description": "[Optional] Used to pass the parameters for contract buy.", + "type": "object", + "additionalProperties": false, + "required": [ + "contract_type", + "currency", + "symbol" + ], + "properties": { + "amount": { + "description": "[Optional] Proposed `payout` or `stake` value", + "type": "number", + "minimum": 0 + }, + "app_markup_percentage": { + "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", + "type": "number" + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + }, + "basis": { + "description": "[Optional] Indicate whether amount is 'payout' or 'stake'.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "contract_type": { + "description": "A valid contract-type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify `date_expiry` or `duration`.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "date_start": { + "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity", + "type": "integer", + "maximum": 3600, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", + "type": "string", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", + "type": "integer" + }, + "symbol": { + "description": "Symbol code", + "type": "string", + "pattern": "^\\w{2,30}$" + } + } }, - "barrier": { - "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + "price": { + "description": "Maximum price at which to purchase the contract.", + "type": "number", + "minimum": 0 }, - "barrier2": { - "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + "tokens": { + "description": "List of API tokens identifying the accounts for which the contract is bought. Note: If the same token appears multiple times or if multiple tokens designate the same account, the contract is bought multiple times for this account.", + "type": "array", + "items": { + "description": "API token identifying the accounts for which the contract is bought.", + "type": "string", + "pattern": "^[\\w\\s-]+$" + }, + "sensitive": 1 }, - "basis": { - "description": "[Optional] Indicate whether amount is 'payout' or 'stake'.", - "type": "string", - "enum": ["payout", "stake"] + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" }, - "contract_type": { - "description": "A valid contract-type", - "type": "string", - "enum": [ - "MULTUP", - "MULTDOWN", - "UPORDOWN", - "EXPIRYRANGE", - "ONETOUCH", - "CALLE", - "LBHIGHLOW", - "ASIAND", - "EXPIRYRANGEE", - "DIGITDIFF", - "DIGITMATCH", - "DIGITOVER", - "PUTE", - "DIGITUNDER", - "NOTOUCH", - "CALL", - "RANGE", - "LBFLOATPUT", - "DIGITODD", - "PUT", - "ASIANU", - "LBFLOATCALL", - "EXPIRYMISSE", - "EXPIRYMISS", - "DIGITEVEN", - "TICKHIGH", - "TICKLOW", - "RESETCALL", - "RESETPUT", - "CALLSPREAD", - "PUTSPREAD", - "RUNHIGH", - "RUNLOW", - "VANILLALONGCALL", - "VANILLALONGPUT", - "TURBOSLONG", - "TURBOSSHORT" - ] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" }, - "currency": { - "description": "This can only be the account-holder's currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify `date_expiry` or `duration`.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "date_start": { - "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity", - "type": "integer", - "maximum": 3600, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", - "type": "string", - "enum": ["d", "m", "s", "h", "t"] - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", - "type": "integer" - }, - "symbol": { - "description": "Symbol code", - "type": "string", - "pattern": "^\\w{2,30}$" + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "price": { - "description": "Maximum price at which to purchase the contract.", - "type": "number", - "minimum": 0 - }, - "tokens": { - "description": "List of API tokens identifying the accounts for which the contract is bought. Note: If the same token appears multiple times or if multiple tokens designate the same account, the contract is bought multiple times for this account.", - "type": "array", - "items": { - "description": "API token identifying the accounts for which the contract is bought.", - "type": "string", - "pattern": "^[\\w\\s-]+$" - }, - "sensitive": 1 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/cancel/send.json b/config/v3/cancel/send.json index e2d51b69..7187b2f2 100644 --- a/config/v3/cancel/send.json +++ b/config/v3/cancel/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cancel a Contract (request)", - "description": "Cancel contract with contract id", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["cancel"], - "properties": { - "cancel": { - "description": "Value should be the `contract_id` which received from the `portfolio` call.", - "type": "integer" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cancel a Contract (request)", + "description": "Cancel contract with contract id", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "cancel" + ], + "properties": { + "cancel": { + "description": "Value should be the `contract_id` which received from the `portfolio` call.", + "type": "integer" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/cashier/send.json b/config/v3/cashier/send.json index 9e3cf297..22ac712e 100644 --- a/config/v3/cashier/send.json +++ b/config/v3/cashier/send.json @@ -1,63 +1,86 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cashier Information (request)", - "description": "Request the cashier info for the specified type.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["cashier"], - "properties": { - "cashier": { - "description": "Operation which needs to be requested from cashier", - "type": "string", - "default": "deposit", - "enum": ["deposit", "withdraw"] - }, - "address": { - "description": "[Optional] Address for crypto withdrawal. Only applicable for `api` type.", - "type": "string" - }, - "amount": { - "description": "[Optional] Amount for crypto withdrawal. Only applicable for `api` type.", - "type": "number", - "minimum": 0 - }, - "dry_run": { - "description": "[Optional] If set to `1`, only validation is performed. Only applicable for `withdraw` using `crypto` provider and `api` type.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "provider": { - "description": "[Optional] Cashier provider. `crypto` will be default option for crypto currency accounts.", - "type": "string", - "default": "doughflow", - "enum": ["doughflow", "crypto"] - }, - "type": { - "description": "[Optional] Data need to be returned from cashier. `api` is supported only for `crypto` provider.", - "type": "string", - "default": "url", - "enum": ["url", "api"] - }, - "verification_code": { - "description": "[Optional] Email verification code (received from a `verify_email` call, which must be done first)", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cashier Information (request)", + "description": "Request the cashier info for the specified type.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "cashier" + ], + "properties": { + "cashier": { + "description": "Operation which needs to be requested from cashier", + "type": "string", + "default": "deposit", + "enum": [ + "deposit", + "withdraw" + ] + }, + "address": { + "description": "[Optional] Address for crypto withdrawal. Only applicable for `api` type.", + "type": "string" + }, + "amount": { + "description": "[Optional] Amount for crypto withdrawal. Only applicable for `api` type.", + "type": "number", + "minimum": 0 + }, + "dry_run": { + "description": "[Optional] If set to `1`, only validation is performed. Only applicable for `withdraw` using `crypto` provider and `api` type.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "estimated_fee_unique_id": { + "description": "[Optional] The `unique_id` of the estimated fee received from `crypto_estimations` call in case the client is willing to pay the returned fee in order to prioritise their withdrawal request.", + "type": "string", + "examples": [ + "ltc-c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + }, + "provider": { + "description": "[Optional] Cashier provider. `crypto` will be default option for crypto currency accounts.", + "type": "string", + "default": "doughflow", + "enum": [ + "doughflow", + "crypto" + ] + }, + "type": { + "description": "[Optional] Data is returned from the cashier. The `crypto` provider only supports `api` (not `url`) for crypto accounts.", + "type": "string", + "default": "url", + "enum": [ + "url", + "api" + ] + }, + "verification_code": { + "description": "[Optional] Email verification code (received from a `verify_email` call, which must be done first)", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/contract_update/send.json b/config/v3/contract_update/send.json index 2b2e1e79..664f9638 100644 --- a/config/v3/contract_update/send.json +++ b/config/v3/contract_update/send.json @@ -1,49 +1,63 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Update Contract (request)", - "description": "Update a contract condition.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["contract_update", "contract_id", "limit_order"], - "properties": { - "contract_update": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_id": { - "description": "Internal unique contract identifier.", - "type": "integer" - }, - "limit_order": { - "description": "Specify limit order to update.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "New stop loss value for a contract. To cancel, pass `null`.", - "type": ["null", "number"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Update Contract (request)", + "description": "Update a contract condition.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "contract_update", + "contract_id", + "limit_order" + ], + "properties": { + "contract_update": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "take_profit": { - "description": "New take profit value for a contract. To cancel, pass `null`.", - "type": ["null", "number"] + "contract_id": { + "description": "Internal unique contract identifier.", + "type": "integer" + }, + "limit_order": { + "description": "Specify limit order to update.", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "New stop loss value for a contract. To cancel, pass `null`.", + "type": [ + "null", + "number" + ] + }, + "take_profit": { + "description": "New take profit value for a contract. To cancel, pass `null`.", + "type": [ + "null", + "number" + ] + } + } + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/contract_update_history/send.json b/config/v3/contract_update_history/send.json index 3c772261..2504eb9c 100644 --- a/config/v3/contract_update_history/send.json +++ b/config/v3/contract_update_history/send.json @@ -1,41 +1,48 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Update Contract History (request)", - "description": "Request for contract update history.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["contract_update_history", "contract_id"], - "properties": { - "contract_update_history": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_id": { - "description": "Internal unique contract identifier.", - "type": "integer" - }, - "limit": { - "description": "[Optional] Maximum number of historical updates to receive.", - "type": "number", - "default": 500, - "maximum": 999, - "minimum": 1 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Update Contract History (request)", + "description": "Request for contract update history.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "contract_update_history", + "contract_id" + ], + "properties": { + "contract_update_history": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "contract_id": { + "description": "Internal unique contract identifier.", + "type": "integer" + }, + "limit": { + "description": "[Optional] Maximum number of historical updates to receive.", + "type": "number", + "default": 500, + "maximum": 999, + "minimum": 1 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/contracts_for/send.json b/config/v3/contracts_for/send.json index 17447098..b8d1dc9e 100644 --- a/config/v3/contracts_for/send.json +++ b/config/v3/contracts_for/send.json @@ -1,70 +1,74 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Contracts For Symbol (request)", - "description": "For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["contracts_for"], - "properties": { - "contracts_for": { - "description": "The short symbol name (obtained from `active_symbols` call).", - "type": "string", - "pattern": "^\\w{2,30}$" - }, - "currency": { - "description": "[Optional] Currency of the contract's stake and payout (obtained from `payout_currencies` call).", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "default": "USD" - }, - "landing_company": { - "description": "Deprecated - Replaced by landing_company_short.", - "type": "string", - "default": "virtual", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "landing_company_short": { - "description": "[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.", - "type": "string", - "default": "virtual", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "product_type": { - "description": "[Optional] If you specify this field, only contracts tradable through that contract type will be returned.", - "type": "string", - "enum": ["basic"] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Contracts For Symbol (request)", + "description": "For a given symbol, get the list of currently available contracts, and the latest barrier and duration limits for each contract.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "contracts_for" + ], + "properties": { + "contracts_for": { + "description": "The short symbol name (obtained from `active_symbols` call).", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "currency": { + "description": "[Optional] Currency of the contract's stake and payout (obtained from `payout_currencies` call).", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "default": "USD" + }, + "landing_company": { + "description": "Deprecated - Replaced by landing_company_short.", + "type": "string", + "default": "virtual", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "landing_company_short": { + "description": "[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.", + "type": "string", + "default": "virtual", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "product_type": { + "description": "[Optional] If you specify this field, only contracts tradable through that contract type will be returned.", + "type": "string", + "enum": [ + "basic" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copy_start/send.json b/config/v3/copy_start/send.json index fa9a6bec..f73f0df7 100644 --- a/config/v3/copy_start/send.json +++ b/config/v3/copy_start/send.json @@ -1,71 +1,75 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Start (request)", - "description": "Start copy trader bets", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["copy_start"], - "properties": { - "copy_start": { - "description": "API tokens identifying the accounts of trader which will be used to copy trades", - "type": "string", - "pattern": "^[\\w\\s-]{15,32}$", - "sensitive": 1 - }, - "assets": { - "description": "[Optional] Used to set assets to be copied. E.x [\"frxUSDJPY\", \"R_50\"]", - "oneOf": [ - { - "type": "string", - "pattern": "^\\w{4,128}$" - }, - { - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Start (request)", + "description": "Start copy trader bets", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "copy_start" + ], + "properties": { + "copy_start": { + "description": "API tokens identifying the accounts of trader which will be used to copy trades", "type": "string", - "pattern": "^\\w{4,128}$" - } - } - ] - }, - "max_trade_stake": { - "description": "[Optional] Used to set maximum trade stake to be copied.", - "type": "number" - }, - "min_trade_stake": { - "description": "[Optional] Used to set minimal trade stake to be copied.", - "type": "number" - }, - "trade_types": { - "description": "[Optional] Used to set trade types to be copied. E.x [\"CALL\", \"PUT\"]", - "oneOf": [ - { - "type": "string", - "pattern": "^\\w{3,128}$" + "pattern": "^[\\w\\s-]{15,32}$", + "sensitive": 1 + }, + "assets": { + "description": "[Optional] Used to set assets to be copied. E.x [\"frxUSDJPY\", \"R_50\"]", + "oneOf": [ + { + "type": "string", + "pattern": "^\\w{4,128}$" + }, + { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w{4,128}$" + } + } + ] + }, + "max_trade_stake": { + "description": "[Optional] Used to set maximum trade stake to be copied.", + "type": "number" }, - { - "type": "array", - "items": { + "min_trade_stake": { + "description": "[Optional] Used to set minimal trade stake to be copied.", + "type": "number" + }, + "trade_types": { + "description": "[Optional] Used to set trade types to be copied. E.x [\"CALL\", \"PUT\"]", + "oneOf": [ + { + "type": "string", + "pattern": "^\\w{3,128}$" + }, + { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w{3,128}$" + } + } + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", "type": "string", - "pattern": "^\\w{3,128}$" - } + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/copy_stop/send.json b/config/v3/copy_stop/send.json index 9363bbb5..fb346590 100644 --- a/config/v3/copy_stop/send.json +++ b/config/v3/copy_stop/send.json @@ -1,31 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Stop (request)", - "description": "Stop copy trader bets", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["copy_stop"], - "properties": { - "copy_stop": { - "description": "API tokens identifying the accounts which needs not to be copied", - "type": "string", - "pattern": "^[\\w\\s-]{15,32}$", - "sensitive": 1 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Stop (request)", + "description": "Stop copy trader bets", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "copy_stop" + ], + "properties": { + "copy_stop": { + "description": "API tokens identifying the accounts which needs not to be copied", + "type": "string", + "pattern": "^[\\w\\s-]{15,32}$", + "sensitive": 1 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copytrading_list/send.json b/config/v3/copytrading_list/send.json index 2b627494..da7767d3 100644 --- a/config/v3/copytrading_list/send.json +++ b/config/v3/copytrading_list/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: List (request)", - "description": "Retrieves a list of active copiers and/or traders for Copy Trading", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["copytrading_list"], - "properties": { - "copytrading_list": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: List (request)", + "description": "Retrieves a list of active copiers and/or traders for Copy Trading", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "copytrading_list" + ], + "properties": { + "copytrading_list": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copytrading_statistics/send.json b/config/v3/copytrading_statistics/send.json index 059e7644..ca590659 100644 --- a/config/v3/copytrading_statistics/send.json +++ b/config/v3/copytrading_statistics/send.json @@ -1,29 +1,34 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Statistics (request)", - "description": "Retrieve performance, trading, risk and copiers statistics of trader.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["copytrading_statistics", "trader_id"], - "properties": { - "copytrading_statistics": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "trader_id": { - "description": "The ID of the target trader.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Statistics (request)", + "description": "Retrieve performance, trading, risk and copiers statistics of trader.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "copytrading_statistics", + "trader_id" + ], + "properties": { + "copytrading_statistics": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "trader_id": { + "description": "The ID of the target trader.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/crypto_config/send.json b/config/v3/crypto_config/send.json index cdf96dc5..b21a5032 100644 --- a/config/v3/crypto_config/send.json +++ b/config/v3/crypto_config/send.json @@ -1,34 +1,38 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cryptocurrency configurations (request)", - "description": "The request for cryptocurrencies configuration.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["crypto_config"], - "properties": { - "crypto_config": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "currency_code": { - "description": "[Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cryptocurrency configurations (request)", + "description": "The request for cryptocurrencies configuration.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "crypto_config" + ], + "properties": { + "crypto_config": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "currency_code": { + "description": "[Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/crypto_estimations/example.json b/config/v3/crypto_estimations/example.json index 9b21d0a2..74d0dcda 100644 --- a/config/v3/crypto_estimations/example.json +++ b/config/v3/crypto_estimations/example.json @@ -1,4 +1,4 @@ { - "crypto_estimations": 1, - "currency_code": "BTC" + "crypto_estimations": 1, + "currency_code": "BTC" } diff --git a/config/v3/crypto_estimations/receive.json b/config/v3/crypto_estimations/receive.json index ba22ac41..e3dcdbc0 100644 --- a/config/v3/crypto_estimations/receive.json +++ b/config/v3/crypto_estimations/receive.json @@ -1,74 +1,87 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cryptocurrency Estimations (response)", - "description": "Latest cryptocurrency estimations.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "crypto_estimations": { - "title": "crypto_estimations", - "description": "Cryptocurrency estimations. E.g. Withdrawal fee estimations.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Cryptocurrency code", - "type": "object", - "additionalProperties": false, - "minProperties": 0, - "properties": { - "withdrawal_fee": { - "description": "Estimated fee for crypto withdrawal calculated based on the current network conditions.", - "type": "object", - "additionalProperties": false, - "properties": { - "expiry_time": { - "description": "Expiry time for the estimated fee in epoch.", - "type": "integer", - "examples": [1589380800] - }, - "unique_id": { - "description": "Unique identifier for the estimated fee which allows locking the fee for a client.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] - }, - "value": { - "description": "Value of current estimated fee.", - "type": "number", - "examples": 0.0005 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cryptocurrency Estimations (response)", + "description": "Latest cryptocurrency estimations.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "crypto_estimations": { + "title": "crypto_estimations", + "description": "Cryptocurrency estimations. E.g. Withdrawal fee estimations.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Cryptocurrency code", + "type": "object", + "additionalProperties": false, + "minProperties": 0, + "properties": { + "withdrawal_fee": { + "description": "Estimated fee for crypto withdrawal calculated based on the current network conditions.", + "type": "object", + "additionalProperties": false, + "properties": { + "expiry_time": { + "description": "Expiry time for the estimated fee in epoch.", + "type": "integer", + "examples": [ + 1589380800 + ] + }, + "unique_id": { + "description": "Unique identifier for the estimated fee which allows locking the fee for a client.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + }, + "value": { + "description": "Value of current estimated fee.", + "type": "number", + "examples": 0.0005 + } + } + } + } } - } } - } - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + }, + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "crypto_estimations" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["crypto_estimations"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/crypto_estimations/send.json b/config/v3/crypto_estimations/send.json index 60ff76a1..e007450f 100644 --- a/config/v3/crypto_estimations/send.json +++ b/config/v3/crypto_estimations/send.json @@ -1,39 +1,46 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cryptocurrency Estimations (request)", - "description": "Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["crypto_estimations", "currency_code"], - "properties": { - "crypto_estimations": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "currency_code": { - "description": "Cryptocurrency code for which fee estimation is provided.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is an update to crypto estimations.", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cryptocurrency Estimations (request)", + "description": "Get the current estimations for cryptocurrencies. E.g. Withdrawal fee.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "crypto_estimations", + "currency_code" + ], + "properties": { + "crypto_estimations": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "currency_code": { + "description": "Cryptocurrency code for which fee estimation is provided.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is an update to crypto estimations.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/document_upload/send.json b/config/v3/document_upload/send.json index b14b28cb..76e243be 100644 --- a/config/v3/document_upload/send.json +++ b/config/v3/document_upload/send.json @@ -1,135 +1,157 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Document Upload (request)", - "description": "Request KYC information from client", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "document_upload", - "document_format", - "document_type", - "expected_checksum", - "file_size" - ], - "properties": { - "document_upload": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "document_format": { - "description": "Document file format", - "type": "string", - "enum": ["PNG", "JPG", "JPEG", "GIF", "PDF"] - }, - "document_id": { - "description": "[Optional] Document ID (required for Passport, Proof of ID and Driver's License)", - "type": "string", - "pattern": "^[\\w\\s-]{0,30}$" - }, - "document_issuing_country": { - "description": "2-letter country code, mandatory for POI only", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "document_type": { - "description": "Document type", - "type": "string", - "enum": [ - "passport", - "national_identity_card", - "driving_licence", - "utility_bill", - "bankstatement", - "power_of_attorney", - "amlglobalcheck", - "docverification", - "proofid", - "driverslicense", - "proofaddress", - "other", - "voter_card", - "student_card", - "nimc_slip", - "birth_certificate", - "pan_card", - "tax_photo_id", - "selfie_with_id", - "poi_others", - "insurance_bill", - "tax_receipt", - "phone_bill", - "poa_others", - "proof_of_ownership", - "tax_return", - "employment_contract", - "brokerage statement", - "payslip", - "edd_others", - "coi", - "business_poa", - "article_of_association", - "memorandum", - "authorisation_letter", - "declarations", - "business_documents_others" - ] - }, - "expected_checksum": { - "description": "The checksum of the file to be uploaded", - "type": "string", - "pattern": "^[[:xdigit:]]{32}" - }, - "expiration_date": { - "description": "[Optional] Document expiration date (required for Passport, Proof of ID and Driver's License)", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "file_size": { - "description": "Document size (should be less than 10MB)", - "type": "integer" - }, - "lifetime_valid": { - "description": "[Optional] Boolean value that indicates whether this document is lifetime valid (only applies to POI document types, cancels out the expiration_date given if any)", - "type": "integer", - "enum": [0, 1] - }, - "page_type": { - "description": "[Optional] To determine document side", - "type": "string", - "enum": ["front", "back", "photo"] - }, - "proof_of_ownership": { - "description": "[Optional] It contains info about the proof of ownership being uploaded (mandatory for proof_of_ownership document type)", - "type": "object", - "additionalProperties": false, - "required": ["details", "id"], - "properties": { - "details": { - "description": "A collection of unspecific information related to the proof of ownership being uploaded", - "type": "object", - "required": ["payment_identifier"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Document Upload (request)", + "description": "Request KYC information from client", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "document_upload", + "document_format", + "document_type", + "expected_checksum", + "file_size" + ], + "properties": { + "document_upload": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "id": { - "description": "The id of the proof of ownership as shown in the /get_account_status proof of ownership list", - "type": "number" + "document_format": { + "description": "Document file format", + "type": "string", + "enum": [ + "PNG", + "JPG", + "JPEG", + "GIF", + "PDF" + ] + }, + "document_id": { + "description": "[Optional] Document ID (required for Passport, Proof of ID and Driver's License)", + "type": "string", + "pattern": "^[\\w\\s-]{0,30}$" + }, + "document_issuing_country": { + "description": "2-letter country code, mandatory for POI only", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "document_type": { + "description": "Document type", + "type": "string", + "enum": [ + "passport", + "national_identity_card", + "driving_licence", + "utility_bill", + "bankstatement", + "power_of_attorney", + "amlglobalcheck", + "docverification", + "proofid", + "driverslicense", + "proofaddress", + "other", + "voter_card", + "student_card", + "nimc_slip", + "birth_certificate", + "pan_card", + "tax_photo_id", + "selfie_with_id", + "poi_others", + "insurance_bill", + "tax_receipt", + "phone_bill", + "poa_others", + "proof_of_ownership", + "tax_return", + "employment_contract", + "brokerage statement", + "payslip", + "edd_others", + "coi", + "business_poa", + "article_of_association", + "memorandum", + "authorisation_letter", + "declarations", + "business_documents_others" + ] + }, + "expected_checksum": { + "description": "The checksum of the file to be uploaded", + "type": "string", + "pattern": "^[[:xdigit:]]{32}" + }, + "expiration_date": { + "description": "[Optional] Document expiration date (required for Passport, Proof of ID and Driver's License)", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "file_size": { + "description": "Document size (should be less than 10MB)", + "type": "integer" + }, + "lifetime_valid": { + "description": "[Optional] Boolean value that indicates whether this document is lifetime valid (only applies to POI document types, cancels out the expiration_date given if any)", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "page_type": { + "description": "[Optional] To determine document side", + "type": "string", + "enum": [ + "front", + "back", + "photo" + ] + }, + "proof_of_ownership": { + "description": "[Optional] It contains info about the proof of ownership being uploaded (mandatory for proof_of_ownership document type)", + "type": "object", + "additionalProperties": false, + "required": [ + "details", + "id" + ], + "properties": { + "details": { + "description": "A collection of unspecific information related to the proof of ownership being uploaded", + "type": "object", + "required": [ + "payment_identifier" + ] + }, + "id": { + "description": "The id of the proof of ownership as shown in the /get_account_status proof of ownership list", + "type": "number" + } + } + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/economic_calendar/send.json b/config/v3/economic_calendar/send.json index 742aee93..803f3898 100644 --- a/config/v3/economic_calendar/send.json +++ b/config/v3/economic_calendar/send.json @@ -1,41 +1,45 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Economic Calendar (request)", - "description": "Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["economic_calendar"], - "properties": { - "economic_calendar": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "currency": { - "description": "[Optional] Currency symbol.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "end_date": { - "description": "[Optional] End date.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "start_date": { - "description": "[Optional] Start date.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Economic Calendar (request)", + "description": "Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "economic_calendar" + ], + "properties": { + "economic_calendar": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "currency": { + "description": "[Optional] Currency symbol.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "end_date": { + "description": "[Optional] End date.", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + }, + "start_date": { + "description": "[Optional] Start date.", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/exchange_rates/receive.json b/config/v3/exchange_rates/receive.json index fb469e2d..1a5c8391 100644 --- a/config/v3/exchange_rates/receive.json +++ b/config/v3/exchange_rates/receive.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Exchange Rates (response)", - "description": "The exchange rate values from the specified base currency to all currencies supported by the system.", + "description": "The exchange rate values from the specified base currency to the specified target currency supported by the system.", "type": "object", "required": [ "echo_req", @@ -10,7 +10,7 @@ "properties": { "exchange_rates": { "title": "exchange_rates", - "description": "Exchange rate values from base to all other currencies", + "description": "Exchange rate values from base to target currency", "type": "object", "additionalProperties": false, "properties": { @@ -24,7 +24,7 @@ "type": "integer" }, "rates": { - "description": "Rates of exchanging a unit of base currency into the target currencies", + "description": "Rate of exchanging a unit of base currency into a target currency", "type": "object", "patternProperties": { "^[a-zA-Z0-9]{2,20}$": { diff --git a/config/v3/exchange_rates/send.json b/config/v3/exchange_rates/send.json index 384fd442..df036c46 100644 --- a/config/v3/exchange_rates/send.json +++ b/config/v3/exchange_rates/send.json @@ -1,44 +1,51 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Exchange Rates (request)", - "description": "Retrieves the exchange rates from a base currency to all currencies supported by the system.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["exchange_rates", "base_currency"], - "properties": { - "exchange_rates": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "base_currency": { - "description": "Base currency (can be obtained from `payout_currencies` call)", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "subscribe": { - "description": "[Optional] 1 - to initiate a realtime stream of exchange rates relative to base currency.", - "type": "integer", - "enum": [1] - }, - "target_currency": { - "description": "[Optional] Local currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Exchange Rates (request)", + "description": "Retrieves the exchange rate from a base currency to a target currency supported by the system.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "exchange_rates", + "base_currency" + ], + "properties": { + "exchange_rates": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "base_currency": { + "description": "Base currency (can be obtained from `payout_currencies` call)", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "subscribe": { + "description": "[Optional] 1 - to initiate a realtime stream of exchange rates relative to base currency.", + "type": "integer", + "enum": [ + 1 + ] + }, + "target_currency": { + "description": "[Optional] Target currency for the exchange rate. If subscribe is set, target_currency must be specified as well.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/forget/send.json b/config/v3/forget/send.json index a991a28b..53640326 100644 --- a/config/v3/forget/send.json +++ b/config/v3/forget/send.json @@ -1,24 +1,26 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget (request)", - "description": "Immediately cancel the real-time stream of messages with a specific ID.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["forget"], - "properties": { - "forget": { - "description": "ID of the real-time stream of messages to cancel.", - "type": "string", - "pattern": "^[\\w-]{32,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Forget (request)", + "description": "Immediately cancel the real-time stream of messages with a specific ID.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "forget" + ], + "properties": { + "forget": { + "description": "ID of the real-time stream of messages to cancel.", + "type": "string", + "pattern": "^[\\w-]{32,128}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/forget_all/send.json b/config/v3/forget_all/send.json index e9192cbc..a34c5e9f 100644 --- a/config/v3/forget_all/send.json +++ b/config/v3/forget_all/send.json @@ -1,55 +1,57 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget All (request)", - "description": "Immediately cancel the real-time streams of messages of given type.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["forget_all"], - "properties": { - "forget_all": { - "description": "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\"]`.", - "oneOf": [ - { - "$ref": "#/definitions/stream_types" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Forget All (request)", + "description": "Immediately cancel the real-time streams of messages of given type.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "forget_all" + ], + "properties": { + "forget_all": { + "description": "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\"]`.", + "oneOf": [ + { + "$ref": "#/definitions/stream_types" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/stream_types" + } + } + ] }, - { - "type": "array", - "items": { - "$ref": "#/definitions/stream_types" - } + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" - } - }, - "definitions": { - "stream_types": { - "description": "Valid stream types that can be used to unsubscribe from.", - "type": "string", - "enum": [ - "balance", - "candles", - "cashier_payments", - "p2p_advert", - "p2p_advertiser", - "p2p_order", - "proposal", - "proposal_open_contract", - "ticks", - "transaction", - "trading_platform_asset_listing", - "website_status", - "p2p_settings", - "crypto_estimations" - ] + "definitions": { + "stream_types": { + "description": "Valid stream types that can be used to unsubscribe from.", + "type": "string", + "enum": [ + "balance", + "candles", + "cashier_payments", + "p2p_advert", + "p2p_advertiser", + "p2p_order", + "proposal", + "proposal_open_contract", + "ticks", + "transaction", + "trading_platform_asset_listing", + "website_status", + "p2p_settings", + "crypto_estimations" + ] + } } - } } diff --git a/config/v3/get_account_status/receive.json b/config/v3/get_account_status/receive.json index e3f4121a..6a22922a 100644 --- a/config/v3/get_account_status/receive.json +++ b/config/v3/get_account_status/receive.json @@ -15,6 +15,7 @@ "additionalProperties": false, "required": [ "currency_config", + "p2p_poa_required", "p2p_status", "prompt_client_to_authenticate", "risk_classification", @@ -382,6 +383,14 @@ } } }, + "p2p_poa_required": { + "description": "P2P requires proof of address.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, "p2p_status": { "description": "Current P2P status of client.", "type": "string", @@ -414,7 +423,7 @@ ] }, "status": { - "description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified. \n- `authenticated_with_idv_photoid`: the client has been fully authenticated by IDV. \n- `idv_revoked`: the client used to be fully authenticated by IDV but it was taken away due to compliance criteria. \n- `mt5_additional_kyc_required`: client tax information, place of birth and account opening reason is missing", + "description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified. \n- `authenticated_with_idv_photoid`: the client has been fully authenticated by IDV. \n- `idv_revoked`: the client used to be fully authenticated by IDV but it was taken away due to compliance criteria. \n- `mt5_additional_kyc_required`: client tax information, place of birth and account opening reason is missing. \n- `poi_expiring_soon`: the POI documents of the client will get expired soon, allow them to reupload POI documents. \n- `poa_expiring_soon`: the POA documents of the client will get outdated soon, allow them to reupload POA documents.", "type": "array", "items": { "type": "string" diff --git a/config/v3/get_account_status/send.json b/config/v3/get_account_status/send.json index 811ccc14..d3d2ca25 100644 --- a/config/v3/get_account_status/send.json +++ b/config/v3/get_account_status/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Account Status (request)", - "description": "Get Account Status", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["get_account_status"], - "properties": { - "get_account_status": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account Status (request)", + "description": "Get Account Status", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "get_account_status" + ], + "properties": { + "get_account_status": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_financial_assessment/send.json b/config/v3/get_financial_assessment/send.json index 39b93237..03094db5 100644 --- a/config/v3/get_financial_assessment/send.json +++ b/config/v3/get_financial_assessment/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Financial Assessment (request)", - "description": "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.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["get_financial_assessment"], - "properties": { - "get_financial_assessment": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Financial Assessment (request)", + "description": "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.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "get_financial_assessment" + ], + "properties": { + "get_financial_assessment": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_limits/receive.json b/config/v3/get_limits/receive.json index 4c9c0ab0..9e1220af 100644 --- a/config/v3/get_limits/receive.json +++ b/config/v3/get_limits/receive.json @@ -37,6 +37,58 @@ "description": "Lifetime withdrawal limit", "type": "number" }, + "lifetime_transfers": { + "description": "Lifetime transfer limits. Only present when applicable to the current accout.", + "type": "object", + "additionalProperties": false, + "properties": { + "crypto_to_crypto": { + "description": "Lifetime transfer limit for crypto to crypto currencies.", + "type": "object", + "additionalProperties": false, + "properties": { + "allowed": { + "description": "Total limit in client's currency.", + "type": "number" + }, + "available": { + "description": "Remaining limit in client's currency.", + "type": "number" + } + } + }, + "crypto_to_fiat": { + "description": "Lifetime transfer limit for crypto to fiat currencies.", + "type": "object", + "additionalProperties": false, + "properties": { + "allowed": { + "description": "Total limit in client's currency.", + "type": "number" + }, + "available": { + "description": "Remaining limit in client's currency.", + "type": "number" + } + } + }, + "fiat_to_crypto": { + "description": "Lifetime transfer limit for fiat to crypto currencies.", + "type": "object", + "additionalProperties": false, + "properties": { + "allowed": { + "description": "Total limit in client's currency.", + "type": "number" + }, + "available": { + "description": "Remaining limit in client's currency.", + "type": "number" + } + } + } + } + }, "market_specific": { "description": "Contains limitation information for each market.", "type": "object", diff --git a/config/v3/get_limits/send.json b/config/v3/get_limits/send.json index 6fd7333b..57e3abd7 100644 --- a/config/v3/get_limits/send.json +++ b/config/v3/get_limits/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Account Limits (request)", - "description": "Trading and Withdrawal Limits for a given user", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["get_limits"], - "properties": { - "get_limits": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account Limits (request)", + "description": "Trading and Withdrawal Limits for a given user", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "get_limits" + ], + "properties": { + "get_limits": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_self_exclusion/send.json b/config/v3/get_self_exclusion/send.json index c9051007..6f6ab05f 100644 --- a/config/v3/get_self_exclusion/send.json +++ b/config/v3/get_self_exclusion/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Self-Exclusion (request)", - "description": "Allows users to exclude themselves from the website for certain periods of time, or to set limits on their trading activities. This facility is a regulatory requirement for certain Landing Companies.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["get_self_exclusion"], - "properties": { - "get_self_exclusion": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Self-Exclusion (request)", + "description": "Allows users to exclude themselves from the website for certain periods of time, or to set limits on their trading activities. This facility is a regulatory requirement for certain Landing Companies.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "get_self_exclusion" + ], + "properties": { + "get_self_exclusion": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_settings/send.json b/config/v3/get_settings/send.json index 56fc39a9..91136977 100644 --- a/config/v3/get_settings/send.json +++ b/config/v3/get_settings/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Account Settings (request)", - "description": "Get User Settings (email, date of birth, address etc)", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["get_settings"], - "properties": { - "get_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Account Settings (request)", + "description": "Get User Settings (email, date of birth, address etc)", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "get_settings" + ], + "properties": { + "get_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/identity_verification_document_add/send.json b/config/v3/identity_verification_document_add/send.json index 75ac374e..1ab53fa9 100644 --- a/config/v3/identity_verification_document_add/send.json +++ b/config/v3/identity_verification_document_add/send.json @@ -1,52 +1,56 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Identity Verification Add Document (request)", - "description": "Adds document information such as issuing country, id and type for identity verification processes.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "identity_verification_document_add", - "document_number", - "document_type", - "issuing_country" - ], - "properties": { - "identity_verification_document_add": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "document_additional": { - "description": "[Optional] Additional info required by some document types.", - "type": "string" - }, - "document_number": { - "description": "The identification number of the document.", - "type": "string" - }, - "document_type": { - "description": "The type of the document based on provided `issuing_country` (can obtained from `residence_list` call).", - "type": "string" - }, - "issuing_country": { - "description": "2-letter country code (can obtained from `residence_list` call).", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Identity Verification Add Document (request)", + "description": "Adds document information such as issuing country, id and type for identity verification processes.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "identity_verification_document_add", + "document_number", + "document_type", + "issuing_country" + ], + "properties": { + "identity_verification_document_add": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "document_additional": { + "description": "[Optional] Additional info required by some document types.", + "type": "string" + }, + "document_number": { + "description": "The identification number of the document.", + "type": "string" + }, + "document_type": { + "description": "The type of the document based on provided `issuing_country` (can obtained from `residence_list` call).", + "type": "string" + }, + "issuing_country": { + "description": "2-letter country code (can obtained from `residence_list` call).", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/kyc_auth_status/send.json b/config/v3/kyc_auth_status/send.json index a11f7d6c..1cb0e521 100644 --- a/config/v3/kyc_auth_status/send.json +++ b/config/v3/kyc_auth_status/send.json @@ -1,52 +1,58 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "KYC Authentication Status (request)", - "description": "Get KYC Authentication Status", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["kyc_auth_status"], - "properties": { - "kyc_auth_status": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "landing_companies": { - "description": "Indicates which landing companies to get the KYC authentication status for.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "labuan", - "champion", - "champion-virtual", - "samoa", - "samoa-virtual", - "bvi", - "dsl" - ] - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "KYC Authentication Status (request)", + "description": "Get KYC Authentication Status", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "kyc_auth_status" + ], + "properties": { + "kyc_auth_status": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "landing_companies": { + "description": "Indicates which landing companies to get the KYC authentication status for.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "labuan", + "champion", + "champion-virtual", + "samoa", + "samoa-virtual", + "bvi", + "dsl" + ] + } + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/landing_company/receive.json b/config/v3/landing_company/receive.json index 11075a37..23090582 100644 --- a/config/v3/landing_company/receive.json +++ b/config/v3/landing_company/receive.json @@ -1,1426 +1,1752 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Landing Company (response)", - "description": "Returns the Landing Company for clients of a given country.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "landing_company": { - "title": "landing_company", - "description": "Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "address_parseable": { - "description": "Flag to indicate if address parseable or not", - "type": "integer", - "enum": [1, 0] - }, - "all_company": { - "description": "Config for all account types (Synthetic Indices and Financials).", - "type": "string", - "enum": ["svg", "none"] - }, - "config": { - "description": "Config structure with document types ,taxRequired ,tin format details.", - "type": "object" - }, - "ctrader": { - "description": "Available CTrader accounts.", - "type": "object", - "additionalProperties": false, - "properties": { - "all": { - "description": "CTrader all account types (Synthetic Indices and Financials).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "For standard client", - "type": "string", - "enum": ["svg", "none"], - "additionalProperties": false - } - } - } - } - }, - "derivez": { - "description": "Available DerivEZ accounts.", - "type": "object", - "additionalProperties": false, - "properties": { - "all": { - "description": "DerivEZ all account types (Synthetic Indices and Financials).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "For standard client", - "type": "string", - "enum": ["svg", "none"], - "additionalProperties": false - } - } - } - } - }, - "dxtrade_all_company": { - "description": "Available Deriv X all account types (Synthetic Indices and Financials).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "Landing Company details.", - "type": "object", - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Landing Company (response)", + "description": "Returns the Landing Company for clients of a given country.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "landing_company": { + "title": "landing_company", + "description": "Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "address_parseable": { + "description": "Flag to indicate if address parseable or not", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "all_company": { + "description": "Config for all account types (Synthetic Indices and Financials).", + "type": "string", + "enum": [ + "svg", + "none" + ] + }, + "config": { + "description": "Config structure with document types ,taxRequired ,tin format details.", + "type": "object" + }, + "ctrader": { + "description": "Available CTrader accounts.", + "type": "object", + "additionalProperties": false, + "properties": { + "all": { + "description": "CTrader all account types (Synthetic Indices and Financials).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "For standard client", + "type": "string", + "enum": [ + "svg", + "none" + ], + "additionalProperties": false + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "dxtrade_financial_company": { - "description": "Available Deriv X financial account types (all except Synthetic Indices).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "Landing Company details.", - "type": "object", - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } + "derivez": { + "description": "Available DerivEZ accounts.", + "type": "object", + "additionalProperties": false, + "properties": { + "all": { + "description": "DerivEZ all account types (Synthetic Indices and Financials).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "For standard client", + "type": "string", + "enum": [ + "svg", + "none" + ], + "additionalProperties": false + } + } } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } - } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "dxtrade_gaming_company": { - "description": "Available Deriv X derived account types (Synthetic Indices).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "Landing Company details.", - "type": "object", - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "dxtrade_all_company": { + "description": "Available Deriv X all account types (Synthetic Indices and Financials).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "Landing Company details.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "financial_company": { - "description": "Landing Company for financial contracts (all except Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [1, 0] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowed account currencies for this Landing Company", - "type": "array", - "items": { - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - } - }, - "legal_allowed_markets": { - "description": "Allowed markets for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } - } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } - } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - }, - "forbidden_postcode_pattern": { - "description": "Forbidden postcode pattern", - "type": "string" - }, - "gaming_company": { - "description": "Landing Company for derived contracts (Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } + "dxtrade_financial_company": { + "description": "Available Deriv X financial account types (all except Synthetic Indices).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "Landing Company details.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } } - } }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "dxtrade_gaming_company": { + "description": "Available Deriv X derived account types (Synthetic Indices).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "Landing Company details.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } - } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - }, - "id": { - "description": "Country code", - "type": "string" - }, - "is_idv_supported": { - "description": "Flag to indicate if idv is supported or not", - "type": "integer", - "enum": [1, 0] - }, - "lc_to_open_mf_account": { - "description": "Open mf account lc details.", - "type": "string" - }, - "minimum_age": { - "description": "Minimum age", - "type": "integer" - }, - "mt5_age_verification": { - "description": "Flag to indicate if mt5 age verification detail.", - "type": "integer", - "enum": [1, 0] - }, - "mt_all_company": { - "description": "Landing Company for MT5 standard combined all Synthetic and financial, currently has Financial as subtype.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "swap_free": { - "description": "Landing Company for MT5 combined all Synthetic and financial", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } + "financial_company": { + "description": "Landing Company for financial contracts (all except Synthetic Indices)", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "mt_financial_company": { - "description": "Landing Company for MT5 financial contracts (all except Synthetic Indices), currently divided into Financial STP, Financial (standard) as subtypes.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "financial": { - "description": "Contain details for landing company for financial subtype. The Financial account is suitable for a wide range of traders, both new and experienced. It gives you mid-range leverage and variable spreads that give you a great deal of flexibility for whatever position you wish to take in the market.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types for this Landing Company", - "type": "array", - "items": { + "forbidden_postcode_pattern": { + "description": "Forbidden postcode pattern", "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowed account currencies for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowed markets for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } + "gaming_company": { + "description": "Landing Company for derived contracts (Synthetic Indices)", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - }, - "financial_stp": { - "description": "Contain details for landing company for Financial STP subtype. The Financial STP account provides you with tight spreads, higher ticket size and offers a variety of FX pairs from majors to exotics. It is a straight through processing (STP) account with direct access to FX liquidity from various providers.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types for this Landing Company", - "type": "array", - "items": { + "id": { + "description": "Country code", "type": "string" - } }, - "legal_allowed_currencies": { - "description": "Allowed account currencies for this Landing Company", - "type": "array", - "items": { - "type": "string" - } + "is_idv_supported": { + "description": "Flag to indicate if idv is supported or not", + "type": "integer", + "enum": [ + 1, + 0 + ] }, - "legal_allowed_markets": { - "description": "Allowed markets for this Landing Company", - "type": "array", - "items": { + "lc_to_open_mf_account": { + "description": "Open mf account lc details.", "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } + "minimum_age": { + "description": "Minimum age", + "type": "integer" + }, + "mt5_age_verification": { + "description": "Flag to indicate if mt5 age verification detail.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "mt_all_company": { + "description": "Landing Company for MT5 standard combined all Synthetic and financial, currently has Financial as subtype.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "swap_free": { + "description": "Landing Company for MT5 combined all Synthetic and financial", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } - } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "mt_gaming_company": { - "description": "Landing Company for MT5 standard derived contracts (Synthetic Indices), currently has Financial as subtype.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "financial": { - "description": "Landing Company for MT5 derived contracts (Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } + "mt_financial_company": { + "description": "Landing Company for MT5 financial contracts (all except Synthetic Indices), currently divided into Financial STP, Financial (standard) as subtypes.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "financial": { + "description": "Contain details for landing company for financial subtype. The Financial account is suitable for a wide range of traders, both new and experienced. It gives you mid-range leverage and variable spreads that give you a great deal of flexibility for whatever position you wish to take in the market.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "financial_stp": { + "description": "Contain details for landing company for Financial STP subtype. The Financial STP account provides you with tight spreads, higher ticket size and offers a variety of FX pairs from majors to exotics. It is a straight through processing (STP) account with direct access to FX liquidity from various providers.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" + "mt_gaming_company": { + "description": "Landing Company for MT5 standard derived contracts (Synthetic Indices), currently has Financial as subtype.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "financial": { + "description": "Landing Company for MT5 derived contracts (Synthetic Indices)", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } + } }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] + "name": { + "description": "Country name", + "type": "string" }, - "tin_not_mandatory": { - "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", - "type": "integer", - "enum": [0, 1] + "need_set_max_turnover_limit": { + "description": "Flag to indicate whether max turnover limit settings.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "no_province": { + "description": "Flag to indicate province settings.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_address_postcode": { + "description": "Flag to indicate whether address postcode is required or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_age_verified_for_synthetic": { + "description": "Flag to indicate whether age verification required ofr synthetic or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_poi": { + "description": "Flag to indicate whether poi is required.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_verification_when_not_age_verified": { + "description": "Flag to indicate whether verification required if age not verified.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "skip_deposit_verification": { + "description": "Flag to indicate whether to skip deposit verifcation or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "ukgc_funds_protection": { + "description": "Flag to indicate ukgc funds protection setting.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "virtual_company": { + "description": "Virtual Company", + "type": "string" } - } } - } - }, - "name": { - "description": "Country name", - "type": "string" - }, - "need_set_max_turnover_limit": { - "description": "Flag to indicate whether max turnover limit settings.", - "type": "integer", - "enum": [0, 1] - }, - "no_province": { - "description": "Flag to indicate province settings.", - "type": "integer", - "enum": [0, 1] - }, - "require_address_postcode": { - "description": "Flag to indicate whether address postcode is required or not.", - "type": "integer", - "enum": [0, 1] - }, - "require_age_verified_for_synthetic": { - "description": "Flag to indicate whether age verification required ofr synthetic or not.", - "type": "integer", - "enum": [0, 1] - }, - "require_poi": { - "description": "Flag to indicate whether poi is required.", - "type": "integer", - "enum": [0, 1] - }, - "require_verification_when_not_age_verified": { - "description": "Flag to indicate whether verification required if age not verified.", - "type": "integer", - "enum": [0, 1] }, - "skip_deposit_verification": { - "description": "Flag to indicate whether to skip deposit verifcation or not.", - "type": "integer", - "enum": [0, 1] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "ukgc_funds_protection": { - "description": "Flag to indicate ukgc funds protection setting.", - "type": "integer", - "enum": [0, 1] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "landing_company" + ] }, - "virtual_company": { - "description": "Virtual Company", - "type": "string" + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["landing_company"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/landing_company/send.json b/config/v3/landing_company/send.json index c5e86261..d24e6bbc 100644 --- a/config/v3/landing_company/send.json +++ b/config/v3/landing_company/send.json @@ -1,25 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Landing Company (request)", - "description": "The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies. This call will return the appropriate Landing Company for clients of a given country. The landing company may differ for derived contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["landing_company"], - "properties": { - "landing_company": { - "title": "Landing Company", - "description": "Client's 2-letter country code (obtained from `residence_list` call).", - "type": "string", - "pattern": "^\\w\\w$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Landing Company (request)", + "description": "The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies. This call will return the appropriate Landing Company for clients of a given country. The landing company may differ for derived contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "landing_company" + ], + "properties": { + "landing_company": { + "title": "Landing Company", + "description": "Client's 2-letter country code (obtained from `residence_list` call).", + "type": "string", + "pattern": "^\\w\\w$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/landing_company_details/send.json b/config/v3/landing_company_details/send.json index 49b4cc89..6c52516b 100644 --- a/config/v3/landing_company_details/send.json +++ b/config/v3/landing_company_details/send.json @@ -1,42 +1,44 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Landing Company Details (request)", - "description": "The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies (and which are wholly owned subsidiaries of the Deriv Group). This call provides information about each Landing Company.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["landing_company_details"], - "properties": { - "landing_company_details": { - "description": "Landing company shortcode.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual", - "samoa", - "samoa-virtual", - "dsl", - "bvi", - "labuan" - ] - }, - "country": { - "description": "[Optional] Will return an extra field `tin_not_mandatory` indicating if the landing company does not require tax identification number for the provided country.", - "type": "string" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Landing Company Details (request)", + "description": "The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies (and which are wholly owned subsidiaries of the Deriv Group). This call provides information about each Landing Company.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "landing_company_details" + ], + "properties": { + "landing_company_details": { + "description": "Landing company shortcode.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual", + "samoa", + "samoa-virtual", + "dsl", + "bvi", + "labuan" + ] + }, + "country": { + "description": "[Optional] Will return an extra field `tin_not_mandatory` indicating if the landing company does not require tax identification number for the provided country.", + "type": "string" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/login_history/send.json b/config/v3/login_history/send.json index 22e02bd8..23e9fb54 100644 --- a/config/v3/login_history/send.json +++ b/config/v3/login_history/send.json @@ -1,37 +1,43 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Login History (request)", - "description": "Retrieve a summary of login history for user.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["login_history"], - "properties": { - "login_history": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "limit": { - "description": "[Optional] Apply limit to count of login history records.", - "type": "integer", - "default": 10, - "maximum": 50, - "minimum": 0 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Login History (request)", + "description": "Retrieve a summary of login history for user.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "login_history" + ], + "properties": { + "login_history": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "limit": { + "description": "[Optional] Apply limit to count of login history records.", + "type": "integer", + "default": 10, + "maximum": 50, + "minimum": 0 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/logout/send.json b/config/v3/logout/send.json index 96739729..b8330c83 100644 --- a/config/v3/logout/send.json +++ b/config/v3/logout/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Log Out (request)", - "description": "Logout the session", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["logout"], - "properties": { - "logout": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Log Out (request)", + "description": "Logout the session", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "logout" + ], + "properties": { + "logout": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_deposit/send.json b/config/v3/mt5_deposit/send.json index cb5847ae..3ce80faf 100644 --- a/config/v3/mt5_deposit/send.json +++ b/config/v3/mt5_deposit/send.json @@ -1,39 +1,51 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Deposit (request)", - "description": "This call allows deposit into MT5 account from Binary account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["mt5_deposit", "to_mt5"], - "properties": { - "mt5_deposit": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "Amount to deposit (in the currency of from_binary); min = $1 or an equivalent amount, max = $20000 or an equivalent amount", - "type": "number" - }, - "from_binary": { - "description": "Binary account loginid to transfer money from", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "to_mt5": { - "description": "MT5 account login to deposit money to", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Deposit (request)", + "description": "This call allows deposit into MT5 account from Binary account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "mt5_deposit", + "to_mt5" + ], + "properties": { + "mt5_deposit": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "Amount to deposit (in the currency of from_binary); min = $1 or an equivalent amount, max = $20000 or an equivalent amount", + "type": "number" + }, + "from_binary": { + "description": "Binary account loginid to transfer money from", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "to_mt5": { + "description": "MT5 account login to deposit money to", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_get_settings/send.json b/config/v3/mt5_get_settings/send.json index 401baa61..182629d3 100644 --- a/config/v3/mt5_get_settings/send.json +++ b/config/v3/mt5_get_settings/send.json @@ -1,30 +1,42 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Get Setting (request)", - "description": "Get MT5 user account settings", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["mt5_get_settings", "login"], - "properties": { - "mt5_get_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "login": { - "description": "MT5 user login", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Get Setting (request)", + "description": "Get MT5 user account settings", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "mt5_get_settings", + "login" + ], + "properties": { + "mt5_get_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "login": { + "description": "MT5 user login", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_login_list/send.json b/config/v3/mt5_login_list/send.json index 6a67a570..748f7657 100644 --- a/config/v3/mt5_login_list/send.json +++ b/config/v3/mt5_login_list/send.json @@ -1,25 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Accounts List (request)", - "description": "Get list of MT5 accounts for client", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["mt5_login_list"], - "properties": { - "mt5_login_list": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Accounts List (request)", + "description": "Get list of MT5 accounts for client", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "mt5_login_list" + ], + "properties": { + "mt5_login_list": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_new_account/send.json b/config/v3/mt5_new_account/send.json index 55028722..df6c6697 100644 --- a/config/v3/mt5_new_account/send.json +++ b/config/v3/mt5_new_account/send.json @@ -1,134 +1,179 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: New Account (request)", - "description": "This call creates new MT5 user, either demo or real money user.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["mt5_new_account", "account_type", "email", "leverage", "mainPassword", "name"], - "properties": { - "mt5_new_account": { - "description": "Must be `1`", - "type": "integer", - "enum": [1], - "sensitive": 1 - }, - "account_type": { - "description": "Account type. If set to 'financial', setting 'mt5_account_type' is also required.", - "type": "string", - "enum": ["demo", "gaming", "financial", "all"] - }, - "address": { - "description": "[Optional] The address of the user. The maximum length of this address field is 128 characters.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'.,:;()\\x{b0}@#/-]{0,128}$" - }, - "city": { - "description": "[Optional] User's city of residence.", - "type": "string", - "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" - }, - "company": { - "description": "[Optional] Name of the client's company. The maximum length of the company name is 64 characters.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,@/-]{0,64}$" - }, - "country": { - "description": "[Optional] 2-letter country code (value received from `residence_list` call).", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "currency": { - "description": "[Optional] MT5 account currency, the default value will be the qualified account currency.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$" - }, - "dry_run": { - "description": "[Optional] If set to 1, only validation is performed.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "email": { - "description": "Email address", - "type": "string", - "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" - }, - "investPassword": { - "description": "[Optional] The investor password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "leverage": { - "description": "Client leverage (from 1 to 1000).", - "type": "number" - }, - "mainPassword": { - "description": "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.", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "migrate": { - "description": "[Optional] Indicates whether the user would like to migrate his account to other jurisdiction.", - "type": "boolean" - }, - "mt5_account_category": { - "description": "[Optional] To choose whether account is conventional or swap_free. Unavailable for financial_stp MT5_account_type", - "type": "string", - "enum": ["conventional", "swap_free"] - }, - "mt5_account_type": { - "description": "[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.", - "type": "string", - "enum": ["financial", "financial_stp"] - }, - "name": { - "description": "Client's name. The maximum length here is 101 characters.", - "type": "string", - "maxLength": 101, - "minLength": 1 - }, - "phone": { - "description": "[Optional] User's phone number.", - "type": ["null", "string"], - "sensitive": 1 - }, - "phonePassword": { - "description": "[Optional] The user's phone password.", - "type": "string", - "maxLength": 50, - "sensitive": 1 - }, - "server": { - "description": "[Optional] Trade server.", - "type": ["null", "string"], - "enum": ["p01_ts01", "p01_ts02", "p01_ts03", "p01_ts04", "p02_ts02"] - }, - "state": { - "description": "[Optional] User's state (region) of residence.", - "type": "string", - "pattern": "^.{0,50}$" - }, - "sub_account_category": { - "description": "[Optional] Indicate the sub account category that we have in the cfd group naming convention.", - "type": "string", - "enum": ["swap_free", "swap_free_high_risk"] - }, - "zipCode": { - "description": "[Optional] User's zip code.", - "type": "string", - "maxLength": 50 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: New Account (request)", + "description": "This call creates new MT5 user, either demo or real money user.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "mt5_new_account", + "account_type", + "email", + "leverage", + "mainPassword", + "name" + ], + "properties": { + "mt5_new_account": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ], + "sensitive": 1 + }, + "account_type": { + "description": "Account type. If set to 'financial', setting 'mt5_account_type' is also required.", + "type": "string", + "enum": [ + "demo", + "gaming", + "financial", + "all" + ] + }, + "address": { + "description": "[Optional] The address of the user. The maximum length of this address field is 128 characters.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'.,:;()\\x{b0}@#/-]{0,128}$" + }, + "city": { + "description": "[Optional] User's city of residence.", + "type": "string", + "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" + }, + "company": { + "description": "[Optional] Name of the client's company. The maximum length of the company name is 64 characters.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,@/-]{0,64}$" + }, + "country": { + "description": "[Optional] 2-letter country code (value received from `residence_list` call).", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "currency": { + "description": "[Optional] MT5 account currency, the default value will be the qualified account currency.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$" + }, + "dry_run": { + "description": "[Optional] If set to 1, only validation is performed.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "email": { + "description": "Email address", + "type": "string", + "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" + }, + "investPassword": { + "description": "[Optional] The investor password of the account. For validation (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "leverage": { + "description": "Client leverage (from 1 to 1000).", + "type": "number" + }, + "mainPassword": { + "description": "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.", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "migrate": { + "description": "[Optional] Indicates whether the user would like to migrate his account to other jurisdiction.", + "type": "boolean" + }, + "mt5_account_category": { + "description": "[Optional] To choose whether account is conventional or swap_free. Unavailable for financial_stp MT5_account_type", + "type": "string", + "enum": [ + "conventional", + "swap_free" + ] + }, + "mt5_account_type": { + "description": "[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.", + "type": "string", + "enum": [ + "financial", + "financial_stp" + ] + }, + "name": { + "description": "Client's name. The maximum length here is 101 characters.", + "type": "string", + "maxLength": 101, + "minLength": 1 + }, + "phone": { + "description": "[Optional] User's phone number.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "phonePassword": { + "description": "[Optional] The user's phone password.", + "type": "string", + "maxLength": 50, + "sensitive": 1 + }, + "server": { + "description": "[Optional] Trade server.", + "type": [ + "null", + "string" + ], + "enum": [ + "p01_ts01", + "p01_ts02", + "p01_ts03", + "p01_ts04", + "p02_ts02" + ] + }, + "state": { + "description": "[Optional] User's state (region) of residence.", + "type": "string", + "pattern": "^.{0,50}$" + }, + "sub_account_category": { + "description": "[Optional] Indicate the sub account category that we have in the cfd group naming convention.", + "type": "string", + "enum": [ + "swap_free", + "swap_free_high_risk" + ] + }, + "zipCode": { + "description": "[Optional] User's zip code.", + "type": "string", + "maxLength": 50 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_change/send.json b/config/v3/mt5_password_change/send.json index 1604dfc8..0ef4f5d8 100644 --- a/config/v3/mt5_password_change/send.json +++ b/config/v3/mt5_password_change/send.json @@ -1,48 +1,65 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Change (request)", - "description": "To change passwords of the MT5 account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["mt5_password_change", "login", "new_password", "old_password"], - "properties": { - "mt5_password_change": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "login": { - "description": "MT5 user login", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "new_password": { - "description": "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).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "old_password": { - "description": "Old password for validation (non-empty string, accepts any printable ASCII character)", - "type": "string", - "pattern": "^[ -~]+$", - "sensitive": 1 - }, - "password_type": { - "description": "[Optional] Type of the password to change.", - "type": "string", - "default": "main", - "enum": ["main", "investor"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Change (request)", + "description": "To change passwords of the MT5 account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "mt5_password_change", + "login", + "new_password", + "old_password" + ], + "properties": { + "mt5_password_change": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "login": { + "description": "MT5 user login", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "new_password": { + "description": "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).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "old_password": { + "description": "Old password for validation (non-empty string, accepts any printable ASCII character)", + "type": "string", + "pattern": "^[ -~]+$", + "sensitive": 1 + }, + "password_type": { + "description": "[Optional] Type of the password to change.", + "type": "string", + "default": "main", + "enum": [ + "main", + "investor" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_check/send.json b/config/v3/mt5_password_check/send.json index ec232328..47ae247a 100644 --- a/config/v3/mt5_password_check/send.json +++ b/config/v3/mt5_password_check/send.json @@ -1,42 +1,58 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Check (request)", - "description": "This call validates the main password for the MT5 user", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["mt5_password_check", "login", "password"], - "properties": { - "mt5_password_check": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "login": { - "description": "MT5 user login", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "password": { - "description": "The password of the account.", - "type": "string", - "pattern": "^[ -~]+$", - "sensitive": 1 - }, - "password_type": { - "description": "[Optional] Type of the password to check.", - "type": "string", - "default": "main", - "enum": ["main", "investor"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Check (request)", + "description": "This call validates the main password for the MT5 user", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "mt5_password_check", + "login", + "password" + ], + "properties": { + "mt5_password_check": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "login": { + "description": "MT5 user login", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "password": { + "description": "The password of the account.", + "type": "string", + "pattern": "^[ -~]+$", + "sensitive": 1 + }, + "password_type": { + "description": "[Optional] Type of the password to check.", + "type": "string", + "default": "main", + "enum": [ + "main", + "investor" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_reset/send.json b/config/v3/mt5_password_reset/send.json index 687c4c7a..3635d603 100644 --- a/config/v3/mt5_password_reset/send.json +++ b/config/v3/mt5_password_reset/send.json @@ -1,47 +1,64 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Reset (request)", - "description": "To reset the password of MT5 account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["mt5_password_reset", "login", "new_password", "verification_code"], - "properties": { - "mt5_password_reset": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "login": { - "description": "MT5 user login", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "new_password": { - "description": "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).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "password_type": { - "description": "[Optional] Type of the password to reset.", - "type": "string", - "default": "main", - "enum": ["main", "investor"] - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first)", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Reset (request)", + "description": "To reset the password of MT5 account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "mt5_password_reset", + "login", + "new_password", + "verification_code" + ], + "properties": { + "mt5_password_reset": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "login": { + "description": "MT5 user login", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "new_password": { + "description": "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).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "password_type": { + "description": "[Optional] Type of the password to reset.", + "type": "string", + "default": "main", + "enum": [ + "main", + "investor" + ] + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first)", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_withdrawal/send.json b/config/v3/mt5_withdrawal/send.json index 8afe8ad1..dc6294eb 100644 --- a/config/v3/mt5_withdrawal/send.json +++ b/config/v3/mt5_withdrawal/send.json @@ -1,39 +1,53 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Withdrawal (request)", - "description": "This call allows withdrawal from MT5 account to Binary account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["mt5_withdrawal", "amount", "from_mt5", "to_binary"], - "properties": { - "mt5_withdrawal": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "Amount to withdraw (in the currency of the MT5 account); min = $1 or an equivalent amount, max = $20000 or an equivalent amount.", - "type": "number" - }, - "from_mt5": { - "description": "MT5 account login to withdraw money from", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "to_binary": { - "description": "Binary account loginid to transfer money to", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Withdrawal (request)", + "description": "This call allows withdrawal from MT5 account to Binary account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "mt5_withdrawal", + "amount", + "from_mt5", + "to_binary" + ], + "properties": { + "mt5_withdrawal": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "Amount to withdraw (in the currency of the MT5 account); min = $1 or an equivalent amount, max = $20000 or an equivalent amount.", + "type": "number" + }, + "from_mt5": { + "description": "MT5 account login to withdraw money from", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "to_binary": { + "description": "Binary account loginid to transfer money to", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_maltainvest/send.json b/config/v3/new_account_maltainvest/send.json index f6cc27f1..5bd0a522 100644 --- a/config/v3/new_account_maltainvest/send.json +++ b/config/v3/new_account_maltainvest/send.json @@ -1,369 +1,414 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Real-Money Account: Deriv Investment (Europe) Ltd (request)", - "description": "This call opens a new real-money account with the `maltainvest` Landing Company. This call can be made from a virtual-money account or real-money account at Deriv (Europe) Limited. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "new_account_maltainvest", - "address_city", - "address_line_1", - "date_of_birth", - "employment_status", - "first_name", - "last_name", - "residence", - "salutation", - "tax_identification_number", - "tax_residence" - ], - "properties": { - "new_account_maltainvest": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "accept_risk": { - "description": "Show whether client has accepted risk disclaimer.", - "type": "integer", - "enum": [0, 1] - }, - "account_opening_reason": { - "description": "[Optional] Purpose and reason for requesting the account opening.", - "type": "string", - "enum": ["Speculative", "Income Earning", "Hedging"] - }, - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "address_city": { - "description": "Within 100 characters", - "type": "string", - "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" - }, - "address_line_1": { - "description": "Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,69}$" - }, - "address_line_2": { - "description": "[Optional] Within 70 characters.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" - }, - "address_postcode": { - "description": "[Optional] Within 20 characters and may not contain '+'.", - "type": "string", - "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" - }, - "address_state": { - "description": "[Optional] Possible value receive from `states_list` call.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,-]{0,100}$" - }, - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "cfd_experience": { - "description": "How much experience do you have in CFD trading?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] - }, - "cfd_frequency": { - "description": "How many CFD trades have you placed in the past 12 months?", - "type": "string", - "enum": [ - "No transactions in the past 12 months", - "1 - 5 transactions in the past 12 months", - "6 - 10 transactions in the past 12 months", - "11 - 39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "cfd_trading_definition": { - "description": "In your understanding, CFD trading allows you to:", - "type": "string", - "enum": [ - "Purchase shares of a company or physical commodities.", - "Place a bet on the price movement.", - "Speculate on the price movement.", - "Make a long-term investment." - ] - }, - "citizen": { - "description": "[Optional] Country of legal citizenship, 2-letter country code. Possible value receive from `residence_list` call.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "client_type": { - "description": "[Optional] Indicates whether this is for a client requesting an account with professional status.", - "type": "string", - "default": "retail", - "enum": ["professional", "retail"] - }, - "currency": { - "description": "[Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_of_birth": { - "description": "Date of birth format: yyyy-mm-dd.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" - }, - "education_level": { - "description": "Level of Education", - "type": "string", - "enum": ["Primary", "Secondary", "Tertiary"] - }, - "employment_industry": { - "description": "Industry of Employment.", - "type": "string", - "enum": [ - "Construction", - "Education", - "Finance", - "Health", - "Tourism", - "Information & Communications Technology", - "Science & Engineering", - "Legal", - "Social & Cultural", - "Agriculture", - "Real Estate", - "Food Services", - "Manufacturing", - "Unemployed" - ] - }, - "employment_status": { - "description": "Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "estimated_worth": { - "description": "Estimated Net Worth.", - "type": "string", - "enum": [ - "Less than $100,000", - "$100,000 - $250,000", - "$250,001 - $500,000", - "$500,001 - $1,000,000", - "Over $1,000,000" - ] - }, - "first_name": { - "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "income_source": { - "description": "Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] - }, - "last_name": { - "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "leverage_impact_trading": { - "description": "How does leverage affect CFD trading?", - "type": "string", - "enum": [ - "Leverage is a risk mitigation technique.", - "Leverage prevents you from opening large positions.", - "Leverage guarantees profits.", - "Leverage lets you open larger positions for a fraction of the trade's value." - ] - }, - "leverage_trading_high_risk_stop_loss": { - "description": "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", - "type": "string", - "enum": [ - "Cancel your trade at any time within a chosen timeframe.", - "Close your trade automatically when the loss is more than or equal to a specific amount.", - "Close your trade automatically when the profit is more than or equal to a specific amount.", - "Make a guaranteed profit on your trade." - ] - }, - "net_income": { - "description": "Net Annual Income.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "non_pep_declaration": { - "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA.", - "type": "integer", - "maximum": 1, - "minimum": 0 - }, - "occupation": { - "description": "Occupation.", - "type": "string", - "enum": [ - "Chief Executives, Senior Officials and Legislators", - "Managers", - "Professionals", - "Clerks", - "Personal Care, Sales and Service Workers", - "Agricultural, Forestry and Fishery Workers", - "Craft, Metal, Electrical and Electronics Workers", - "Plant and Machine Operators and Assemblers", - "Cleaners and Helpers", - "Mining, Construction, Manufacturing and Transport Workers", - "Armed Forces", - "Government Officers", - "Students", - "Unemployed" - ] - }, - "phone": { - "description": "[Optional] Starting with `+` followed by 9-35 digits, hyphens or space.", - "type": ["null", "string"], - "sensitive": 1 - }, - "place_of_birth": { - "description": "[Optional] Place of birth, 2-letter country code.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "required_initial_margin": { - "description": "When would you be required to pay an initial margin?", - "type": "string", - "enum": [ - "When opening a Leveraged CFD trade.", - "When trading Multipliers.", - "When buying shares of a company.", - "All of the above." - ] - }, - "residence": { - "description": "2-letter country code, possible value receive from `residence_list` call.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "risk_tolerance": { - "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", - "type": "string", - "enum": ["Yes", "No"] - }, - "salutation": { - "description": "Accept any value in enum list.", - "type": "string", - "enum": ["Mr", "Ms", "Miss", "Mrs"] - }, - "secret_answer": { - "description": "[Optional] Answer to secret question, within 4-50 characters.", - "type": "string", - "pattern": "^[\\w\\-\\,\\.\\' ]+", - "maxLength": 50, - "minLength": 4, - "sensitive": 1 - }, - "secret_question": { - "description": "[Optional] Accept any value in enum list.", - "type": "string", - "enum": [ - "Mother's maiden name", - "Name of your pet", - "Name of first love", - "Memorable town/city", - "Memorable date", - "Favourite dish", - "Brand of first car", - "Favourite artist" - ] - }, - "source_of_experience": { - "description": "How much knowledge and experience do you have in relation to online trading?", - "type": "string", - "enum": [ - "I have an academic degree, professional certification, and/or work experience.", - "I trade forex CFDs and other complex financial instruments.", - "I have attended seminars, training, and/or workshops.", - "I have little experience.", - "I have no knowledge." - ] - }, - "source_of_wealth": { - "description": "[Optional] Source of wealth.", - "type": "string", - "enum": [ - "Accumulation of Income/Savings", - "Cash Business", - "Company Ownership", - "Divorce Settlement", - "Inheritance", - "Investment Income", - "Sale of Property" - ] - }, - "tax_identification_number": { - "description": "Tax identification number. Only applicable for real money account. Required for `maltainvest` landing company.", - "type": "string", - "pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$" - }, - "tax_residence": { - "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for `maltainvest` landing company.", - "type": "string", - "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" - }, - "trading_experience_financial_instruments": { - "description": "How much experience do you have with other financial instruments?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] - }, - "trading_frequency_financial_instruments": { - "description": "How many trades have you placed with other financial instruments in the past 12 months?", - "type": "string", - "enum": [ - "No transactions in the past 12 months", - "1 - 5 transactions in the past 12 months", - "6 - 10 transactions in the past 12 months", - "11 - 39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Real-Money Account: Deriv Investment (Europe) Ltd (request)", + "description": "This call opens a new real-money account with the `maltainvest` Landing Company. This call can be made from a virtual-money account or real-money account at Deriv (Europe) Limited. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "new_account_maltainvest", + "address_city", + "address_line_1", + "date_of_birth", + "employment_status", + "first_name", + "last_name", + "residence", + "salutation", + "tax_identification_number", + "tax_residence" + ], + "properties": { + "new_account_maltainvest": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "accept_risk": { + "description": "Show whether client has accepted risk disclaimer.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "account_opening_reason": { + "description": "[Optional] Purpose and reason for requesting the account opening.", + "type": "string", + "enum": [ + "Speculative", + "Income Earning", + "Hedging" + ] + }, + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "address_city": { + "description": "Within 100 characters", + "type": "string", + "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" + }, + "address_line_1": { + "description": "Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,69}$" + }, + "address_line_2": { + "description": "[Optional] Within 70 characters.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" + }, + "address_postcode": { + "description": "[Optional] Within 20 characters and may not contain '+'.", + "type": "string", + "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" + }, + "address_state": { + "description": "[Optional] Possible value receive from `states_list` call.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,-]{0,100}$" + }, + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "cfd_experience": { + "description": "How much experience do you have in CFD trading?", + "type": "string", + "enum": [ + "No experience", + "Less than a year", + "1 - 2 years", + "Over 3 years" + ] + }, + "cfd_frequency": { + "description": "How many CFD trades have you placed in the past 12 months?", + "type": "string", + "enum": [ + "No transactions in the past 12 months", + "1 - 5 transactions in the past 12 months", + "6 - 10 transactions in the past 12 months", + "11 - 39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "cfd_trading_definition": { + "description": "In your understanding, CFD trading allows you to:", + "type": "string", + "enum": [ + "Purchase shares of a company or physical commodities.", + "Place a bet on the price movement.", + "Speculate on the price movement.", + "Make a long-term investment." + ] + }, + "citizen": { + "description": "[Optional] Country of legal citizenship, 2-letter country code. Possible value receive from `residence_list` call.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "client_type": { + "description": "[Optional] Indicates whether this is for a client requesting an account with professional status.", + "type": "string", + "default": "retail", + "enum": [ + "professional", + "retail" + ] + }, + "currency": { + "description": "[Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_of_birth": { + "description": "Date of birth format: yyyy-mm-dd.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" + }, + "education_level": { + "description": "Level of Education", + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "employment_industry": { + "description": "Industry of Employment.", + "type": "string", + "enum": [ + "Construction", + "Education", + "Finance", + "Health", + "Tourism", + "Information & Communications Technology", + "Science & Engineering", + "Legal", + "Social & Cultural", + "Agriculture", + "Real Estate", + "Food Services", + "Manufacturing", + "Unemployed" + ] + }, + "employment_status": { + "description": "Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "estimated_worth": { + "description": "Estimated Net Worth.", + "type": "string", + "enum": [ + "Less than $100,000", + "$100,000 - $250,000", + "$250,001 - $500,000", + "$500,001 - $1,000,000", + "Over $1,000,000" + ] + }, + "first_name": { + "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "income_source": { + "description": "Income Source.", + "type": "string", + "enum": [ + "Salaried Employee", + "Self-Employed", + "Investments & Dividends", + "Pension", + "State Benefits", + "Savings & Inheritance" + ] + }, + "last_name": { + "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "leverage_impact_trading": { + "description": "How does leverage affect CFD trading?", + "type": "string", + "enum": [ + "Leverage is a risk mitigation technique.", + "Leverage prevents you from opening large positions.", + "Leverage guarantees profits.", + "Leverage lets you open larger positions for a fraction of the trade's value." + ] + }, + "leverage_trading_high_risk_stop_loss": { + "description": "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", + "type": "string", + "enum": [ + "Cancel your trade at any time within a chosen timeframe.", + "Close your trade automatically when the loss is more than or equal to a specific amount.", + "Close your trade automatically when the profit is more than or equal to a specific amount.", + "Make a guaranteed profit on your trade." + ] + }, + "net_income": { + "description": "Net Annual Income.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "non_pep_declaration": { + "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA.", + "type": "integer", + "maximum": 1, + "minimum": 0 + }, + "occupation": { + "description": "Occupation.", + "type": "string", + "enum": [ + "Chief Executives, Senior Officials and Legislators", + "Managers", + "Professionals", + "Clerks", + "Personal Care, Sales and Service Workers", + "Agricultural, Forestry and Fishery Workers", + "Craft, Metal, Electrical and Electronics Workers", + "Plant and Machine Operators and Assemblers", + "Cleaners and Helpers", + "Mining, Construction, Manufacturing and Transport Workers", + "Armed Forces", + "Government Officers", + "Students", + "Unemployed" + ] + }, + "phone": { + "description": "[Optional] Starting with `+` followed by 9-35 digits, hyphens or space.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "place_of_birth": { + "description": "[Optional] Place of birth, 2-letter country code.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "required_initial_margin": { + "description": "When would you be required to pay an initial margin?", + "type": "string", + "enum": [ + "When opening a Leveraged CFD trade.", + "When trading Multipliers.", + "When buying shares of a company.", + "All of the above." + ] + }, + "residence": { + "description": "2-letter country code, possible value receive from `residence_list` call.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "risk_tolerance": { + "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", + "type": "string", + "enum": [ + "Yes", + "No" + ] + }, + "salutation": { + "description": "Accept any value in enum list.", + "type": "string", + "enum": [ + "Mr", + "Ms", + "Miss", + "Mrs" + ] + }, + "secret_answer": { + "description": "[Optional] Answer to secret question, within 4-50 characters.", + "type": "string", + "pattern": "^[\\w\\-\\,\\.\\' ]+", + "maxLength": 50, + "minLength": 4, + "sensitive": 1 + }, + "secret_question": { + "description": "[Optional] Accept any value in enum list.", + "type": "string", + "enum": [ + "Mother's maiden name", + "Name of your pet", + "Name of first love", + "Memorable town/city", + "Memorable date", + "Favourite dish", + "Brand of first car", + "Favourite artist" + ] + }, + "source_of_experience": { + "description": "How much knowledge and experience do you have in relation to online trading?", + "type": "string", + "enum": [ + "I have an academic degree, professional certification, and/or work experience.", + "I trade forex CFDs and other complex financial instruments.", + "I have attended seminars, training, and/or workshops.", + "I have little experience.", + "I have no knowledge." + ] + }, + "source_of_wealth": { + "description": "[Optional] Source of wealth.", + "type": "string", + "enum": [ + "Accumulation of Income/Savings", + "Cash Business", + "Company Ownership", + "Divorce Settlement", + "Inheritance", + "Investment Income", + "Sale of Property" + ] + }, + "tax_identification_number": { + "description": "Tax identification number. Only applicable for real money account. Required for `maltainvest` landing company.", + "type": "string", + "pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$" + }, + "tax_residence": { + "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for `maltainvest` landing company.", + "type": "string", + "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" + }, + "trading_experience_financial_instruments": { + "description": "How much experience do you have with other financial instruments?", + "type": "string", + "enum": [ + "No experience", + "Less than a year", + "1 - 2 years", + "Over 3 years" + ] + }, + "trading_frequency_financial_instruments": { + "description": "How many trades have you placed with other financial instruments in the past 12 months?", + "type": "string", + "enum": [ + "No transactions in the past 12 months", + "1 - 5 transactions in the past 12 months", + "6 - 10 transactions in the past 12 months", + "11 - 39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_real/send.json b/config/v3/new_account_real/send.json index 779e2987..7e38ee76 100644 --- a/config/v3/new_account_real/send.json +++ b/config/v3/new_account_real/send.json @@ -1,167 +1,192 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Real-Money Account: Default Landing Company (request)", - "description": "This call opens a new real-money account. This call can be made from a virtual-money or a real-money account. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["new_account_real"], - "properties": { - "new_account_real": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_opening_reason": { - "description": "[Optional] Purpose and reason for requesting the account opening.", - "type": "string", - "enum": ["Speculative", "Income Earning", "Hedging", "Peer-to-peer exchange"] - }, - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "address_city": { - "description": "[Optional] Within 100 characters.", - "type": "string", - "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" - }, - "address_line_1": { - "description": "Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,69}$" - }, - "address_line_2": { - "description": "[Optional] Within 70 characters.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" - }, - "address_postcode": { - "description": "[Optional] Within 20 characters and may not contain '+'.", - "type": "string", - "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" - }, - "address_state": { - "description": "[Optional] Possible value receive from `states_list` call.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,-]{0,100}$" - }, - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "citizen": { - "description": "[Optional] Country of legal citizenship, 2-letter country code.", - "type": ["null", "string"], - "pattern": "^([a-z]{2})?$" - }, - "client_type": { - "description": "[Optional] Indicates whether this is for a client requesting an account with professional status.", - "type": "string", - "default": "retail", - "enum": ["professional", "retail"] - }, - "currency": { - "description": "[Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_of_birth": { - "description": "Date of birth format: `yyyy-mm-dd`.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" - }, - "first_name": { - "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "last_name": { - "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "non_pep_declaration": { - "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates).", - "type": "integer", - "maximum": 1, - "minimum": 0 - }, - "phone": { - "description": "[Optional] Starting with `+` followed by 9-35 digits, hyphens or space.", - "type": ["null", "string"], - "sensitive": 1 - }, - "place_of_birth": { - "description": "[Optional] Place of birth, 2-letter country code.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "residence": { - "description": "2-letter country code, possible value receive from `residence_list` call.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "salutation": { - "description": "[Optional] Accept any value in enum list.", - "type": "string", - "enum": ["Mr", "Ms", "Miss", "Mrs"] - }, - "secret_answer": { - "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client open another account.", - "type": "string", - "pattern": "^[\\w\\-\\,\\.\\' ]+", - "maxLength": 50, - "minLength": 4, - "sensitive": 1 - }, - "secret_question": { - "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client open another account.", - "type": "string", - "enum": [ - "Mother's maiden name", - "Name of your pet", - "Name of first love", - "Memorable town/city", - "Memorable date", - "Favourite dish", - "Brand of first car", - "Favourite artist" - ] - }, - "tax_identification_number": { - "description": "[Optional] Tax identification number. Only applicable for real money account. Required for `maltainvest` landing company.", - "type": "string", - "pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$" - }, - "tax_residence": { - "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for `maltainvest` landing company.", - "type": "string", - "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Real-Money Account: Default Landing Company (request)", + "description": "This call opens a new real-money account. This call can be made from a virtual-money or a real-money account. If it is the latter, client information fields in this call will be ignored and data from your existing real-money account will be used.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "new_account_real" + ], + "properties": { + "new_account_real": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_opening_reason": { + "description": "[Optional] Purpose and reason for requesting the account opening.", + "type": "string", + "enum": [ + "Speculative", + "Income Earning", + "Hedging", + "Peer-to-peer exchange" + ] + }, + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "address_city": { + "description": "[Optional] Within 100 characters.", + "type": "string", + "pattern": "^\\p{L}[\\p{L}\\s'.-]{0,99}$" + }, + "address_line_1": { + "description": "Within 70 characters, with no leading whitespaces and may contain letters/numbers and/or any of following characters '.,:;()@#/-", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}'.,:;()\\x{b0}@#/-][\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,69}$" + }, + "address_line_2": { + "description": "[Optional] Within 70 characters.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" + }, + "address_postcode": { + "description": "[Optional] Within 20 characters and may not contain '+'.", + "type": "string", + "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" + }, + "address_state": { + "description": "[Optional] Possible value receive from `states_list` call.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,-]{0,100}$" + }, + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "citizen": { + "description": "[Optional] Country of legal citizenship, 2-letter country code.", + "type": [ + "null", + "string" + ], + "pattern": "^([a-z]{2})?$" + }, + "client_type": { + "description": "[Optional] Indicates whether this is for a client requesting an account with professional status.", + "type": "string", + "default": "retail", + "enum": [ + "professional", + "retail" + ] + }, + "currency": { + "description": "[Optional] To set currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_of_birth": { + "description": "Date of birth format: `yyyy-mm-dd`.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" + }, + "first_name": { + "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "last_name": { + "description": "Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes.", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "non_pep_declaration": { + "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates).", + "type": "integer", + "maximum": 1, + "minimum": 0 + }, + "phone": { + "description": "[Optional] Starting with `+` followed by 9-35 digits, hyphens or space.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "place_of_birth": { + "description": "[Optional] Place of birth, 2-letter country code.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "residence": { + "description": "2-letter country code, possible value receive from `residence_list` call.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "salutation": { + "description": "[Optional] Accept any value in enum list.", + "type": "string", + "enum": [ + "Mr", + "Ms", + "Miss", + "Mrs" + ] + }, + "secret_answer": { + "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client open another account.", + "type": "string", + "pattern": "^[\\w\\-\\,\\.\\' ]+", + "maxLength": 50, + "minLength": 4, + "sensitive": 1 + }, + "secret_question": { + "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client open another account.", + "type": "string", + "enum": [ + "Mother's maiden name", + "Name of your pet", + "Name of first love", + "Memorable town/city", + "Memorable date", + "Favourite dish", + "Brand of first car", + "Favourite artist" + ] + }, + "tax_identification_number": { + "description": "[Optional] Tax identification number. Only applicable for real money account. Required for `maltainvest` landing company.", + "type": "string", + "pattern": "^(?!^$|\\s+)[A-Za-z0-9.\\/\\s-]{0,25}$" + }, + "tax_residence": { + "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for `maltainvest` landing company.", + "type": "string", + "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_virtual/send.json b/config/v3/new_account_virtual/send.json index f6d347ca..b1677af0 100644 --- a/config/v3/new_account_virtual/send.json +++ b/config/v3/new_account_virtual/send.json @@ -1,220 +1,233 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Virtual-Money Account (request)", - "description": "Create a new virtual-money account.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["new_account_virtual"], - "properties": { - "new_account_virtual": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "client_password": { - "description": "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).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "date_first_contact": { - "description": "[Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "email_consent": { - "description": "[Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.", - "type": "integer", - "enum": [1, 0] - }, - "gclid_url": { - "description": "[Optional] Google Click Identifier to track source.", - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - "residence": { - "description": "2-letter country code (obtained from `residence_list` call).", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "signup_device": { - "description": "[Optional] Show whether user has used mobile or desktop.", - "type": "string", - "enum": ["desktop", "mobile"] - }, - "type": { - "description": "Account type", - "type": "string", - "default": "trading", - "enum": ["trading", "wallet"] - }, - "utm_ad_id": { - "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adgroup_id": { - "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adrollclk_id": { - "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign": { - "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign_id": { - "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_content": { - "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_fbcl_id": { - "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_gl_client_id": { - "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Virtual-Money Account (request)", + "description": "Create a new virtual-money account.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "new_account_virtual" + ], + "properties": { + "new_account_virtual": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "client_password": { + "description": "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).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "email_consent": { + "description": "[Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "residence": { + "description": "2-letter country code (obtained from `residence_list` call).", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "type": { + "description": "Account type", + "type": "string", + "default": "trading", + "enum": [ + "trading", + "wallet" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first).", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first).", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/oauth_apps/send.json b/config/v3/oauth_apps/send.json index 824c3a30..0bfa02c6 100644 --- a/config/v3/oauth_apps/send.json +++ b/config/v3/oauth_apps/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "OAuth Applications (request)", - "description": "List all my used OAuth applications.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["oauth_apps"], - "properties": { - "oauth_apps": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "OAuth Applications (request)", + "description": "List all my used OAuth applications.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "oauth_apps" + ], + "properties": { + "oauth_apps": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_create/receive.json b/config/v3/p2p_advert_create/receive.json index b62336c2..92924d50 100644 --- a/config/v3/p2p_advert_create/receive.json +++ b/config/v3/p2p_advert_create/receive.json @@ -1,410 +1,498 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Create (response)", - "description": "Returns the information of the created P2P (Peer to Peer) advert.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advert_create": { - "title": "p2p_advert_create", - "description": "The information of the created P2P advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "account_currency", - "active_orders", - "advertiser_details", - "amount", - "amount_display", - "block_trade", - "counterparty_type", - "country", - "created_time", - "description", - "effective_rate", - "effective_rate_display", - "id", - "is_active", - "is_visible", - "local_currency", - "max_order_amount", - "max_order_amount_display", - "max_order_amount_limit", - "max_order_amount_limit_display", - "min_order_amount", - "min_order_amount_display", - "min_order_amount_limit", - "min_order_amount_limit_display", - "order_expiry_period", - "payment_method", - "price", - "price_display", - "rate", - "rate_display", - "rate_type", - "remaining_amount", - "remaining_amount_display", - "type" - ], - "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["integer", "null"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } - } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "block_trade": { - "description": "Indicates if this is block trade advert or not.", - "type": "integer", - "enum": [0, 1] - }, - "contact_info": { - "description": "Advertiser contact information. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "counterparty_type": { - "description": "Type of transaction from the opposite party's perspective.", - "type": "string", - "enum": ["buy", "sell"] - }, - "country": { - "description": "The target country code of the advert.", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "created_time": { - "description": "The advert creation time in epoch.", - "type": "integer" - }, - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "effective_rate": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", - "type": ["null", "number"] - }, - "effective_rate_display": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string" - }, - "is_active": { - "description": "The activation status of the advert.", - "type": "integer", - "enum": [0, 1] - }, - "is_visible": { - "description": "Indicates that this advert will appear on the main advert list.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "local_currency": { - "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum order amount specified in advert, in `account_currency`.", - "type": "number" - }, - "max_order_amount_display": { - "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "max_order_amount_limit": { - "description": "Maximum order amount at this time, in `account_currency`.", - "type": "number" - }, - "max_order_amount_limit_display": { - "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount specified in advert, in `account_currency`.", - "type": "number" - }, - "min_order_amount_display": { - "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount_limit": { - "description": "Minimum order amount at this time, in `account_currency`.", - "type": "number" - }, - "min_order_amount_limit_display": { - "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "order_expiry_period": { - "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Create (response)", + "description": "Returns the information of the created P2P (Peer to Peer) advert.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_create": { + "title": "p2p_advert_create", + "description": "The information of the created P2P advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "active_orders", + "advertiser_details", + "amount", + "amount_display", + "block_trade", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount", + "max_order_amount_display", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount", + "min_order_amount_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "order_expiry_period", + "payment_method", + "price", + "price_display", + "rate", + "rate_display", + "rate_type", + "remaining_amount", + "remaining_amount_display", + "type" + ], + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`.", + "type": "number" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount specified in advert, in `account_currency`.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount specified in advert, in `account_currency`.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "order_expiry_period": { + "description": "Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", "type": "string" - } + }, + "type": { + "description": "The type of advertisement in relation to the advertiser's Deriv account.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "type": { - "description": "The type of advertisement in relation to the advertiser's Deriv account.", - "type": "string", - "enum": ["buy", "sell"] - }, - "visibility_status": { - "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_block_trade_ineligible", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_create" ] - } + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_create"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_create/send.json b/config/v3/p2p_advert_create/send.json index a9f0f8b5..ed1a51d9 100644 --- a/config/v3/p2p_advert_create/send.json +++ b/config/v3/p2p_advert_create/send.json @@ -1,121 +1,148 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Create (request)", - "description": "Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": [ - "p2p_advert_create", - "amount", - "max_order_amount", - "min_order_amount", - "rate", - "type" - ], - "properties": { - "p2p_advert_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "The total amount of the advert, in advertiser's account currency.", - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - }, - "block_trade": { - "description": "[Optional] Indicates if this is block trade ad or not. Default: 0.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "contact_info": { - "description": "[Optional] Advertiser contact information.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "description": { - "description": "[Optional] General information about the advert.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "local_currency": { - "description": "[Optional] Local currency for this advert. If not provided, will use the currency of client's residence by default.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be more than or equal to `min_order_amount`", - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - }, - "min_order_amount": { - "description": "Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.", - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - }, - "order_expiry_period": { - "description": "[Optional] Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "[Optional] Payment instructions.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "payment_method": { - "description": "[Optional] Payment method name (deprecated).", - "type": "string" - }, - "payment_method_ids": { - "description": "IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads.", - "type": "array", - "items": { - "type": "integer" - }, - "maxItems": 3 - }, - "payment_method_names": { - "description": "Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "maxItems": 3 - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "default": "fixed", - "enum": ["fixed", "float"] - }, - "type": { - "description": "The advertisement represents the intention to perform this action on your Deriv account funds.", - "type": "string", - "enum": ["buy", "sell"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Create (request)", + "description": "Creates a P2P (Peer to Peer) advert. Can only be used by an approved P2P advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advert_create", + "amount", + "max_order_amount", + "min_order_amount", + "rate", + "type" + ], + "properties": { + "p2p_advert_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "The total amount of the advert, in advertiser's account currency.", + "type": "number", + "exclusiveMinimum": true, + "minimum": 0 + }, + "block_trade": { + "description": "[Optional] Indicates if this is block trade ad or not. Default: 0.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "[Optional] Advertiser contact information.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "description": { + "description": "[Optional] General information about the advert.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "local_currency": { + "description": "[Optional] Local currency for this advert. If not provided, will use the currency of client's residence by default.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be more than or equal to `min_order_amount`", + "type": "number", + "exclusiveMinimum": true, + "minimum": 0 + }, + "min_order_amount": { + "description": "Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.", + "type": "number", + "exclusiveMinimum": true, + "minimum": 0 + }, + "order_expiry_period": { + "description": "[Optional] Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "[Optional] Payment instructions.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "payment_method": { + "description": "[Optional] Payment method name (deprecated).", + "type": "string" + }, + "payment_method_ids": { + "description": "IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads.", + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 3 + }, + "payment_method_names": { + "description": "Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-z0-9_]+$" + }, + "maxItems": 3 + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "default": "fixed", + "enum": [ + "fixed", + "float" + ] + }, + "type": { + "description": "The advertisement represents the intention to perform this action on your Deriv account funds.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_info/receive.json b/config/v3/p2p_advert_info/receive.json index 58537a3e..d86036e3 100644 --- a/config/v3/p2p_advert_info/receive.json +++ b/config/v3/p2p_advert_info/receive.json @@ -1,412 +1,519 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Information (response)", - "description": "Returns information about the given advert ID.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advert_info": { - "title": "p2p_advert_info", - "description": "P2P advert information.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_blocked": { - "description": "Indicates that the advertiser is blocked by the current user.", - "type": "integer", - "enum": [0, 1] - }, - "is_favourite": { - "description": "Indicates that the advertiser is a favourite of the current user.", - "type": "integer", - "enum": [0, 1] - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["integer", "null"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } - } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "block_trade": { - "description": "Indicates if this is block trade advert or not.", - "type": "integer", - "enum": [0, 1] - }, - "contact_info": { - "description": "Advertiser contact information. Only applicable for 'sell adverts'. ", - "type": "string", - "sensitive": 1 - }, - "counterparty_type": { - "description": "Type of transaction from the opposite party's perspective.", - "type": "string", - "enum": ["buy", "sell"] - }, - "country": { - "description": "The target country code of the advert.", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "created_time": { - "description": "The advert creation time in epoch.", - "type": "integer" - }, - "days_until_archive": { - "description": "Days until automatic inactivation of this ad, if no activity occurs.", - "type": "integer" - }, - "deleted": { - "description": "Indicates that the advert has been deleted.", - "type": "integer", - "enum": [1] - }, - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "effective_rate": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", - "type": ["null", "number"] - }, - "effective_rate_display": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string" - }, - "is_active": { - "description": "The activation status of the advert.", - "type": "integer", - "enum": [0, 1] - }, - "is_visible": { - "description": "Indicates that this advert will appear on the main advert list. It is only visible to the advert owner.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "local_currency": { - "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "max_order_amount_display": { - "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "max_order_amount_limit": { - "description": "Maximum order amount at this time, in `account_currency`.", - "type": "number" - }, - "max_order_amount_limit_display": { - "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "min_order_amount_display": { - "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "min_order_amount_limit": { - "description": "Minimum order amount at this time, in `account_currency`.", - "type": "number" - }, - "min_order_amount_limit_display": { - "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "order_expiry_period": { - "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Information (response)", + "description": "Returns information about the given advert ID.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_info": { + "title": "p2p_advert_info", + "description": "P2P advert information.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_blocked": { + "description": "Indicates that the advertiser is blocked by the current user.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_favourite": { + "description": "Indicates that the advertiser is a favourite of the current user.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'. ", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "days_until_archive": { + "description": "Days until automatic inactivation of this ad, if no activity occurs.", + "type": "integer" + }, + "deleted": { + "description": "Indicates that the advert has been deleted.", + "type": "integer", + "enum": [ + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list. It is only visible to the advert owner.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "order_expiry_period": { + "description": "Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", "type": "string" - } + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + } + } }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "visibility_status": { - "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_block_trade_ineligible", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_info" ] - } - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_info"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_info/send.json b/config/v3/p2p_advert_info/send.json index 5d10eb3d..48350eb4 100644 --- a/config/v3/p2p_advert_info/send.json +++ b/config/v3/p2p_advert_info/send.json @@ -1,41 +1,57 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Information (request)", - "description": "Retrieve information about a P2P advert.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advert_info"], - "properties": { - "p2p_advert_info": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "id": { - "description": "[Optional] The unique identifier for this advert. Optional when subscribe is 1. If not provided, all advertiser adverts will be subscribed.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates when changes occur. Optional when id is provided.", - "type": "integer", - "enum": [1] - }, - "use_client_limits": { - "description": "[Optional] If set to 1, the maximum order amount will be adjusted to the current balance and turnover limits of the account.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Information (request)", + "description": "Retrieve information about a P2P advert.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advert_info" + ], + "properties": { + "p2p_advert_info": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "id": { + "description": "[Optional] The unique identifier for this advert. Optional when subscribe is 1. If not provided, all advertiser adverts will be subscribed.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates when changes occur. Optional when id is provided.", + "type": "integer", + "enum": [ + 1 + ] + }, + "use_client_limits": { + "description": "[Optional] If set to 1, the maximum order amount will be adjusted to the current balance and turnover limits of the account.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_list/receive.json b/config/v3/p2p_advert_list/receive.json index f39e9104..291b08ce 100644 --- a/config/v3/p2p_advert_list/receive.json +++ b/config/v3/p2p_advert_list/receive.json @@ -1,344 +1,425 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert List (response)", - "description": "Available adverts matching the requested criteria.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advert_list": { - "title": "p2p_advert_list", - "description": "P2P adverts list.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of adverts.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert List (response)", + "description": "Available adverts matching the requested criteria.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_list": { + "title": "p2p_advert_list", + "description": "P2P adverts list.", "type": "object", "additionalProperties": false, "required": [ - "account_currency", - "advertiser_details", - "block_trade", - "counterparty_type", - "country", - "created_time", - "description", - "effective_rate", - "effective_rate_display", - "id", - "is_active", - "is_visible", - "local_currency", - "max_order_amount_limit", - "max_order_amount_limit_display", - "min_order_amount_limit", - "min_order_amount_limit_display", - "order_expiry_period", - "payment_method", - "price", - "price_display", - "rate", - "rate_display", - "rate_type", - "type" + "list" ], "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_blocked": { - "description": "Indicates that the advertiser is blocked by the current user.", - "type": "integer", - "enum": [0] - }, - "is_favourite": { - "description": "Indicates that the advertiser is a favourite.", - "type": "integer", - "enum": [0, 1] - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["null", "number"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } + "list": { + "description": "List of adverts.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advertiser_details", + "block_trade", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "order_expiry_period", + "payment_method", + "price", + "price_display", + "rate", + "rate_display", + "rate_type", + "type" + ], + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_blocked": { + "description": "Indicates that the advertiser is blocked by the current user.", + "type": "integer", + "enum": [ + 0 + ] + }, + "is_favourite": { + "description": "Indicates that the advertiser is a favourite.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + }, + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 + }, + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "null", + "number" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] + } + } + }, + "amount": { + "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "days_until_archive": { + "description": "Days until automatic inactivation of this ad, if no activity occurs.", + "type": "integer" + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "order_expiry_period": { + "description": "Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } + } + } + } } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "block_trade": { - "description": "Indicates if this is block trade advert or not.", - "type": "integer", - "enum": [0, 1] - }, - "contact_info": { - "description": "Advertiser contact information. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "counterparty_type": { - "description": "Type of transaction from the opposite party's perspective.", - "type": "string", - "enum": ["buy", "sell"] - }, - "country": { - "description": "The target country code of the advert.", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "created_time": { - "description": "The advert creation time in epoch.", - "type": "integer" - }, - "days_until_archive": { - "description": "Days until automatic inactivation of this ad, if no activity occurs.", - "type": "integer" - }, - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "effective_rate": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", - "type": ["null", "number"] - }, - "effective_rate_display": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string" - }, - "is_active": { - "description": "The activation status of the advert.", - "type": "integer", - "enum": [0, 1] - }, - "is_visible": { - "description": "Indicates that this advert will appear on the main advert list.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "local_currency": { - "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "max_order_amount_display": { - "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "max_order_amount_limit": { - "description": "Maximum order amount at this time, in `account_currency`.", - "type": "number" - }, - "max_order_amount_limit_display": { - "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "min_order_amount_display": { - "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "min_order_amount_limit": { - "description": "Minimum order amount at this time, in `account_currency`.", - "type": "number" - }, - "min_order_amount_limit_display": { - "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "order_expiry_period": { - "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"], - "sensitive": 1 - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" - }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`. It is only visible to the advert owner.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] - }, - "visibility_status": { - "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_block_trade_ineligible", - "advertiser_daily_limit", - "advertiser_temp_ban" - ] - } - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advert_list" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_list"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_list/send.json b/config/v3/p2p_advert_list/send.json index 9efe6338..04048846 100644 --- a/config/v3/p2p_advert_list/send.json +++ b/config/v3/p2p_advert_list/send.json @@ -1,91 +1,119 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert List (request)", - "description": "Returns available adverts for use with `p2p_order_create` .", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advert_list"], - "properties": { - "p2p_advert_list": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "advertiser_id": { - "description": "[Optional] ID of the advertiser to list adverts for.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "advertiser_name": { - "description": "[Optional] Search for advertiser by name. Partial matches will be returned.", - "type": "string" - }, - "amount": { - "description": "[Optional] How much to buy or sell, used to calculate prices.", - "type": "number" - }, - "block_trade": { - "description": "[Optional] Return block trade adverts when 1, non-block trade adverts when 0 (default).", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "counterparty_type": { - "description": "[Optional] Filter the adverts by `counterparty_type`.", - "type": "string", - "enum": ["buy", "sell"] - }, - "favourites_only": { - "description": "[Optional] Only show adverts from favourite advertisers. Default is 0.", - "type": "integer", - "enum": [0, 1] - }, - "limit": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 50 - }, - "local_currency": { - "description": "[Optional] Currency to conduct payment transaction in. If not provided, only ads from country of residence will be returned.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "offset": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - "payment_method": { - "description": "[Optional] Search by supported payment methods.", - "type": "array", - "items": { - "description": "Payment method identifer.", - "type": "string", - "pattern": "^[a-z0-9_]{1,30}$" - } - }, - "sort_by": { - "description": "[Optional] How the results are sorted.", - "type": "string", - "default": "rate", - "enum": ["completion", "rate", "rating", "recommended"] - }, - "use_client_limits": { - "description": "[Optional] If set to 1, ads that exceed this account's balance or turnover limits will not be shown.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert List (request)", + "description": "Returns available adverts for use with `p2p_order_create` .", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advert_list" + ], + "properties": { + "p2p_advert_list": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "advertiser_id": { + "description": "[Optional] ID of the advertiser to list adverts for.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "advertiser_name": { + "description": "[Optional] Search for advertiser by name. Partial matches will be returned.", + "type": "string" + }, + "amount": { + "description": "[Optional] How much to buy or sell, used to calculate prices.", + "type": "number" + }, + "block_trade": { + "description": "[Optional] Return block trade adverts when 1, non-block trade adverts when 0 (default).", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "counterparty_type": { + "description": "[Optional] Filter the adverts by `counterparty_type`.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "favourites_only": { + "description": "[Optional] Only show adverts from favourite advertisers. Default is 0.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 50 + }, + "local_currency": { + "description": "[Optional] Currency to conduct payment transaction in. If not provided, only ads from country of residence will be returned.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "offset": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 0, + "minimum": 0 + }, + "payment_method": { + "description": "[Optional] Search by supported payment methods.", + "type": "array", + "items": { + "description": "Payment method identifer.", + "type": "string", + "pattern": "^[a-z0-9_]{1,30}$" + } + }, + "sort_by": { + "description": "[Optional] How the results are sorted.", + "type": "string", + "default": "rate", + "enum": [ + "completion", + "rate", + "rating", + "recommended" + ] + }, + "use_client_limits": { + "description": "[Optional] If set to 1, ads that exceed this account's balance or turnover limits will not be shown.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_update/receive.json b/config/v3/p2p_advert_update/receive.json index 8d8aac83..51400c24 100644 --- a/config/v3/p2p_advert_update/receive.json +++ b/config/v3/p2p_advert_update/receive.json @@ -1,384 +1,476 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Update (response)", - "description": "Returns information about the updated advert.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advert_update": { - "title": "p2p_advert_update", - "description": "P2P updated advert information.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["integer", "null"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } - } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "block_trade": { - "description": "Indicates if this is block trade advert or not.", - "type": "integer", - "enum": [0, 1] - }, - "contact_info": { - "description": "Advertiser contact information. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "counterparty_type": { - "description": "Type of transaction from the opposite party's perspective.", - "type": "string", - "enum": ["buy", "sell"] - }, - "country": { - "description": "The target country code of the advert.", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "created_time": { - "description": "The advert creation time in epoch.", - "type": "integer" - }, - "days_until_archive": { - "description": "Days until automatic inactivation of this ad, if no activity occurs.", - "type": "integer" - }, - "deleted": { - "description": "Indicates that the advert has been deleted.", - "type": "integer", - "enum": [1] - }, - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "effective_rate": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", - "type": ["null", "number"] - }, - "effective_rate_display": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string" - }, - "is_active": { - "description": "The activation status of the advert.", - "type": "integer", - "enum": [0, 1] - }, - "is_visible": { - "description": "Indicates that this advert will appear on the main advert list.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "local_currency": { - "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum order amount specified in advert, in `account_currency`.", - "type": "number" - }, - "max_order_amount_display": { - "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "max_order_amount_limit": { - "description": "Maximum order amount at this time, in `account_currency`.", - "type": "number" - }, - "max_order_amount_limit_display": { - "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible to the advert owner.", - "type": "number" - }, - "min_order_amount_display": { - "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount_limit": { - "description": "Minimum order amount at this time, in `account_currency`.", - "type": "number" - }, - "min_order_amount_limit_display": { - "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "order_expiry_period": { - "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Update (response)", + "description": "Returns information about the updated advert.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_update": { + "title": "p2p_advert_update", + "description": "P2P updated advert information.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates if this method is available on adverts.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`.", + "type": "number" + }, + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "days_until_archive": { + "description": "Days until automatic inactivation of this ad, if no activity occurs.", + "type": "integer" + }, + "deleted": { + "description": "Indicates that the advert has been deleted.", + "type": "integer", + "enum": [ + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount specified in advert, in `account_currency`.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount specified in advert, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "order_expiry_period": { + "description": "Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates if this method is available on adverts.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", "type": "string" - } + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" - }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] - }, - "visibility_status": { - "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_block_trade_ineligible", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_update" ] - } + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_update"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_update/send.json b/config/v3/p2p_advert_update/send.json index b8fb3e79..188c9262 100644 --- a/config/v3/p2p_advert_update/send.json +++ b/config/v3/p2p_advert_update/send.json @@ -1,112 +1,142 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert Update (request)", - "description": "Updates a P2P advert. Can only be used by the advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advert_update", "id"], - "properties": { - "p2p_advert_update": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "contact_info": { - "description": "[Optional] Advertiser contact information.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "delete": { - "description": "[Optional] If set to 1, permanently deletes the advert.", - "type": "integer", - "enum": [0, 1] - }, - "description": { - "description": "[Optional] General information about the advert.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", - "sensitive": 1 - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "is_active": { - "description": "[Optional] Activate or deactivate the advert.", - "type": "integer", - "enum": [0, 1] - }, - "local_currency": { - "description": "[Optional] Local currency for this advert.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "[Optional] Maximum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be more than or equal to `min_order_amount`.", - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - }, - "min_order_amount": { - "description": "[Optional] Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.", - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - }, - "order_expiry_period": { - "description": "[Optional] Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "[Optional] Payment instructions.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", - "sensitive": 1 - }, - "payment_method_ids": { - "description": "[Optional] IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads. Exisiting methods will be replaced.", - "type": "array", - "items": { - "type": "integer" - }, - "maxItems": 3 - }, - "payment_method_names": { - "description": "[Optional] Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads. Exisiting methods will be replaced.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[a-z0-9_]+$" - }, - "maxItems": 3 - }, - "rate": { - "description": "[Optional] Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_type": { - "description": "[Optional] Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "[Optional] The total available amount of the advert, in advertiser's account currency.", - "type": "number", - "minimum": 0 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Update (request)", + "description": "Updates a P2P advert. Can only be used by the advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advert_update", + "id" + ], + "properties": { + "p2p_advert_update": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "contact_info": { + "description": "[Optional] Advertiser contact information.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "delete": { + "description": "[Optional] If set to 1, permanently deletes the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "description": { + "description": "[Optional] General information about the advert.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", + "sensitive": 1 + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "is_active": { + "description": "[Optional] Activate or deactivate the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "[Optional] Local currency for this advert.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "[Optional] Maximum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be more than or equal to `min_order_amount`.", + "type": "number", + "exclusiveMinimum": true, + "minimum": 0 + }, + "min_order_amount": { + "description": "[Optional] Minimum allowed amount for the orders of this advert, in advertiser's `account_currency`. Should be less than or equal to `max_order_amount`.", + "type": "number", + "exclusiveMinimum": true, + "minimum": 0 + }, + "order_expiry_period": { + "description": "[Optional] Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "[Optional] Payment instructions.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", + "sensitive": 1 + }, + "payment_method_ids": { + "description": "[Optional] IDs of previously saved payment methods as returned from p2p_advertiser_payment_methods, only applicable for sell ads. Exisiting methods will be replaced.", + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 3 + }, + "payment_method_names": { + "description": "[Optional] Payment method identifiers as returned from p2p_payment_methods, only applicable for buy ads. Exisiting methods will be replaced.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-z0-9_]+$" + }, + "maxItems": 3 + }, + "rate": { + "description": "[Optional] Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_type": { + "description": "[Optional] Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "[Optional] The total available amount of the advert, in advertiser's account currency.", + "type": "number", + "minimum": 0 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_adverts/receive.json b/config/v3/p2p_advertiser_adverts/receive.json index ac9782ac..05dd2b8e 100644 --- a/config/v3/p2p_advertiser_adverts/receive.json +++ b/config/v3/p2p_advertiser_adverts/receive.json @@ -1,339 +1,408 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Adverts (response)", - "description": "All adverts belonging to the current advertiser.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_adverts": { - "title": "p2p_advertiser_adverts", - "description": "List of the P2P advertiser adverts.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of advertiser adverts.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Adverts (response)", + "description": "All adverts belonging to the current advertiser.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_adverts": { + "title": "p2p_advertiser_adverts", + "description": "List of the P2P advertiser adverts.", "type": "object", "additionalProperties": false, "required": [ - "account_currency", - "active_orders", - "advertiser_details", - "amount", - "amount_display", - "block_trade", - "contact_info", - "counterparty_type", - "country", - "created_time", - "description", - "effective_rate", - "effective_rate_display", - "id", - "is_active", - "is_visible", - "local_currency", - "max_order_amount", - "max_order_amount_display", - "max_order_amount_limit", - "max_order_amount_limit_display", - "min_order_amount", - "min_order_amount_display", - "min_order_amount_limit", - "min_order_amount_limit_display", - "order_expiry_period", - "payment_info", - "payment_method", - "price", - "price_display", - "rate", - "rate_display", - "rate_type", - "remaining_amount", - "remaining_amount_display", - "type" + "list" ], "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["integer", "null"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } + "list": { + "description": "List of advertiser adverts.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "active_orders", + "advertiser_details", + "amount", + "amount_display", + "block_trade", + "contact_info", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount", + "max_order_amount_display", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount", + "min_order_amount_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "order_expiry_period", + "payment_info", + "payment_method", + "price", + "price_display", + "rate", + "rate_display", + "rate_type", + "remaining_amount", + "remaining_amount_display", + "type" + ], + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 + }, + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] + } + } + }, + "amount": { + "description": "The total amount specified in advert, in `account_currency`.", + "type": "number" + }, + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "This is the type of transaction from the counterparty's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "days_until_archive": { + "description": "Days until automatic inactivation of this ad, if no activity occurs.", + "type": "integer" + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount, in `account_currency`.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount, in `account_currency`.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "order_expiry_period": { + "description": "Expiry period (seconds) for order created against this ad.", + "type": "integer", + "enum": [ + 900, + 1800, + 2700, + 3600, + 5400, + 7200 + ] + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } + } + } + } } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "block_trade": { - "description": "Indicates if this is block trade advert or not.", - "type": "integer", - "enum": [0, 1] - }, - "contact_info": { - "description": "Advertiser contact information. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "counterparty_type": { - "description": "This is the type of transaction from the counterparty's perspective.", - "type": "string", - "enum": ["buy", "sell"] - }, - "country": { - "description": "The target country code of the advert.", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "created_time": { - "description": "The advert creation time in epoch.", - "type": "integer" - }, - "days_until_archive": { - "description": "Days until automatic inactivation of this ad, if no activity occurs.", - "type": "integer" - }, - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "effective_rate": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", - "type": ["null", "number"] - }, - "effective_rate_display": { - "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "id": { - "description": "The unique identifier for this advert.", - "type": "string" - }, - "is_active": { - "description": "The activation status of the advert.", - "type": "integer", - "enum": [0, 1] - }, - "is_visible": { - "description": "Indicates that this advert will appear on the main advert list.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "local_currency": { - "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "max_order_amount": { - "description": "Maximum order amount, in `account_currency`.", - "type": "number" - }, - "max_order_amount_display": { - "description": "Maximum order amount, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "max_order_amount_limit": { - "description": "Maximum order amount at this time, in `account_currency`.", - "type": "number" - }, - "max_order_amount_limit_display": { - "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount, in `account_currency`.", - "type": "number" - }, - "min_order_amount_display": { - "description": "Minimum order amount, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "min_order_amount_limit": { - "description": "Minimum order amount at this time, in `account_currency`.", - "type": "number" - }, - "min_order_amount_limit_display": { - "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "order_expiry_period": { - "description": "Expiry period (seconds) for order created against this ad.", - "type": "integer", - "enum": [900, 1800, 2700, 3600, 5400, 7200] - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" - }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] - }, - "visibility_status": { - "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { - "type": "string", - "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_block_trade_ineligible", - "advertiser_daily_limit", - "advertiser_temp_ban" - ] - } - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_adverts" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advertiser_adverts"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advertiser_adverts/send.json b/config/v3/p2p_advertiser_adverts/send.json index 6defcca4..af5b7528 100644 --- a/config/v3/p2p_advertiser_adverts/send.json +++ b/config/v3/p2p_advertiser_adverts/send.json @@ -1,36 +1,47 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Adverts (request)", - "description": "Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_adverts"], - "properties": { - "p2p_advertiser_adverts": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "limit": { - "description": "[Optional] Used for paging. This value will also apply to subsription responses.", - "type": "integer", - "default": 50 - }, - "offset": { - "description": "[Optional] Used for paging. This value will also apply to subsription responses.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Adverts (request)", + "description": "Returns all P2P adverts created by the authorized client. Can only be used by a registered P2P advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_adverts" + ], + "properties": { + "p2p_advertiser_adverts": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "limit": { + "description": "[Optional] Used for paging. This value will also apply to subsription responses.", + "type": "integer", + "default": 50 + }, + "offset": { + "description": "[Optional] Used for paging. This value will also apply to subsription responses.", + "type": "integer", + "default": 0, + "minimum": 0 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_create/send.json b/config/v3/p2p_advertiser_create/send.json index 37c08488..9706b21e 100644 --- a/config/v3/p2p_advertiser_create/send.json +++ b/config/v3/p2p_advertiser_create/send.json @@ -1,54 +1,68 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Create (request)", - "description": "Registers the client as a P2P advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_create", "name"], - "properties": { - "p2p_advertiser_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "contact_info": { - "description": "[Optional] Advertiser's contact information, to be used as a default for new sell adverts.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "default_advert_description": { - "description": "[Optional] Default description that can be used every time an advert is created.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "pattern": "^(?!(.*(.)\\2{4,})|.*[\\.@_-]{2,}|^([\\.@_-])|.*([\\.@_-])$)[a-zA-Z0-9-_@\\.]{2,24}$", - "sensitive": 1 - }, - "payment_info": { - "description": "[Optional] Advertiser's payment information, to be used as a default for new sell adverts.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is an update to advertiser", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Create (request)", + "description": "Registers the client as a P2P advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_create", + "name" + ], + "properties": { + "p2p_advertiser_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "contact_info": { + "description": "[Optional] Advertiser's contact information, to be used as a default for new sell adverts.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "default_advert_description": { + "description": "[Optional] Default description that can be used every time an advert is created.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "pattern": "^(?!(.*(.)\\2{4,})|.*[\\.@_-]{2,}|^([\\.@_-])|.*([\\.@_-])$)[a-zA-Z0-9-_@\\.]{2,24}$", + "sensitive": 1 + }, + "payment_info": { + "description": "[Optional] Advertiser's payment information, to be used as a default for new sell adverts.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is an update to advertiser", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_info/send.json b/config/v3/p2p_advertiser_info/send.json index 9e6555ed..92454e92 100644 --- a/config/v3/p2p_advertiser_info/send.json +++ b/config/v3/p2p_advertiser_info/send.json @@ -1,35 +1,48 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Information (request)", - "description": "Retrieve information about a P2P advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_info"], - "properties": { - "p2p_advertiser_info": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "id": { - "description": "[Optional] The unique identifier for this advertiser. If not provided, returns advertiser information about the current account.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is an update to advertiser", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Information (request)", + "description": "Retrieve information about a P2P advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_info" + ], + "properties": { + "p2p_advertiser_info": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "id": { + "description": "[Optional] The unique identifier for this advertiser. If not provided, returns advertiser information about the current account.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is an update to advertiser", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_list/send.json b/config/v3/p2p_advertiser_list/send.json index fddbafc9..f70805f2 100644 --- a/config/v3/p2p_advertiser_list/send.json +++ b/config/v3/p2p_advertiser_list/send.json @@ -1,56 +1,77 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser List (request)", - "description": "Retrieve advertisers has/had trade with the current advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_list"], - "properties": { - "p2p_advertiser_list": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "advertiser_name": { - "description": "[Optional] Search for advertiser by name. Partial matches will be returned.", - "type": "string" - }, - "is_blocked": { - "description": "[Optional] Used to return only blocked or unblocked partners", - "type": "integer", - "enum": [0, 1] - }, - "limit": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 50 - }, - "offset": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - "sort_by": { - "description": "[Optional] How the results are sorted.", - "type": "string", - "default": "last_interaction_time", - "enum": ["name", "created_time", "last_interaction_time"] - }, - "trade_partners": { - "description": "[Optional] Get all advertisers has/had trade.", - "type": "integer", - "enum": [0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser List (request)", + "description": "Retrieve advertisers has/had trade with the current advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_list" + ], + "properties": { + "p2p_advertiser_list": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "advertiser_name": { + "description": "[Optional] Search for advertiser by name. Partial matches will be returned.", + "type": "string" + }, + "is_blocked": { + "description": "[Optional] Used to return only blocked or unblocked partners", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 50 + }, + "offset": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 0, + "minimum": 0 + }, + "sort_by": { + "description": "[Optional] How the results are sorted.", + "type": "string", + "default": "last_interaction_time", + "enum": [ + "name", + "created_time", + "last_interaction_time" + ] + }, + "trade_partners": { + "description": "[Optional] Get all advertisers has/had trade.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_payment_methods/send.json b/config/v3/p2p_advertiser_payment_methods/send.json index 0cb4999e..4b291459 100644 --- a/config/v3/p2p_advertiser_payment_methods/send.json +++ b/config/v3/p2p_advertiser_payment_methods/send.json @@ -1,86 +1,99 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Payment Methods (request)", - "description": "Manage or list P2P advertiser payment methods.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_payment_methods"], - "properties": { - "p2p_advertiser_payment_methods": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "create": { - "description": "Contains new payment method entries.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "minProperties": 2, - "required": ["method"], - "properties": { - "method": { - "description": "Payment method identifer.", - "type": "string", - "pattern": "^[a-z0-9_]{1,30}$" - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Payment Methods (request)", + "description": "Manage or list P2P advertiser payment methods.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_payment_methods" + ], + "properties": { + "p2p_advertiser_payment_methods": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "create": { + "description": "Contains new payment method entries.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "minProperties": 2, + "required": [ + "method" + ], + "properties": { + "method": { + "description": "Payment method identifer.", + "type": "string", + "pattern": "^[a-z0-9_]{1,30}$" + } + }, + "maxProperties": 100, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Payment method field value.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,_:;()@#/+-]{0,300}$" + } + } + }, + "maxItems": 100, + "minItems": 1, + "sensitive": 1 + }, + "delete": { + "description": "Contains payment methods to delete.", + "type": "array", + "items": { + "description": "Advertiser payment method ID.", + "type": "number" + }, + "maxItems": 100, + "minItems": 1 + }, + "update": { + "description": "Contains payment methods to update.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Advertiser payment method ID.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 100, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Payment field to value to update.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'._,:;()@#/+-]{0,300}$" + } + } + } + }, + "sensitive": 1 }, - "maxProperties": 100, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Payment method field value.", + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,_:;()@#/+-]{0,300}$" - } - } - }, - "maxItems": 100, - "minItems": 1, - "sensitive": 1 - }, - "delete": { - "description": "Contains payment methods to delete.", - "type": "array", - "items": { - "description": "Advertiser payment method ID.", - "type": "number" - }, - "maxItems": 100, - "minItems": 1 - }, - "update": { - "description": "Contains payment methods to update.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Advertiser payment method ID.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "maxProperties": 100, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Payment field to value to update.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'._,:;()@#/+-]{0,300}$" - } - } + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - }, - "sensitive": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advertiser_relations/send.json b/config/v3/p2p_advertiser_relations/send.json index 89db4eb1..f8c598e4 100644 --- a/config/v3/p2p_advertiser_relations/send.json +++ b/config/v3/p2p_advertiser_relations/send.json @@ -1,61 +1,72 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Relations (request)", - "description": "Updates and returns favourite and blocked advertisers of the current user.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_relations"], - "properties": { - "p2p_advertiser_relations": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "add_blocked": { - "description": "IDs of advertisers to block.", - "type": "array", - "items": { - "description": "Advertiser unique identifier.", - "type": "number" - }, - "maxItems": 100 - }, - "add_favourites": { - "description": "IDs of advertisers to add as favourites.", - "type": "array", - "items": { - "description": "Advertiser unique identifier.", - "type": "number" - }, - "maxItems": 100 - }, - "remove_blocked": { - "description": "IDs of advertisers to remove from blocked.", - "type": "array", - "items": { - "description": "Advertiser unique identifier.", - "type": "number" - }, - "maxItems": 100 - }, - "remove_favourites": { - "description": "IDs of advertisers to remove from favourites.", - "type": "array", - "items": { - "description": "Advertiser unique identifier.", - "type": "number" - }, - "maxItems": 100 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Relations (request)", + "description": "Updates and returns favourite and blocked advertisers of the current user.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_relations" + ], + "properties": { + "p2p_advertiser_relations": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "add_blocked": { + "description": "IDs of advertisers to block.", + "type": "array", + "items": { + "description": "Advertiser unique identifier.", + "type": "number" + }, + "maxItems": 100 + }, + "add_favourites": { + "description": "IDs of advertisers to add as favourites.", + "type": "array", + "items": { + "description": "Advertiser unique identifier.", + "type": "number" + }, + "maxItems": 100 + }, + "remove_blocked": { + "description": "IDs of advertisers to remove from blocked.", + "type": "array", + "items": { + "description": "Advertiser unique identifier.", + "type": "number" + }, + "maxItems": 100 + }, + "remove_favourites": { + "description": "IDs of advertisers to remove from favourites.", + "type": "array", + "items": { + "description": "Advertiser unique identifier.", + "type": "number" + }, + "maxItems": 100 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_update/send.json b/config/v3/p2p_advertiser_update/send.json index f88729d2..d7150269 100644 --- a/config/v3/p2p_advertiser_update/send.json +++ b/config/v3/p2p_advertiser_update/send.json @@ -1,58 +1,77 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Update (request)", - "description": "Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_update"], - "properties": { - "p2p_advertiser_update": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "contact_info": { - "description": "[Optional] Advertiser's contact information, to be used as a default for new sell adverts.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", - "sensitive": 1 - }, - "default_advert_description": { - "description": "[Optional] Default description that can be used every time an advert is created.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", - "sensitive": 1 - }, - "is_listed": { - "description": "[Optional] Used to set if the advertiser's adverts could be listed. When `0`, adverts won't be listed regardless of they are active or not. This doesn't change the `is_active` of each individual advert.", - "type": "integer", - "enum": [0, 1] - }, - "payment_info": { - "description": "[Optional] Advertiser's payment information, to be used as a default for new sell adverts.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", - "sensitive": 1 - }, - "show_name": { - "description": "[Optional] When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", - "type": "integer", - "enum": [0, 1] - }, - "upgrade_limits": { - "description": "[Optional] Used to upgrade daily limits of eligible advertiser.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Update (request)", + "description": "Update the information of the P2P advertiser for the current account. Can only be used by an approved P2P advertiser.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_update" + ], + "properties": { + "p2p_advertiser_update": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "contact_info": { + "description": "[Optional] Advertiser's contact information, to be used as a default for new sell adverts.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", + "sensitive": 1 + }, + "default_advert_description": { + "description": "[Optional] Default description that can be used every time an advert is created.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", + "sensitive": 1 + }, + "is_listed": { + "description": "[Optional] Used to set if the advertiser's adverts could be listed. When `0`, adverts won't be listed regardless of they are active or not. This doesn't change the `is_active` of each individual advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "payment_info": { + "description": "[Optional] Advertiser's payment information, to be used as a default for new sell adverts.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{0,300}$", + "sensitive": 1 + }, + "show_name": { + "description": "[Optional] When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "upgrade_limits": { + "description": "[Optional] Used to upgrade daily limits of eligible advertiser.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_chat_create/send.json b/config/v3/p2p_chat_create/send.json index 5744019c..27e95356 100644 --- a/config/v3/p2p_chat_create/send.json +++ b/config/v3/p2p_chat_create/send.json @@ -1,30 +1,42 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Chat Create (request)", - "description": "Creates a P2P chat for the specified order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_chat_create", "order_id"], - "properties": { - "p2p_chat_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "order_id": { - "description": "The unique identifier for the order to create the chat for.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Chat Create (request)", + "description": "Creates a P2P chat for the specified order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_chat_create", + "order_id" + ], + "properties": { + "p2p_chat_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "order_id": { + "description": "The unique identifier for the order to create the chat for.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_cancel/send.json b/config/v3/p2p_order_cancel/send.json index 09d16eaa..89054126 100644 --- a/config/v3/p2p_order_cancel/send.json +++ b/config/v3/p2p_order_cancel/send.json @@ -1,30 +1,42 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Cancel (request)", - "description": "Cancel a P2P order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_cancel", "id"], - "properties": { - "p2p_order_cancel": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Cancel (request)", + "description": "Cancel a P2P order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_cancel", + "id" + ], + "properties": { + "p2p_order_cancel": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_confirm/send.json b/config/v3/p2p_order_confirm/send.json index 3c094c11..27c85524 100644 --- a/config/v3/p2p_order_confirm/send.json +++ b/config/v3/p2p_order_confirm/send.json @@ -1,40 +1,55 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Confirm (request)", - "description": "Confirm a P2P order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_confirm", "id"], - "properties": { - "p2p_order_confirm": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "dry_run": { - "description": "[Optional] If set to `1`, only validation is performed.", - "type": "integer", - "default": 0, - "enum": [0, 1] - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "verification_code": { - "description": "[Optional] Verification code received from email.", - "type": "string" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Confirm (request)", + "description": "Confirm a P2P order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_confirm", + "id" + ], + "properties": { + "p2p_order_confirm": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "dry_run": { + "description": "[Optional] If set to `1`, only validation is performed.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "verification_code": { + "description": "[Optional] Verification code received from email.", + "type": "string" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_create/send.json b/config/v3/p2p_order_create/send.json index 6abab41e..3efa783d 100644 --- a/config/v3/p2p_order_create/send.json +++ b/config/v3/p2p_order_create/send.json @@ -1,63 +1,78 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Create (request)", - "description": "Creates a P2P order for the specified advert.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_create", "advert_id", "amount"], - "properties": { - "p2p_order_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "advert_id": { - "description": "The unique identifier for the advert to create an order against.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "amount": { - "description": "The amount of currency to be bought or sold.", - "type": "number" - }, - "contact_info": { - "description": "[Optional] Seller contact information. Only applicable for 'sell orders'.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "payment_info": { - "description": "[Optional] Payment instructions, only applicable for sell orders.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", - "sensitive": 1 - }, - "payment_method_ids": { - "description": "IDs of payment methods, only applicable for sell orders.", - "type": "array", - "items": { - "type": "integer" - }, - "maxItems": 3 - }, - "rate": { - "description": "[Optional] Conversion rate from account currency to local currency, only applicable for floating rate adverts.", - "type": "number" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is an update to the order.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Create (request)", + "description": "Creates a P2P order for the specified advert.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_create", + "advert_id", + "amount" + ], + "properties": { + "p2p_order_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "advert_id": { + "description": "The unique identifier for the advert to create an order against.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "amount": { + "description": "The amount of currency to be bought or sold.", + "type": "number" + }, + "contact_info": { + "description": "[Optional] Seller contact information. Only applicable for 'sell orders'.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "payment_info": { + "description": "[Optional] Payment instructions, only applicable for sell orders.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,300}$", + "sensitive": 1 + }, + "payment_method_ids": { + "description": "IDs of payment methods, only applicable for sell orders.", + "type": "array", + "items": { + "type": "integer" + }, + "maxItems": 3 + }, + "rate": { + "description": "[Optional] Conversion rate from account currency to local currency, only applicable for floating rate adverts.", + "type": "number" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is an update to the order.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_dispute/send.json b/config/v3/p2p_order_dispute/send.json index f2c52c6b..23025133 100644 --- a/config/v3/p2p_order_dispute/send.json +++ b/config/v3/p2p_order_dispute/send.json @@ -1,41 +1,54 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Dispute (request)", - "description": "Dispute a P2P order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_dispute", "dispute_reason", "id"], - "properties": { - "p2p_order_dispute": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "dispute_reason": { - "description": "The predefined dispute reason", - "type": "string", - "enum": [ - "seller_not_released", - "buyer_underpaid", - "buyer_overpaid", - "buyer_not_paid", - "buyer_third_party_payment_method" - ] - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Dispute (request)", + "description": "Dispute a P2P order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_dispute", + "dispute_reason", + "id" + ], + "properties": { + "p2p_order_dispute": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "dispute_reason": { + "description": "The predefined dispute reason", + "type": "string", + "enum": [ + "seller_not_released", + "buyer_underpaid", + "buyer_overpaid", + "buyer_not_paid", + "buyer_third_party_payment_method" + ] + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_info/send.json b/config/v3/p2p_order_info/send.json index f2cd7379..5a7f2633 100644 --- a/config/v3/p2p_order_info/send.json +++ b/config/v3/p2p_order_info/send.json @@ -1,35 +1,49 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Information (request)", - "description": "Retrieves the information about a P2P order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_info", "id"], - "properties": { - "p2p_order_info": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "id": { - "description": "The unique identifier for the order.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is an update to order", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Information (request)", + "description": "Retrieves the information about a P2P order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_info", + "id" + ], + "properties": { + "p2p_order_info": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "id": { + "description": "The unique identifier for the order.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is an update to order", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_list/send.json b/config/v3/p2p_order_list/send.json index 69a08a25..082d9c14 100644 --- a/config/v3/p2p_order_list/send.json +++ b/config/v3/p2p_order_list/send.json @@ -1,61 +1,77 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order List (request)", - "description": "List active orders.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_list"], - "properties": { - "p2p_order_list": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "active": { - "description": "[Optional] Should be 1 to list active, 0 to list inactive (historical).", - "type": "number", - "enum": [0, 1] - }, - "advert_id": { - "description": "[Optional] If present, lists orders applying to a specific advert.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "date_from": { - "description": "[Optional] Filter the orders created after this date(included) format(epoch or YYYY-MM-DD)", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{10})$" - }, - "date_to": { - "description": "[Optional] Filter the orders created before this date(included) format(epoch or YYYY-MM-DD)", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{10})$" - }, - "limit": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 50 - }, - "offset": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 0, - "minimum": 0 - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever there is a change to any order belonging to you.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order List (request)", + "description": "List active orders.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_list" + ], + "properties": { + "p2p_order_list": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "active": { + "description": "[Optional] Should be 1 to list active, 0 to list inactive (historical).", + "type": "number", + "enum": [ + 0, + 1 + ] + }, + "advert_id": { + "description": "[Optional] If present, lists orders applying to a specific advert.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "date_from": { + "description": "[Optional] Filter the orders created after this date(included) format(epoch or YYYY-MM-DD)", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{10})$" + }, + "date_to": { + "description": "[Optional] Filter the orders created before this date(included) format(epoch or YYYY-MM-DD)", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{10})$" + }, + "limit": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 50 + }, + "offset": { + "description": "[Optional] Used for paging.", + "type": "integer", + "default": 0, + "minimum": 0 + }, + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever there is a change to any order belonging to you.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_review/send.json b/config/v3/p2p_order_review/send.json index 7b3f798c..a2266195 100644 --- a/config/v3/p2p_order_review/send.json +++ b/config/v3/p2p_order_review/send.json @@ -1,41 +1,61 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Review (request)", - "description": "Creates a review for the specified order.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_order_review", "order_id", "rating"], - "properties": { - "p2p_order_review": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "order_id": { - "description": "The order identification number.", - "type": "string", - "pattern": "^[0-9]+$" - }, - "rating": { - "description": "Rating for the transaction, 1 to 5.", - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "recommended": { - "description": "[Optional] `1` if the counterparty is recommendable to others, otherwise `0`.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Review (request)", + "description": "Creates a review for the specified order.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_order_review", + "order_id", + "rating" + ], + "properties": { + "p2p_order_review": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "order_id": { + "description": "The order identification number.", + "type": "string", + "pattern": "^[0-9]+$" + }, + "rating": { + "description": "Rating for the transaction, 1 to 5.", + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "recommended": { + "description": "[Optional] `1` if the counterparty is recommendable to others, otherwise `0`.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_payment_methods/send.json b/config/v3/p2p_payment_methods/send.json index a363b009..0bcdd895 100644 --- a/config/v3/p2p_payment_methods/send.json +++ b/config/v3/p2p_payment_methods/send.json @@ -1,25 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Payment Methods (request)", - "description": "List all P2P payment methods.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_payment_methods"], - "properties": { - "p2p_payment_methods": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Payment Methods (request)", + "description": "List all P2P payment methods.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_payment_methods" + ], + "properties": { + "p2p_payment_methods": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_ping/send.json b/config/v3/p2p_ping/send.json index a9c1dd25..3c069fdb 100644 --- a/config/v3/p2p_ping/send.json +++ b/config/v3/p2p_ping/send.json @@ -1,25 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Ping (request)", - "description": "Keeps the connection alive and updates the P2P advertiser's online status. The advertiser will be considered offline 60 seconds after a call is made.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_ping"], - "properties": { - "p2p_ping": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Ping (request)", + "description": "Keeps the connection alive and updates the P2P advertiser's online status. The advertiser will be considered offline 60 seconds after a call is made.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_ping" + ], + "properties": { + "p2p_ping": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_settings/send.json b/config/v3/p2p_settings/send.json index 071d7b8b..744b916c 100644 --- a/config/v3/p2p_settings/send.json +++ b/config/v3/p2p_settings/send.json @@ -1,30 +1,43 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Settings (request)", - "description": "Request P2P Settings information.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_settings"], - "properties": { - "p2p_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "subscribe": { - "description": "[Optional] If set to `1`, will send updates whenever there is an update to P2P settings.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Settings (request)", + "description": "Request P2P Settings information.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_settings" + ], + "properties": { + "p2p_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "subscribe": { + "description": "[Optional] If set to `1`, will send updates whenever there is an update to P2P settings.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/payment_methods/send.json b/config/v3/payment_methods/send.json index b07018a1..6a958d2e 100644 --- a/config/v3/payment_methods/send.json +++ b/config/v3/payment_methods/send.json @@ -1,34 +1,38 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Methods (request)", - "description": "Will return a list payment methods available for the given country. If the request is authenticated the client's residence country will be used.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["payment_methods"], - "properties": { - "payment_methods": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "country": { - "description": "[Optional] 2-letter country code (ISO standard).", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Methods (request)", + "description": "Will return a list payment methods available for the given country. If the request is authenticated the client's residence country will be used.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "payment_methods" + ], + "properties": { + "payment_methods": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "country": { + "description": "[Optional] 2-letter country code (ISO standard).", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_create/send.json b/config/v3/paymentagent_create/send.json index 3e463678..92542797 100644 --- a/config/v3/paymentagent_create/send.json +++ b/config/v3/paymentagent_create/send.json @@ -1,121 +1,138 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment agent create (request)", - "description": "Saves client's payment agent details.", - "beta": 1, - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "paymentagent_create", - "code_of_conduct_approval", - "commission_deposit", - "commission_withdrawal", - "email", - "information", - "payment_agent_name", - "supported_payment_methods", - "urls" - ], - "properties": { - "paymentagent_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "affiliate_id": { - "description": "[Optional] Client's My Affiliate id, if exists.", - "type": "string", - "pattern": "^[\\w]{0,32}$" - }, - "code_of_conduct_approval": { - "description": "Indicates client's agreement with the Code of Conduct.", - "type": "integer", - "enum": [1] - }, - "commission_deposit": { - "description": "Commission (%) the agent wants to take on deposits", - "type": "number", - "maximum": 9, - "minimum": 0 - }, - "commission_withdrawal": { - "description": "Commission (%) the agent wants to take on withdrawals", - "type": "number", - "maximum": 9, - "minimum": 0 - }, - "email": { - "description": "Payment agent's email address.", - "type": "string", - "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{1,255}$" - }, - "information": { - "description": "[Optional] Information about payment agent and their proposed service.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,500}$" - }, - "payment_agent_name": { - "description": "The name with which the payment agent is going to be identified.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,100}$" - }, - "phone_numbers": { - "description": "Payment agent's phone number(s) with country code.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["phone_number"], - "properties": { - "phone_number": { - "description": "A phone number", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment agent create (request)", + "description": "Saves client's payment agent details.", + "beta": 1, + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "paymentagent_create", + "code_of_conduct_approval", + "commission_deposit", + "commission_withdrawal", + "email", + "information", + "payment_agent_name", + "supported_payment_methods", + "urls" + ], + "properties": { + "paymentagent_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "affiliate_id": { + "description": "[Optional] Client's My Affiliate id, if exists.", "type": "string", - "pattern": "^\\+[\\-\\ 0-9]{8,40}$" - } - } - } - }, - "supported_payment_methods": { - "description": "A list of supported payment methods.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["payment_method"], - "properties": { - "payment_method": { - "description": "A payment method's name", + "pattern": "^[\\w]{0,32}$" + }, + "code_of_conduct_approval": { + "description": "Indicates client's agreement with the Code of Conduct.", + "type": "integer", + "enum": [ + 1 + ] + }, + "commission_deposit": { + "description": "Commission (%) the agent wants to take on deposits", + "type": "number", + "maximum": 9, + "minimum": 0 + }, + "commission_withdrawal": { + "description": "Commission (%) the agent wants to take on withdrawals", + "type": "number", + "maximum": 9, + "minimum": 0 + }, + "email": { + "description": "Payment agent's email address.", "type": "string", - "pattern": "^[\\w \\-]{2,30}$" - } - } - } - }, - "urls": { - "description": "The URL(s) of payment agent's website(s).", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["url"], - "properties": { - "url": { - "description": "A webpage or website's URL.", + "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{1,255}$" + }, + "information": { + "description": "[Optional] Information about payment agent and their proposed service.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,500}$" + }, + "payment_agent_name": { + "description": "The name with which the payment agent is going to be identified.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,100}$" + }, + "phone_numbers": { + "description": "Payment agent's phone number(s) with country code.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "phone_number" + ], + "properties": { + "phone_number": { + "description": "A phone number", + "type": "string", + "pattern": "^\\+[\\-\\ 0-9]{8,40}$" + } + } + } + }, + "supported_payment_methods": { + "description": "A list of supported payment methods.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "payment_method" + ], + "properties": { + "payment_method": { + "description": "A payment method's name", + "type": "string", + "pattern": "^[\\w \\-]{2,30}$" + } + } + } + }, + "urls": { + "description": "The URL(s) of payment agent's website(s).", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "url" + ], + "properties": { + "url": { + "description": "A webpage or website's URL.", + "type": "string", + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" + } + } + } + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - } + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/paymentagent_details/send.json b/config/v3/paymentagent_details/send.json index e85d09e0..665242b4 100644 --- a/config/v3/paymentagent_details/send.json +++ b/config/v3/paymentagent_details/send.json @@ -1,25 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment agent details (request)", - "description": "Gets client's payment agent details.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["paymentagent_details"], - "properties": { - "paymentagent_details": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment agent details (request)", + "description": "Gets client's payment agent details.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "paymentagent_details" + ], + "properties": { + "paymentagent_details": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_list/send.json b/config/v3/paymentagent_list/send.json index d9e70d5a..b83bd050 100644 --- a/config/v3/paymentagent_list/send.json +++ b/config/v3/paymentagent_list/send.json @@ -1,30 +1,37 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: List (request)", - "description": "Will return a list of Payment Agents for a given country for a given currency. Payment agents allow users to deposit and withdraw funds using local payment methods that might not be available via the main website's cashier system.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["paymentagent_list"], - "properties": { - "paymentagent_list": { - "title": "Payment Agent Target Country", - "description": "Client's 2-letter country code (obtained from `residence_list` call).", - "type": "string", - "pattern": "^\\w\\w$" - }, - "currency": { - "description": "[Optional] If specified, only payment agents that supports that currency will be returned (obtained from `payout_currencies` call).", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: List (request)", + "description": "Will return a list of Payment Agents for a given country for a given currency. Payment agents allow users to deposit and withdraw funds using local payment methods that might not be available via the main website's cashier system.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "paymentagent_list" + ], + "properties": { + "paymentagent_list": { + "title": "Payment Agent Target Country", + "description": "Client's 2-letter country code (obtained from `residence_list` call).", + "type": "string", + "pattern": "^\\w\\w$" + }, + "currency": { + "description": "[Optional] If specified, only payment agents that supports that currency will be returned (obtained from `payout_currencies` call).", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_transfer/send.json b/config/v3/paymentagent_transfer/send.json index e61eabf6..9463cfe0 100644 --- a/config/v3/paymentagent_transfer/send.json +++ b/config/v3/paymentagent_transfer/send.json @@ -1,49 +1,66 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: Transfer (request)", - "description": "Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["paymentagent_transfer", "amount", "currency", "transfer_to"], - "properties": { - "paymentagent_transfer": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "The amount to transfer.", - "type": "number" - }, - "currency": { - "description": "Currency code.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "description": { - "description": "[Optional] Remarks about the transfer.", - "type": "string", - "pattern": "^[0-9A-Za-z .,'-]{0,250}$" - }, - "dry_run": { - "description": "[Optional] If set to `1`, just do validation.", - "type": "integer", - "enum": [0, 1] - }, - "transfer_to": { - "description": "The loginid of the recipient account.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Transfer (request)", + "description": "Payment Agent Transfer - this call is available only to accounts that are approved Payment Agents.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "paymentagent_transfer", + "amount", + "currency", + "transfer_to" + ], + "properties": { + "paymentagent_transfer": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "The amount to transfer.", + "type": "number" + }, + "currency": { + "description": "Currency code.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "description": { + "description": "[Optional] Remarks about the transfer.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,250}$" + }, + "dry_run": { + "description": "[Optional] If set to `1`, just do validation.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "transfer_to": { + "description": "The loginid of the recipient account.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_withdraw/send.json b/config/v3/paymentagent_withdraw/send.json index 3d42d8d6..059900f5 100644 --- a/config/v3/paymentagent_withdraw/send.json +++ b/config/v3/paymentagent_withdraw/send.json @@ -1,60 +1,72 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: Withdraw (request)", - "description": "Initiate a withdrawal to an approved Payment Agent.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": [ - "paymentagent_withdraw", - "amount", - "currency", - "paymentagent_loginid", - "verification_code" - ], - "properties": { - "paymentagent_withdraw": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "The amount to withdraw to the payment agent.", - "type": "number" - }, - "currency": { - "description": "The currency code.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "description": { - "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed.", - "type": "string", - "pattern": "^[0-9A-Za-z .,'-]{0,250}$" - }, - "dry_run": { - "description": "[Optional] If set to 1, just do validation.", - "type": "integer", - "enum": [0, 1] - }, - "paymentagent_loginid": { - "description": "The payment agent loginid received from the `paymentagent_list` call.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first)", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Withdraw (request)", + "description": "Initiate a withdrawal to an approved Payment Agent.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "paymentagent_withdraw", + "amount", + "currency", + "paymentagent_loginid", + "verification_code" + ], + "properties": { + "paymentagent_withdraw": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "The amount to withdraw to the payment agent.", + "type": "number" + }, + "currency": { + "description": "The currency code.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "description": { + "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,250}$" + }, + "dry_run": { + "description": "[Optional] If set to 1, just do validation.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "paymentagent_loginid": { + "description": "The payment agent loginid received from the `paymentagent_list` call.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first)", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_withdraw_justification/send.json b/config/v3/paymentagent_withdraw_justification/send.json index a524bd38..29b05a9e 100644 --- a/config/v3/paymentagent_withdraw_justification/send.json +++ b/config/v3/paymentagent_withdraw_justification/send.json @@ -1,31 +1,42 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: Withdraw justification (request)", - "description": "Provide justification to perform withdrawal using a Payment Agent.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["paymentagent_withdraw_justification"], - "properties": { - "paymentagent_withdraw_justification": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "message": { - "description": "Reasons for needing to withdraw using a Payment Agent.", - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Withdraw justification (request)", + "description": "Provide justification to perform withdrawal using a Payment Agent.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "paymentagent_withdraw_justification" + ], + "properties": { + "paymentagent_withdraw_justification": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "message": { + "description": "Reasons for needing to withdraw using a Payment Agent.", + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/payout_currencies/send.json b/config/v3/payout_currencies/send.json index 9c2a274a..b6a63b42 100644 --- a/config/v3/payout_currencies/send.json +++ b/config/v3/payout_currencies/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payout Currencies (request)", - "description": "Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["payout_currencies"], - "properties": { - "payout_currencies": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payout Currencies (request)", + "description": "Retrieve a list of available option payout currencies. If a user is logged in, only the currencies available for the account will be returned.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "payout_currencies" + ], + "properties": { + "payout_currencies": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/ping/send.json b/config/v3/ping/send.json index 42d1ca08..3c725aca 100644 --- a/config/v3/ping/send.json +++ b/config/v3/ping/send.json @@ -1,24 +1,28 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ping (request)", - "description": "To send the ping request to the server. Mostly used to test the connection or to keep it alive.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ping"], - "properties": { - "ping": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ping (request)", + "description": "To send the ping request to the server. Mostly used to test the connection or to keep it alive.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "ping" + ], + "properties": { + "ping": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/portfolio/send.json b/config/v3/portfolio/send.json index 0ee0e499..73b0e0f6 100644 --- a/config/v3/portfolio/send.json +++ b/config/v3/portfolio/send.json @@ -1,77 +1,85 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Portfolio (request)", - "description": "Receive information about my current portfolio of outstanding options", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["portfolio"], - "properties": { - "portfolio": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_type": { - "description": "Return only contracts of the specified types", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ASIAND", - "ASIANU", - "CALL", - "CALLE", - "CALLSPREAD", - "DIGITDIFF", - "DIGITEVEN", - "DIGITMATCH", - "DIGITODD", - "DIGITOVER", - "DIGITUNDER", - "EXPIRYMISSE", - "EXPIRYMISS", - "EXPIRYRANGE", - "EXPIRYRANGEE", - "LBFLOATCALL", - "LBFLOATPUT", - "LBHIGHLOW", - "MULTDOWN", - "MULTUP", - "NOTOUCH", - "ONETOUCH", - "PUT", - "PUTE", - "PUTSPREAD", - "RANGE", - "RESETCALL", - "RESETPUT", - "RUNHIGH", - "RUNLOW", - "TICKHIGH", - "TICKLOW", - "UPORDOWN", - "VANILLALONGCALL", - "VANILLALONGPUT", - "TURBOSLONG", - "TURBOSSHORT" - ], - "uniqueItems": true - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Portfolio (request)", + "description": "Receive information about my current portfolio of outstanding options", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "portfolio" + ], + "properties": { + "portfolio": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "contract_type": { + "description": "Return only contracts of the specified types", + "type": "array", + "items": { + "type": "string", + "enum": [ + "ACCU", + "ASIAND", + "ASIANU", + "CALL", + "CALLE", + "CALLSPREAD", + "DIGITDIFF", + "DIGITEVEN", + "DIGITMATCH", + "DIGITODD", + "DIGITOVER", + "DIGITUNDER", + "EXPIRYMISSE", + "EXPIRYMISS", + "EXPIRYRANGE", + "EXPIRYRANGEE", + "LBFLOATCALL", + "LBFLOATPUT", + "LBHIGHLOW", + "MULTDOWN", + "MULTUP", + "NOTOUCH", + "ONETOUCH", + "PUT", + "PUTE", + "PUTSPREAD", + "RANGE", + "RESETCALL", + "RESETPUT", + "RUNHIGH", + "RUNLOW", + "TICKHIGH", + "TICKLOW", + "UPORDOWN", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ], + "uniqueItems": true + } + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/profit_table/receive.json b/config/v3/profit_table/receive.json index 5921b088..151bf811 100644 --- a/config/v3/profit_table/receive.json +++ b/config/v3/profit_table/receive.json @@ -46,15 +46,35 @@ 4867502908 ] }, + "contract_type": { + "description": "[Optional] The contract type for the transaction if description is set to 1.", + "type": "string", + "examples": [ + "ASIANU", + "CALL" + ] + }, + "deal_cancellation_duration": { + "description": "[Optional] Duration set for deal cancellation for Multiplier contracts in synthetic indices if description is set to 1.", + "type": "string" + }, "duration_type": { - "description": "The duration type of the contract.", + "description": "[Optional] The duration type of the contract if description is set to 1.", "type": [ "null", "string" ] }, + "growth_rate": { + "description": "[Optional] The growth rate for Accumulators contract if description is set to 1.", + "type": "string" + }, "longcode": { - "description": "The description of contract purchased if description is set to 1", + "description": "[Optional] The description of contract purchased if description is set to 1", + "type": "string" + }, + "multiplier": { + "description": "[Optional] The multiplier for Multiplier contracts if description is set to 1.", "type": "string" }, "payout": { @@ -77,7 +97,7 @@ ] }, "shortcode": { - "description": "Compact description of the contract purchased if description is set to 1", + "description": "[Optional] Compact description of the contract purchased if description is set to 1", "type": "string" }, "transaction_id": { @@ -86,6 +106,14 @@ "examples": [ 10867502908 ] + }, + "underlying_symbol": { + "description": "[Optional] Symbol code if description is set to 1", + "type": "string", + "examples": [ + "R_50", + "frxEURUSD" + ] } } } diff --git a/config/v3/profit_table/send.json b/config/v3/profit_table/send.json index 22e07eec..df9ea284 100644 --- a/config/v3/profit_table/send.json +++ b/config/v3/profit_table/send.json @@ -1,111 +1,124 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Profit Table (request)", - "description": "Retrieve a summary of account Profit Table, according to given search criteria", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["profit_table"], - "properties": { - "profit_table": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_type": { - "description": "Return only contracts of the specified types", - "type": "array", - "items": { - "type": "string", - "enum": [ - "ACCU", - "ASIAND", - "ASIANU", - "CALL", - "CALLE", - "CALLSPREAD", - "DIGITDIFF", - "DIGITEVEN", - "DIGITMATCH", - "DIGITODD", - "DIGITOVER", - "DIGITUNDER", - "EXPIRYMISSE", - "EXPIRYMISS", - "EXPIRYRANGE", - "EXPIRYRANGEE", - "LBFLOATCALL", - "LBFLOATPUT", - "LBHIGHLOW", - "MULTDOWN", - "MULTUP", - "NOTOUCH", - "ONETOUCH", - "PUT", - "PUTE", - "PUTSPREAD", - "RANGE", - "RESETCALL", - "RESETPUT", - "RUNHIGH", - "RUNLOW", - "TICKHIGH", - "TICKLOW", - "UPORDOWN", - "VANILLALONGCALL", - "VANILLALONGPUT", - "TURBOSLONG", - "TURBOSSHORT" - ], - "uniqueItems": true - } - }, - "date_from": { - "description": "[Optional] Start date (epoch or YYYY-MM-DD)", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{1,10})$" - }, - "date_to": { - "description": "[Optional] End date (epoch or YYYY-MM-DD)", - "type": "string", - "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{1,10})$" - }, - "description": { - "description": "[Optional] If set to 1, will return full contracts description.", - "type": "integer", - "enum": [0, 1] - }, - "limit": { - "description": "[Optional] Apply upper limit to count of transactions received.", - "type": "number", - "default": 50, - "maximum": 500, - "minimum": 0 - }, - "offset": { - "description": "[Optional] Number of transactions to skip.", - "type": "integer", - "minimum": 0 - }, - "sort": { - "description": "[Optional] Sort direction.", - "type": "string", - "default": "DESC", - "enum": ["ASC", "DESC"] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Profit Table (request)", + "description": "Retrieve a summary of account Profit Table, according to given search criteria", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "profit_table" + ], + "properties": { + "profit_table": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "contract_type": { + "description": "Return only contracts of the specified types", + "type": "array", + "items": { + "type": "string", + "enum": [ + "ACCU", + "ASIAND", + "ASIANU", + "CALL", + "CALLE", + "CALLSPREAD", + "DIGITDIFF", + "DIGITEVEN", + "DIGITMATCH", + "DIGITODD", + "DIGITOVER", + "DIGITUNDER", + "EXPIRYMISSE", + "EXPIRYMISS", + "EXPIRYRANGE", + "EXPIRYRANGEE", + "LBFLOATCALL", + "LBFLOATPUT", + "LBHIGHLOW", + "MULTDOWN", + "MULTUP", + "NOTOUCH", + "ONETOUCH", + "PUT", + "PUTE", + "PUTSPREAD", + "RANGE", + "RESETCALL", + "RESETPUT", + "RUNHIGH", + "RUNLOW", + "TICKHIGH", + "TICKLOW", + "UPORDOWN", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ], + "uniqueItems": true + } + }, + "date_from": { + "description": "[Optional] Start date (epoch or YYYY-MM-DD)", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{1,10})$" + }, + "date_to": { + "description": "[Optional] End date (epoch or YYYY-MM-DD)", + "type": "string", + "pattern": "^([0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])|[0-9]{1,10})$" + }, + "description": { + "description": "[Optional] If set to 1, will return full contracts description.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit": { + "description": "[Optional] Apply upper limit to count of transactions received.", + "type": "number", + "default": 50, + "maximum": 500, + "minimum": 0 + }, + "offset": { + "description": "[Optional] Number of transactions to skip.", + "type": "integer", + "minimum": 0 + }, + "sort": { + "description": "[Optional] Sort direction.", + "type": "string", + "default": "DESC", + "enum": [ + "ASC", + "DESC" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/proposal/send.json b/config/v3/proposal/send.json index 579b64c1..ea546c7b 100644 --- a/config/v3/proposal/send.json +++ b/config/v3/proposal/send.json @@ -1,180 +1,204 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Price Proposal (request)", - "description": "Gets latest price for a specific contract.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["proposal", "contract_type", "currency", "symbol"], - "properties": { - "proposal": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "amount": { - "description": "[Optional] Proposed contract payout or stake, or multiplier (for lookbacks).", - "type": "number", - "minimum": 0 - }, - "barrier": { - "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" - }, - "barrier2": { - "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" - }, - "barrier_range": { - "description": "[Optional] Barrier range for callputspread.", - "type": "string", - "enum": ["tight", "middle", "wide"] - }, - "basis": { - "description": "[Optional] Indicates type of the `amount`.", - "type": "string", - "enum": ["payout", "stake"] - }, - "cancellation": { - "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", - "type": "string", - "pattern": "^\\w+$" - }, - "contract_type": { - "description": "The proposed contract type", - "type": "string", - "enum": [ - "MULTUP", - "MULTDOWN", - "UPORDOWN", - "EXPIRYRANGE", - "ONETOUCH", - "CALLE", - "LBHIGHLOW", - "ASIAND", - "EXPIRYRANGEE", - "DIGITDIFF", - "DIGITMATCH", - "DIGITOVER", - "PUTE", - "DIGITUNDER", - "NOTOUCH", - "CALL", - "RANGE", - "LBFLOATPUT", - "DIGITODD", - "PUT", - "ASIANU", - "LBFLOATCALL", - "EXPIRYMISSE", - "EXPIRYMISS", - "DIGITEVEN", - "TICKHIGH", - "TICKLOW", - "RESETCALL", - "RESETPUT", - "CALLSPREAD", - "PUTSPREAD", - "RUNHIGH", - "RUNLOW", - "ACCU", - "VANILLALONGCALL", - "VANILLALONGPUT", - "TURBOSLONG", - "TURBOSSHORT" - ] - }, - "currency": { - "description": "This can only be the account-holder's currency (obtained from `payout_currencies` call).", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "date_start": { - "description": "[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity. Either date_expiry or duration is required.", - "type": "integer", - "maximum": 99999999, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit - `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks.", - "type": "string", - "default": "s", - "enum": ["d", "m", "s", "h", "t"] - }, - "growth_rate": { - "description": "[Optional] Growth rate of an accumulator contract.", - "type": "number" - }, - "limit_order": { - "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`, `stop_loss`.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", - "type": "number" - }, - "take_profit": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal (request)", + "description": "Gets latest price for a specific contract.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "proposal", + "contract_type", + "currency", + "symbol" + ], + "properties": { + "proposal": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "[Optional] Proposed contract payout or stake, or multiplier (for lookbacks).", + "type": "number", + "minimum": 0 + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier_range": { + "description": "[Optional] Barrier range for callputspread.", + "type": "string", + "enum": [ + "tight", + "middle", + "wide" + ] + }, + "basis": { + "description": "[Optional] Indicates type of the `amount`.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "cancellation": { + "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", + "type": "string", + "pattern": "^\\w+$" + }, + "contract_type": { + "description": "The proposed contract type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "ACCU", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency (obtained from `payout_currencies` call).", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "date_start": { + "description": "[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity. Either date_expiry or duration is required.", + "type": "integer", + "maximum": 99999999, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit - `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks.", + "type": "string", + "default": "s", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "growth_rate": { + "description": "[Optional] Growth rate of an accumulator contract.", + "type": "number" + }, + "limit_order": { + "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`, `stop_loss`.", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", + "type": "number" + }, + "take_profit": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", + "type": "number" + } + } + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "product_type": { + "description": "[Optional] The product type.", + "type": "string", + "default": "basic", + "enum": [ + "basic" + ] + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for `TICKHIGH` and `TICKLOW` contracts.", + "type": "integer" + }, + "subscribe": { + "description": "[Optional] 1 - to initiate a realtime stream of prices. Note that tick trades (without a user-defined barrier), digit trades and less than 24 hours at-the-money contracts for the following underlying symbols are not streamed: `R_10`, `R_25`, `R_50`, `R_75`, `R_100`, `RDBULL`, `RDBEAR` (this is because their price is constant).", + "type": "integer", + "enum": [ + 1 + ] + }, + "symbol": { + "description": "The short symbol name (obtained from `active_symbols` call).", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "trading_period_start": { + "description": "[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.", + "type": "integer" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "product_type": { - "description": "[Optional] The product type.", - "type": "string", - "default": "basic", - "enum": ["basic"] - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for `TICKHIGH` and `TICKLOW` contracts.", - "type": "integer" - }, - "subscribe": { - "description": "[Optional] 1 - to initiate a realtime stream of prices. Note that tick trades (without a user-defined barrier), digit trades and less than 24 hours at-the-money contracts for the following underlying symbols are not streamed: `R_10`, `R_25`, `R_50`, `R_75`, `R_100`, `RDBULL`, `RDBEAR` (this is because their price is constant).", - "type": "integer", - "enum": [1] - }, - "symbol": { - "description": "The short symbol name (obtained from `active_symbols` call).", - "type": "string", - "pattern": "^\\w{2,30}$" - }, - "trading_period_start": { - "description": "[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.", - "type": "integer" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/proposal_open_contract/receive.json b/config/v3/proposal_open_contract/receive.json index c282466e..124b67e2 100644 --- a/config/v3/proposal_open_contract/receive.json +++ b/config/v3/proposal_open_contract/receive.json @@ -1,585 +1,778 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Price Proposal: Open Contracts (response)", - "description": "Latest price and other details for an open contract in the user's portfolio", - "type": "object", - "required": ["echo_req"], - "properties": { - "proposal_open_contract": { - "title": "proposal_open_contract", - "description": "Latest price and other details for an open contract", - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Account Id", - "type": "number" - }, - "audit_details": { - "title": "Audit details for expired contract.", - "description": "Tick details around contract start and end time.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "all_ticks": { - "description": "Ticks for tick expiry contract from start time till expiry.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - }, - "contract_end": { - "description": "Ticks around contract end time.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - }, - "contract_start": { - "description": "Ticks around contract start time.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal: Open Contracts (response)", + "description": "Latest price and other details for an open contract in the user's portfolio", + "type": "object", + "required": [ + "echo_req" + ], + "properties": { + "proposal_open_contract": { + "title": "proposal_open_contract", + "description": "Latest price and other details for an open contract", + "type": "object", + "additionalProperties": false, + "properties": { + "account_id": { + "description": "Account Id", + "type": "number" + }, + "audit_details": { + "title": "Audit details for expired contract.", + "description": "Tick details around contract start and end time.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "all_ticks": { + "description": "Ticks for tick expiry contract from start time till expiry.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "contract_end": { + "description": "Ticks around contract end time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "contract_start": { + "description": "Ticks around contract start time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + } + } + }, + "barrier": { + "description": "Barrier of the contract (if any).", + "type": [ + "null", + "string" + ], + "examples": [ + "42.123" + ] + }, + "barrier_count": { + "description": "The number of barriers a contract has.", + "type": "number", + "examples": [ + 0, + 1, + 2 + ] + }, + "barrier_spot_distance": { + "description": "[Only for accumulator] Absolute difference between high/low barrier and spot", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + 2.123 + ] + }, + "bid_price": { + "description": "Price at which the contract could be sold back to the company.", + "type": "number", + "examples": [ + 5.14 + ] + }, + "buy_price": { + "description": "Price at which contract was purchased", + "type": "number" + }, + "cancellation": { + "description": "Contains information about contract cancellation option.", + "type": "object", + "additionalProperties": false, + "properties": { + "ask_price": { + "description": "Ask price of contract cancellation option.", + "type": "number" + }, + "date_expiry": { + "description": "Expiry time in epoch for contract cancellation option.", + "type": "integer" + } + } + }, + "commision": { + "description": "Commission in payout currency amount.", + "type": [ + "null", + "number" + ] + }, + "commission": { + "description": "Commission in payout currency amount.", + "type": [ + "null", + "number" + ] + }, + "contract_id": { + "description": "The internal contract identifier", "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - } - } - }, - "barrier": { - "description": "Barrier of the contract (if any).", - "type": ["null", "string"], - "examples": ["42.123"] - }, - "barrier_count": { - "description": "The number of barriers a contract has.", - "type": "number", - "examples": [0, 1, 2] - }, - "barrier_spot_distance": { - "description": "[Only for accumulator] Absolute difference between high/low barrier and spot", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": [2.123] - }, - "bid_price": { - "description": "Price at which the contract could be sold back to the company.", - "type": "number", - "examples": [5.14] - }, - "buy_price": { - "description": "Price at which contract was purchased", - "type": "number" - }, - "cancellation": { - "description": "Contains information about contract cancellation option.", - "type": "object", - "additionalProperties": false, - "properties": { - "ask_price": { - "description": "Ask price of contract cancellation option.", - "type": "number" - }, - "date_expiry": { - "description": "Expiry time in epoch for contract cancellation option.", - "type": "integer" - } - } - }, - "commision": { - "description": "Commission in payout currency amount.", - "type": ["null", "number"] - }, - "commission": { - "description": "Commission in payout currency amount.", - "type": ["null", "number"] - }, - "contract_id": { - "description": "The internal contract identifier", - "type": "integer" - }, - "contract_type": { - "description": "Contract type.", - "type": "string", - "examples": ["CALL", "PUT"] - }, - "currency": { - "description": "The currency code of the contract.", - "type": "string", - "examples": ["USD"] - }, - "current_spot": { - "description": "Spot value if we have license to stream this symbol.", - "type": "number", - "examples": [9874.52] - }, - "current_spot_display_value": { - "description": "Spot value with the correct precision if we have license to stream this symbol.", - "type": "string", - "examples": ["9874.520"] - }, - "current_spot_high_barrier": { - "description": "[Applicable for accumulator] High barrier based on current spot.", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["42.123"] - }, - "current_spot_low_barrier": { - "description": "[Applicable for accumulator] Low barrier based on current spot.", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["42.123"] - }, - "current_spot_time": { - "description": "The corresponding time of the current spot.", - "type": "integer", - "examples": [1439999052] - }, - "date_expiry": { - "description": "Expiry date (epoch) of the Contract. Please note that it is not applicable for tick trade contracts.", - "type": "integer", - "examples": [1446629000] - }, - "date_settlement": { - "description": "Settlement date (epoch) of the contract.", - "type": "integer", - "examples": [1446629000] - }, - "date_start": { - "description": "Start date (epoch) of the contract.", - "type": "integer", - "examples": [1446629000] - }, - "display_name": { - "description": "Display name of underlying", - "type": "string" - }, - "display_number_of_contracts": { - "description": "[Only for vanilla or turbos options] The implied number of contracts", - "type": "string" - }, - "display_value": { - "description": "The `bid_price` with the correct precision", - "type": "string" - }, - "entry_spot": { - "description": "Same as `entry_tick`. For backwards compatibility.", - "type": ["null", "number"] - }, - "entry_spot_display_value": { - "description": "Same as `entry_tick_display_value`. For backwards compatibility.", - "type": ["null", "string"] - }, - "entry_tick": { - "description": "This is the entry spot of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", - "type": "number", - "examples": [86.63] - }, - "entry_tick_display_value": { - "description": "This is the entry spot with the correct precision of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", - "type": "string", - "examples": ["86.630"] - }, - "entry_tick_time": { - "description": "This is the epoch time of the entry tick.", - "type": "integer", - "examples": [1446629000] - }, - "exit_tick": { - "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", - "type": "number", - "examples": [86.81] - }, - "exit_tick_display_value": { - "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", - "type": "string", - "examples": ["86.810"] - }, - "exit_tick_time": { - "description": "This is the epoch time of the exit tick. Note that since certain instruments don't tick every second, the exit tick time may be a few seconds before the end time.", - "type": "integer", - "examples": [1446629000] - }, - "expiry_time": { - "description": "This is the expiry time.", - "type": "integer", - "examples": [1446629000] - }, - "growth_rate": { - "description": "[Only for accumulator] Growth rate of an accumulator contract.", - "type": "number" - }, - "high_barrier": { - "description": "High barrier of the contract (if any).", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["42.123"] - }, - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] - }, - "is_expired": { - "description": "Whether the contract is expired or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_forward_starting": { - "description": "Whether the contract is forward-starting or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_intraday": { - "description": "Whether the contract is an intraday contract.", - "type": "integer", - "enum": [0, 1] - }, - "is_path_dependent": { - "description": "Whether the contract expiry price will depend on the path of the market (e.g. One Touch contract).", - "type": "integer", - "enum": [0, 1] - }, - "is_settleable": { - "description": "Whether the contract is settleable or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_sold": { - "description": "Whether the contract is sold or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_valid_to_cancel": { - "description": "Whether the contract can be cancelled.", - "type": "integer", - "enum": [0, 1] - }, - "is_valid_to_sell": { - "description": "Whether the contract can be sold back to the company.", - "type": "integer", - "enum": [0, 1] - }, - "limit_order": { - "description": "Orders are applicable to `MULTUP` and `MULTDOWN` contracts only.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contains information where the contract will be closed automatically at the loss specified by the user.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Localized display name", - "type": "string" }, - "order_amount": { - "description": "Stop loss amount", - "type": ["null", "number"] + "contract_type": { + "description": "Contract type.", + "type": "string", + "examples": [ + "CALL", + "PUT" + ] }, - "order_date": { - "description": "Stop loss order epoch", - "type": "integer" + "currency": { + "description": "The currency code of the contract.", + "type": "string", + "examples": [ + "USD" + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": ["null", "string"] - } - } - }, - "stop_out": { - "description": "Contains information where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Localized display name", - "type": "string" + "current_spot": { + "description": "Spot value if we have license to stream this symbol.", + "type": "number", + "examples": [ + 9874.52 + ] }, - "order_amount": { - "description": "Stop out amount", - "type": "number" + "current_spot_display_value": { + "description": "Spot value with the correct precision if we have license to stream this symbol.", + "type": "string", + "examples": [ + "9874.520" + ] }, - "order_date": { - "description": "Stop out order epoch", - "type": "integer" + "current_spot_high_barrier": { + "description": "[Applicable for accumulator] High barrier based on current spot.", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "current_spot_low_barrier": { + "description": "[Applicable for accumulator] Low barrier based on current spot.", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "current_spot_time": { + "description": "The corresponding time of the current spot.", + "type": "integer", + "examples": [ + 1439999052 + ] + }, + "date_expiry": { + "description": "Expiry date (epoch) of the Contract. Please note that it is not applicable for tick trade contracts.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "date_settlement": { + "description": "Settlement date (epoch) of the contract.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "date_start": { + "description": "Start date (epoch) of the contract.", + "type": "integer", + "examples": [ + 1446629000 + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": "string" - } - } - }, - "take_profit": { - "description": "Contain information where the contract will be closed automatically at the profit specified by the user.", - "type": "object", - "additionalProperties": false, - "properties": { "display_name": { - "description": "Localized display name", - "type": "string" + "description": "Display name of underlying", + "type": "string" }, - "order_amount": { - "description": "Take profit amount", - "type": ["null", "number"] + "display_number_of_contracts": { + "description": "[Only for vanilla or turbos options] The implied number of contracts", + "type": "string" }, - "order_date": { - "description": "Take profit order epoch", - "type": "integer" + "display_value": { + "description": "The `bid_price` with the correct precision", + "type": "string" }, - "value": { - "description": "Pip-sized barrier value", - "type": ["null", "string"] + "entry_spot": { + "description": "Same as `entry_tick`. For backwards compatibility.", + "type": [ + "null", + "number" + ] + }, + "entry_spot_display_value": { + "description": "Same as `entry_tick_display_value`. For backwards compatibility.", + "type": [ + "null", + "string" + ] + }, + "entry_tick": { + "description": "This is the entry spot of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", + "type": "number", + "examples": [ + 86.63 + ] + }, + "entry_tick_display_value": { + "description": "This is the entry spot with the correct precision of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", + "type": "string", + "examples": [ + "86.630" + ] + }, + "entry_tick_time": { + "description": "This is the epoch time of the entry tick.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "exit_tick": { + "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", + "type": "number", + "examples": [ + 86.81 + ] + }, + "exit_tick_display_value": { + "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", + "type": "string", + "examples": [ + "86.810" + ] + }, + "exit_tick_time": { + "description": "This is the epoch time of the exit tick. Note that since certain instruments don't tick every second, the exit tick time may be a few seconds before the end time.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "expiry_time": { + "description": "This is the expiry time.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "growth_rate": { + "description": "[Only for accumulator] Growth rate of an accumulator contract.", + "type": "number" + }, + "high_barrier": { + "description": "High barrier of the contract (if any).", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + }, + "is_expired": { + "description": "Whether the contract is expired or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_forward_starting": { + "description": "Whether the contract is forward-starting or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_intraday": { + "description": "Whether the contract is an intraday contract.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_path_dependent": { + "description": "Whether the contract expiry price will depend on the path of the market (e.g. One Touch contract).", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_settleable": { + "description": "Whether the contract is settleable or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_sold": { + "description": "Whether the contract is sold or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_valid_to_cancel": { + "description": "Whether the contract can be cancelled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_valid_to_sell": { + "description": "Whether the contract can be sold back to the company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit_order": { + "description": "Orders are applicable to `MULTUP` and `MULTDOWN` contracts only.", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "Contains information where the contract will be closed automatically at the loss specified by the user.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Localized display name", + "type": "string" + }, + "order_amount": { + "description": "Stop loss amount", + "type": [ + "null", + "number" + ] + }, + "order_date": { + "description": "Stop loss order epoch", + "type": "integer" + }, + "value": { + "description": "Pip-sized barrier value", + "type": [ + "null", + "string" + ] + } + } + }, + "stop_out": { + "description": "Contains information where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Localized display name", + "type": "string" + }, + "order_amount": { + "description": "Stop out amount", + "type": "number" + }, + "order_date": { + "description": "Stop out order epoch", + "type": "integer" + }, + "value": { + "description": "Pip-sized barrier value", + "type": "string" + } + } + }, + "take_profit": { + "description": "Contain information where the contract will be closed automatically at the profit specified by the user.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Localized display name", + "type": "string" + }, + "order_amount": { + "description": "Take profit amount", + "type": [ + "null", + "number" + ] + }, + "order_date": { + "description": "Take profit order epoch", + "type": "integer" + }, + "value": { + "description": "Pip-sized barrier value", + "type": [ + "null", + "string" + ] + } + } + } + } + }, + "longcode": { + "description": "Text description of the contract purchased, Example: Win payout if Volatility 100 Index is strictly higher than entry spot at 10 minutes after contract start time.", + "type": "string" + }, + "low_barrier": { + "description": "Low barrier of the contract (if any).", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "40.132" + ] + }, + "multiplier": { + "description": "[Only for lookback trades] Multiplier applies when calculating the final payoff for each type of lookback. e.g. (Exit spot - Lowest historical price) * multiplier = Payout", + "type": "number" + }, + "number_of_contracts": { + "description": "[Only for vanilla or turbos options] The implied number of contracts", + "type": "number" + }, + "payout": { + "description": "Payout value of the contract.", + "type": "number", + "examples": [ + 10.5 + ] + }, + "profit": { + "description": "The latest bid price minus buy price.", + "type": "number" + }, + "profit_percentage": { + "description": "Profit in percentage.", + "type": "number" + }, + "purchase_time": { + "description": "Epoch of purchase time, will be same as `date_start` for all contracts except forward starting contracts.", + "type": "integer" + }, + "reset_barrier": { + "description": "[Only for reset trades i.e. RESETCALL and RESETPUT] Reset barrier of the contract.", + "type": [ + "null", + "string" + ], + "examples": [ + "42.123" + ] + }, + "reset_time": { + "description": "[Only for reset trades i.e. RESETCALL and RESETPUT] The epoch time of a barrier reset.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "selected_spot": { + "description": "Spot value at the selected tick for the contract.", + "type": "number", + "examples": [ + 86.63 + ] + }, + "selected_tick": { + "description": "[Only for highlowticks trades i.e. TICKHIGH and TICKLOW] Selected tick for the contract.", + "type": "integer", + "examples": [ + 3 + ] + }, + "sell_price": { + "description": "Price at which contract was sold, only available when contract has been sold.", + "type": "number" + }, + "sell_spot": { + "description": "Latest spot value at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", + "type": "number", + "examples": [ + 86.63 + ] + }, + "sell_spot_display_value": { + "description": "Latest spot value with the correct precision at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", + "type": "string", + "examples": [ + "86.630" + ] + }, + "sell_spot_time": { + "description": "Epoch time of the sell spot. Note that since certain underlyings don't tick every second, the sell spot time may be a few seconds before the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "sell_time": { + "description": "Epoch time of when the contract was sold (only present for contracts already sold)", + "type": [ + "integer", + "null" + ] + }, + "shortcode": { + "description": "Coded description of the contract purchased.", + "type": "string", + "examples": [ + "CALL_R_100_90_1446704187_1446704787_S0P_0" + ] + }, + "status": { + "title": "Contract status", + "description": "Contract status. Will be `sold` if the contract was sold back before expiry, `won` if won and `lost` if lost at expiry. Otherwise will be `open`", + "type": [ + "null", + "string" + ], + "enum": [ + "open", + "sold", + "won", + "lost", + "cancelled", + null + ] + }, + "tick_count": { + "description": "Only for tick trades, number of ticks", + "type": "integer" + }, + "tick_passed": { + "description": "[Only for accumulator] Number of ticks passed since entry_tick", + "type": "integer", + "examples": [ + 500 + ] + }, + "tick_stream": { + "description": "Tick stream from entry to end time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "transaction_ids": { + "title": "Transaction ids for contract", + "description": "Every contract has buy and sell transaction ids, i.e. when you purchase a contract we associate it with buy transaction id, and if contract is already sold we associate that with sell transaction id.", + "type": "object", + "additionalProperties": false, + "properties": { + "buy": { + "description": "Buy transaction ID for that contract", + "type": "integer" + }, + "sell": { + "description": "Sell transaction ID for that contract, only present when contract is already sold.", + "type": "integer" + } + } + }, + "underlying": { + "description": "The underlying symbol code.", + "type": "string", + "examples": [ + "R_50" + ] + }, + "validation_error": { + "description": "Error message if validation fails", + "type": "string" + }, + "validation_error_code": { + "description": "Error code if validation fails", + "type": "string" } - } } - } - }, - "longcode": { - "description": "Text description of the contract purchased, Example: Win payout if Volatility 100 Index is strictly higher than entry spot at 10 minutes after contract start time.", - "type": "string" - }, - "low_barrier": { - "description": "Low barrier of the contract (if any).", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["40.132"] - }, - "multiplier": { - "description": "[Only for lookback trades] Multiplier applies when calculating the final payoff for each type of lookback. e.g. (Exit spot - Lowest historical price) * multiplier = Payout", - "type": "number" - }, - "number_of_contracts": { - "description": "[Only for vanilla or turbos options] The implied number of contracts", - "type": "number" - }, - "payout": { - "description": "Payout value of the contract.", - "type": "number", - "examples": [10.5] - }, - "profit": { - "description": "The latest bid price minus buy price.", - "type": "number" - }, - "profit_percentage": { - "description": "Profit in percentage.", - "type": "number" }, - "purchase_time": { - "description": "Epoch of purchase time, will be same as `date_start` for all contracts except forward starting contracts.", - "type": "integer" - }, - "reset_barrier": { - "description": "[Only for reset trades i.e. RESETCALL and RESETPUT] Reset barrier of the contract.", - "type": ["null", "string"], - "examples": ["42.123"] - }, - "reset_time": { - "description": "[Only for reset trades i.e. RESETCALL and RESETPUT] The epoch time of a barrier reset.", - "type": "integer", - "examples": [1446629000] - }, - "selected_spot": { - "description": "Spot value at the selected tick for the contract.", - "type": "number", - "examples": [86.63] - }, - "selected_tick": { - "description": "[Only for highlowticks trades i.e. TICKHIGH and TICKLOW] Selected tick for the contract.", - "type": "integer", - "examples": [3] - }, - "sell_price": { - "description": "Price at which contract was sold, only available when contract has been sold.", - "type": "number" - }, - "sell_spot": { - "description": "Latest spot value at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "number", - "examples": [86.63] - }, - "sell_spot_display_value": { - "description": "Latest spot value with the correct precision at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "string", - "examples": ["86.630"] - }, - "sell_spot_time": { - "description": "Epoch time of the sell spot. Note that since certain underlyings don't tick every second, the sell spot time may be a few seconds before the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "integer", - "examples": [1446629000] - }, - "sell_time": { - "description": "Epoch time of when the contract was sold (only present for contracts already sold)", - "type": ["integer", "null"] - }, - "shortcode": { - "description": "Coded description of the contract purchased.", - "type": "string", - "examples": ["CALL_R_100_90_1446704187_1446704787_S0P_0"] - }, - "status": { - "title": "Contract status", - "description": "Contract status. Will be `sold` if the contract was sold back before expiry, `won` if won and `lost` if lost at expiry. Otherwise will be `open`", - "type": ["null", "string"], - "enum": ["open", "sold", "won", "lost", "cancelled", null] - }, - "tick_count": { - "description": "Only for tick trades, number of ticks", - "type": "integer" - }, - "tick_passed": { - "description": "[Only for accumulator] Number of ticks passed since entry_tick", - "type": "integer", - "examples": [500] - }, - "tick_stream": { - "description": "Tick stream from entry to end time.", - "type": "array", - "items": { + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", "type": "object", "additionalProperties": false, + "required": [ + "id" + ], "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - }, - "transaction_ids": { - "title": "Transaction ids for contract", - "description": "Every contract has buy and sell transaction ids, i.e. when you purchase a contract we associate it with buy transaction id, and if contract is already sold we associate that with sell transaction id.", - "type": "object", - "additionalProperties": false, - "properties": { - "buy": { - "description": "Buy transaction ID for that contract", - "type": "integer" - }, - "sell": { - "description": "Sell transaction ID for that contract, only present when contract is already sold.", - "type": "integer" + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + } } - } }, - "underlying": { - "description": "The underlying symbol code.", - "type": "string", - "examples": ["R_50"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "validation_error": { - "description": "Error message if validation fails", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "proposal_open_contract" + ] }, - "validation_error_code": { - "description": "Error code if validation fails", - "type": "string" - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["proposal_open_contract"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/proposal_open_contract/send.json b/config/v3/proposal_open_contract/send.json index 099c1a7c..a326245e 100644 --- a/config/v3/proposal_open_contract/send.json +++ b/config/v3/proposal_open_contract/send.json @@ -1,39 +1,48 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Price Proposal: Open Contracts (request)", - "description": "Get latest price (and other information) for a contract in the user's portfolio", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["proposal_open_contract"], - "properties": { - "proposal_open_contract": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_id": { - "description": "[Optional] Contract ID received from a `portfolio` request. If not set, you will receive stream of all open contracts.", - "type": "integer" - }, - "subscribe": { - "description": "[Optional] `1` to stream.", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal: Open Contracts (request)", + "description": "Get latest price (and other information) for a contract in the user's portfolio", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "proposal_open_contract" + ], + "properties": { + "proposal_open_contract": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "contract_id": { + "description": "[Optional] Contract ID received from a `portfolio` request. If not set, you will receive stream of all open contracts.", + "type": "integer" + }, + "subscribe": { + "description": "[Optional] `1` to stream.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/reality_check/send.json b/config/v3/reality_check/send.json index dd555398..db176b83 100644 --- a/config/v3/reality_check/send.json +++ b/config/v3/reality_check/send.json @@ -1,30 +1,37 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Reality Check (request)", - "description": "Retrieve summary of client's trades and account for the Reality Check facility. A 'reality check' means a display of time elapsed since the session began, and associated client profit/loss. The Reality Check facility is a regulatory requirement for certain landing companies.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["reality_check"], - "properties": { - "reality_check": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Reality Check (request)", + "description": "Retrieve summary of client's trades and account for the Reality Check facility. A 'reality check' means a display of time elapsed since the session began, and associated client profit/loss. The Reality Check facility is a regulatory requirement for certain landing companies.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "reality_check" + ], + "properties": { + "reality_check": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/residence_list/send.json b/config/v3/residence_list/send.json index 5c25d82d..c25b22e8 100644 --- a/config/v3/residence_list/send.json +++ b/config/v3/residence_list/send.json @@ -1,24 +1,28 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Countries List (request)", - "description": "This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["residence_list"], - "properties": { - "residence_list": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Countries List (request)", + "description": "This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "residence_list" + ], + "properties": { + "residence_list": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/revoke_oauth_app/send.json b/config/v3/revoke_oauth_app/send.json index 88d93591..5e5906d4 100644 --- a/config/v3/revoke_oauth_app/send.json +++ b/config/v3/revoke_oauth_app/send.json @@ -1,29 +1,33 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Revoke Oauth Application (request)", - "description": "Used for revoking access of particular app.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["revoke_oauth_app"], - "properties": { - "revoke_oauth_app": { - "description": "The application ID to revoke.", - "type": "integer" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Revoke Oauth Application (request)", + "description": "Used for revoking access of particular app.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "revoke_oauth_app" + ], + "properties": { + "revoke_oauth_app": { + "description": "The application ID to revoke.", + "type": "integer" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell/send.json b/config/v3/sell/send.json index 62944d51..5dc0bed2 100644 --- a/config/v3/sell/send.json +++ b/config/v3/sell/send.json @@ -1,33 +1,38 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Contract (request)", - "description": "Sell a Contract as identified from a previous `portfolio` call.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["sell", "price"], - "properties": { - "sell": { - "description": "Pass contract_id received from the `portfolio` call.", - "type": "integer" - }, - "price": { - "description": "Minimum price at which to sell the contract, or `0` for 'sell at market'.", - "type": "number" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Contract (request)", + "description": "Sell a Contract as identified from a previous `portfolio` call.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "sell", + "price" + ], + "properties": { + "sell": { + "description": "Pass contract_id received from the `portfolio` call.", + "type": "integer" + }, + "price": { + "description": "Minimum price at which to sell the contract, or `0` for 'sell at market'.", + "type": "number" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell_contract_for_multiple_accounts/send.json b/config/v3/sell_contract_for_multiple_accounts/send.json index ba692929..9602f394 100644 --- a/config/v3/sell_contract_for_multiple_accounts/send.json +++ b/config/v3/sell_contract_for_multiple_accounts/send.json @@ -1,48 +1,57 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Contracts: Multiple Accounts (request)", - "description": "Sell contracts for multiple accounts simultaneously. Uses the shortcode response from `buy_contract_for_multiple_accounts` to identify the contract, and authorisation tokens to select which accounts to sell those contracts on. Note that only the accounts identified by the tokens will be affected. This will not sell the contract on the currently-authorised account unless you include the token for the current account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["sell_contract_for_multiple_accounts", "price", "shortcode", "tokens"], - "properties": { - "sell_contract_for_multiple_accounts": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "price": { - "description": "Minimum price at which to sell the contract, or `0` for 'sell at market'.", - "type": "number" - }, - "shortcode": { - "description": "An internal ID used to identify the contract which was originally bought. This is returned from the `buy` and `buy_contract_for_multiple_accounts` calls.", - "type": "string", - "pattern": "^([A-Za-z0-9_.-]+)$" - }, - "tokens": { - "description": "Authorisation tokens which select the accounts to sell use for the affected accounts.", - "type": "array", - "items": { - "type": "string", - "pattern": "^([a-zA-Z0-9-]+)$" - }, - "sensitive": 1 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Contracts: Multiple Accounts (request)", + "description": "Sell contracts for multiple accounts simultaneously. Uses the shortcode response from `buy_contract_for_multiple_accounts` to identify the contract, and authorisation tokens to select which accounts to sell those contracts on. Note that only the accounts identified by the tokens will be affected. This will not sell the contract on the currently-authorised account unless you include the token for the current account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "sell_contract_for_multiple_accounts", + "price", + "shortcode", + "tokens" + ], + "properties": { + "sell_contract_for_multiple_accounts": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "price": { + "description": "Minimum price at which to sell the contract, or `0` for 'sell at market'.", + "type": "number" + }, + "shortcode": { + "description": "An internal ID used to identify the contract which was originally bought. This is returned from the `buy` and `buy_contract_for_multiple_accounts` calls.", + "type": "string", + "pattern": "^([A-Za-z0-9_.-]+)$" + }, + "tokens": { + "description": "Authorisation tokens which select the accounts to sell use for the affected accounts.", + "type": "array", + "items": { + "type": "string", + "pattern": "^([a-zA-Z0-9-]+)$" + }, + "sensitive": 1 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell_expired/send.json b/config/v3/sell_expired/send.json index 95d9e3ae..17687491 100644 --- a/config/v3/sell_expired/send.json +++ b/config/v3/sell_expired/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Expired Contracts (request)", - "description": "This call will try to sell any expired contracts and return the number of sold contracts.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["sell_expired"], - "properties": { - "sell_expired": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Expired Contracts (request)", + "description": "This call will try to sell any expired contracts and return the number of sold contracts.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "sell_expired" + ], + "properties": { + "sell_expired": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_account_currency/send.json b/config/v3/set_account_currency/send.json index 11b1597f..2f2e73e7 100644 --- a/config/v3/set_account_currency/send.json +++ b/config/v3/set_account_currency/send.json @@ -1,30 +1,34 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Currency (request)", - "description": "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.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_account_currency"], - "properties": { - "set_account_currency": { - "description": "Currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Currency (request)", + "description": "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.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_account_currency" + ], + "properties": { + "set_account_currency": { + "description": "Currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_financial_assessment/send.json b/config/v3/set_financial_assessment/send.json index 4f3b937f..c7095e49 100644 --- a/config/v3/set_financial_assessment/send.json +++ b/config/v3/set_financial_assessment/send.json @@ -1,495 +1,566 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Financial Assessment (request)", - "description": "This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_financial_assessment"], - "properties": { - "set_financial_assessment": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "binary_options_trading_experience": { - "description": "[Optional] Binary options trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "binary_options_trading_frequency": { - "description": "[Optional] Binary options trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "cfd_trading_experience": { - "description": "[Optional] CFDs trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "cfd_trading_frequency": { - "description": "[Optional] CFDs trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "education_level": { - "description": "[Optional] Level of Education.", - "type": "string", - "enum": ["Primary", "Secondary", "Tertiary"] - }, - "employment_industry": { - "description": "[Optional] Industry of Employment.", - "type": "string", - "enum": [ - "Construction", - "Education", - "Finance", - "Health", - "Tourism", - "Information & Communications Technology", - "Science & Engineering", - "Legal", - "Social & Cultural", - "Agriculture", - "Real Estate", - "Food Services", - "Manufacturing", - "Unemployed" - ] - }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "estimated_worth": { - "description": "[Optional] Estimated Net Worth.", - "type": "string", - "enum": [ - "Less than $100,000", - "$100,000 - $250,000", - "$250,001 - $500,000", - "$500,001 - $1,000,000", - "Over $1,000,000" - ] - }, - "financial_information": { - "description": "[Optional] The financial information of a client", - "type": "object", - "additionalProperties": false, - "required": [ - "education_level", - "employment_industry", - "estimated_worth", - "income_source", - "net_income", - "occupation" - ], - "properties": { - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "education_level": { - "description": "Level of Education.", - "type": "string", - "enum": ["Primary", "Secondary", "Tertiary"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Financial Assessment (request)", + "description": "This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_financial_assessment" + ], + "properties": { + "set_financial_assessment": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "employment_industry": { - "description": "Industry of Employment.", - "type": "string", - "enum": [ - "Construction", - "Education", - "Finance", - "Health", - "Tourism", - "Information & Communications Technology", - "Science & Engineering", - "Legal", - "Social & Cultural", - "Agriculture", - "Real Estate", - "Food Services", - "Manufacturing", - "Unemployed" - ] + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] + "binary_options_trading_experience": { + "description": "[Optional] Binary options trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "estimated_worth": { - "description": "Estimated Net Worth.", - "type": "string", - "enum": [ - "Less than $100,000", - "$100,000 - $250,000", - "$250,001 - $500,000", - "$500,001 - $1,000,000", - "Over $1,000,000" - ] + "binary_options_trading_frequency": { + "description": "[Optional] Binary options trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "income_source": { - "description": "Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] + "cfd_trading_experience": { + "description": "[Optional] CFDs trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "net_income": { - "description": "Net Annual Income.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] + "cfd_trading_frequency": { + "description": "[Optional] CFDs trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "occupation": { - "description": "Occupation.", - "type": "string", - "enum": [ - "Chief Executives, Senior Officials and Legislators", - "Managers", - "Professionals", - "Clerks", - "Personal Care, Sales and Service Workers", - "Agricultural, Forestry and Fishery Workers", - "Craft, Metal, Electrical and Electronics Workers", - "Plant and Machine Operators and Assemblers", - "Cleaners and Helpers", - "Mining, Construction, Manufacturing and Transport Workers", - "Armed Forces", - "Government Officers", - "Students", - "Unemployed" - ] + "education_level": { + "description": "[Optional] Level of Education.", + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] }, - "source_of_wealth": { - "description": "[Optional] Source of wealth.", - "type": "string", - "enum": [ - "Accumulation of Income/Savings", - "Cash Business", - "Company Ownership", - "Divorce Settlement", - "Inheritance", - "Investment Income", - "Sale of Property" - ] - } - } - }, - "forex_trading_experience": { - "description": "[Optional] Forex trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "forex_trading_frequency": { - "description": "[Optional] Forex trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "income_source": { - "description": "[Optional] Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] - }, - "net_income": { - "description": "[Optional] Net Annual Income.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "occupation": { - "description": "[Optional] Occupation.", - "type": "string", - "enum": [ - "Chief Executives, Senior Officials and Legislators", - "Managers", - "Professionals", - "Clerks", - "Personal Care, Sales and Service Workers", - "Agricultural, Forestry and Fishery Workers", - "Craft, Metal, Electrical and Electronics Workers", - "Plant and Machine Operators and Assemblers", - "Cleaners and Helpers", - "Mining, Construction, Manufacturing and Transport Workers", - "Armed Forces", - "Government Officers", - "Students", - "Unemployed" - ] - }, - "other_instruments_trading_experience": { - "description": "[Optional] Trading experience in other financial instruments.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "other_instruments_trading_frequency": { - "description": "[Optional] Trading frequency in other financial instruments.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "source_of_wealth": { - "description": "[Optional] Source of wealth.", - "type": "string", - "enum": [ - "Accumulation of Income/Savings", - "Cash Business", - "Company Ownership", - "Divorce Settlement", - "Inheritance", - "Investment Income", - "Sale of Property" - ] - }, - "trading_experience": { - "description": "[Optional] The trading experience of a client", - "type": "object", - "additionalProperties": false, - "properties": { - "binary_options_trading_experience": { - "description": "[Optional] Binary options trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "employment_industry": { + "description": "[Optional] Industry of Employment.", + "type": "string", + "enum": [ + "Construction", + "Education", + "Finance", + "Health", + "Tourism", + "Information & Communications Technology", + "Science & Engineering", + "Legal", + "Social & Cultural", + "Agriculture", + "Real Estate", + "Food Services", + "Manufacturing", + "Unemployed" + ] }, - "binary_options_trading_frequency": { - "description": "[Optional] Binary options trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] }, - "cfd_trading_experience": { - "description": "[Optional] CFDs trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "estimated_worth": { + "description": "[Optional] Estimated Net Worth.", + "type": "string", + "enum": [ + "Less than $100,000", + "$100,000 - $250,000", + "$250,001 - $500,000", + "$500,001 - $1,000,000", + "Over $1,000,000" + ] }, - "cfd_trading_frequency": { - "description": "[Optional] CFDs trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "financial_information": { + "description": "[Optional] The financial information of a client", + "type": "object", + "additionalProperties": false, + "required": [ + "education_level", + "employment_industry", + "estimated_worth", + "income_source", + "net_income", + "occupation" + ], + "properties": { + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "education_level": { + "description": "Level of Education.", + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "employment_industry": { + "description": "Industry of Employment.", + "type": "string", + "enum": [ + "Construction", + "Education", + "Finance", + "Health", + "Tourism", + "Information & Communications Technology", + "Science & Engineering", + "Legal", + "Social & Cultural", + "Agriculture", + "Real Estate", + "Food Services", + "Manufacturing", + "Unemployed" + ] + }, + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "estimated_worth": { + "description": "Estimated Net Worth.", + "type": "string", + "enum": [ + "Less than $100,000", + "$100,000 - $250,000", + "$250,001 - $500,000", + "$500,001 - $1,000,000", + "Over $1,000,000" + ] + }, + "income_source": { + "description": "Income Source.", + "type": "string", + "enum": [ + "Salaried Employee", + "Self-Employed", + "Investments & Dividends", + "Pension", + "State Benefits", + "Savings & Inheritance" + ] + }, + "net_income": { + "description": "Net Annual Income.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "occupation": { + "description": "Occupation.", + "type": "string", + "enum": [ + "Chief Executives, Senior Officials and Legislators", + "Managers", + "Professionals", + "Clerks", + "Personal Care, Sales and Service Workers", + "Agricultural, Forestry and Fishery Workers", + "Craft, Metal, Electrical and Electronics Workers", + "Plant and Machine Operators and Assemblers", + "Cleaners and Helpers", + "Mining, Construction, Manufacturing and Transport Workers", + "Armed Forces", + "Government Officers", + "Students", + "Unemployed" + ] + }, + "source_of_wealth": { + "description": "[Optional] Source of wealth.", + "type": "string", + "enum": [ + "Accumulation of Income/Savings", + "Cash Business", + "Company Ownership", + "Divorce Settlement", + "Inheritance", + "Investment Income", + "Sale of Property" + ] + } + } }, "forex_trading_experience": { - "description": "[Optional] Forex trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "description": "[Optional] Forex trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, "forex_trading_frequency": { - "description": "[Optional] Forex trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "description": "[Optional] Forex trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "other_instruments_trading_experience": { - "description": "[Optional] Trading experience in other financial instruments.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "income_source": { + "description": "[Optional] Income Source.", + "type": "string", + "enum": [ + "Salaried Employee", + "Self-Employed", + "Investments & Dividends", + "Pension", + "State Benefits", + "Savings & Inheritance" + ] }, - "other_instruments_trading_frequency": { - "description": "[Optional] Trading frequency in other financial instruments.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - } - } - }, - "trading_experience_regulated": { - "description": "[Optional] The trading experience of a `maltainvest` client", - "type": "object", - "additionalProperties": false, - "required": [ - "cfd_experience", - "cfd_frequency", - "cfd_trading_definition", - "leverage_impact_trading", - "leverage_trading_high_risk_stop_loss", - "required_initial_margin", - "risk_tolerance", - "source_of_experience", - "trading_experience_financial_instruments", - "trading_frequency_financial_instruments" - ], - "properties": { - "cfd_experience": { - "description": "How much experience do you have in CFD trading?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] + "net_income": { + "description": "[Optional] Net Annual Income.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] }, - "cfd_frequency": { - "description": "How many CFD trades have you placed in the past 12 months?", - "type": "string", - "enum": [ - "No transactions in the past 12 months", - "1 - 5 transactions in the past 12 months", - "6 - 10 transactions in the past 12 months", - "11 - 39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "occupation": { + "description": "[Optional] Occupation.", + "type": "string", + "enum": [ + "Chief Executives, Senior Officials and Legislators", + "Managers", + "Professionals", + "Clerks", + "Personal Care, Sales and Service Workers", + "Agricultural, Forestry and Fishery Workers", + "Craft, Metal, Electrical and Electronics Workers", + "Plant and Machine Operators and Assemblers", + "Cleaners and Helpers", + "Mining, Construction, Manufacturing and Transport Workers", + "Armed Forces", + "Government Officers", + "Students", + "Unemployed" + ] }, - "cfd_trading_definition": { - "description": "In your understanding, CFD trading allows you to:", - "type": "string", - "enum": [ - "Purchase shares of a company or physical commodities.", - "Place a bet on the price movement.", - "Speculate on the price movement.", - "Make a long-term investment." - ] + "other_instruments_trading_experience": { + "description": "[Optional] Trading experience in other financial instruments.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "leverage_impact_trading": { - "description": "How does leverage affect CFD trading?", - "type": "string", - "enum": [ - "Leverage is a risk mitigation technique.", - "Leverage prevents you from opening large positions.", - "Leverage guarantees profits.", - "Leverage lets you open larger positions for a fraction of the trade's value." - ] + "other_instruments_trading_frequency": { + "description": "[Optional] Trading frequency in other financial instruments.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "leverage_trading_high_risk_stop_loss": { - "description": "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", - "type": "string", - "enum": [ - "Cancel your trade at any time within a chosen timeframe.", - "Close your trade automatically when the loss is more than or equal to a specific amount.", - "Close your trade automatically when the profit is more than or equal to a specific amount.", - "Make a guaranteed profit on your trade." - ] + "source_of_wealth": { + "description": "[Optional] Source of wealth.", + "type": "string", + "enum": [ + "Accumulation of Income/Savings", + "Cash Business", + "Company Ownership", + "Divorce Settlement", + "Inheritance", + "Investment Income", + "Sale of Property" + ] }, - "required_initial_margin": { - "description": "When would you be required to pay an initial margin?", - "type": "string", - "enum": [ - "When opening a Leveraged CFD trade.", - "When trading Multipliers.", - "When buying shares of a company.", - "All of the above." - ] + "trading_experience": { + "description": "[Optional] The trading experience of a client", + "type": "object", + "additionalProperties": false, + "properties": { + "binary_options_trading_experience": { + "description": "[Optional] Binary options trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] + }, + "binary_options_trading_frequency": { + "description": "[Optional] Binary options trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "cfd_trading_experience": { + "description": "[Optional] CFDs trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] + }, + "cfd_trading_frequency": { + "description": "[Optional] CFDs trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "forex_trading_experience": { + "description": "[Optional] Forex trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] + }, + "forex_trading_frequency": { + "description": "[Optional] Forex trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "other_instruments_trading_experience": { + "description": "[Optional] Trading experience in other financial instruments.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] + }, + "other_instruments_trading_frequency": { + "description": "[Optional] Trading frequency in other financial instruments.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + } + } }, - "risk_tolerance": { - "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", - "type": "string", - "enum": ["Yes", "No"] + "trading_experience_regulated": { + "description": "[Optional] The trading experience of a `maltainvest` client", + "type": "object", + "additionalProperties": false, + "required": [ + "cfd_experience", + "cfd_frequency", + "cfd_trading_definition", + "leverage_impact_trading", + "leverage_trading_high_risk_stop_loss", + "required_initial_margin", + "risk_tolerance", + "source_of_experience", + "trading_experience_financial_instruments", + "trading_frequency_financial_instruments" + ], + "properties": { + "cfd_experience": { + "description": "How much experience do you have in CFD trading?", + "type": "string", + "enum": [ + "No experience", + "Less than a year", + "1 - 2 years", + "Over 3 years" + ] + }, + "cfd_frequency": { + "description": "How many CFD trades have you placed in the past 12 months?", + "type": "string", + "enum": [ + "No transactions in the past 12 months", + "1 - 5 transactions in the past 12 months", + "6 - 10 transactions in the past 12 months", + "11 - 39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + }, + "cfd_trading_definition": { + "description": "In your understanding, CFD trading allows you to:", + "type": "string", + "enum": [ + "Purchase shares of a company or physical commodities.", + "Place a bet on the price movement.", + "Speculate on the price movement.", + "Make a long-term investment." + ] + }, + "leverage_impact_trading": { + "description": "How does leverage affect CFD trading?", + "type": "string", + "enum": [ + "Leverage is a risk mitigation technique.", + "Leverage prevents you from opening large positions.", + "Leverage guarantees profits.", + "Leverage lets you open larger positions for a fraction of the trade's value." + ] + }, + "leverage_trading_high_risk_stop_loss": { + "description": "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", + "type": "string", + "enum": [ + "Cancel your trade at any time within a chosen timeframe.", + "Close your trade automatically when the loss is more than or equal to a specific amount.", + "Close your trade automatically when the profit is more than or equal to a specific amount.", + "Make a guaranteed profit on your trade." + ] + }, + "required_initial_margin": { + "description": "When would you be required to pay an initial margin?", + "type": "string", + "enum": [ + "When opening a Leveraged CFD trade.", + "When trading Multipliers.", + "When buying shares of a company.", + "All of the above." + ] + }, + "risk_tolerance": { + "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", + "type": "string", + "enum": [ + "Yes", + "No" + ] + }, + "source_of_experience": { + "description": "How much knowledge and experience do you have in relation to online trading?", + "type": "string", + "enum": [ + "I have an academic degree, professional certification, and/or work experience.", + "I trade forex CFDs and other complex financial instruments.", + "I have attended seminars, training, and/or workshops.", + "I have little experience.", + "I have no knowledge." + ] + }, + "trading_experience_financial_instruments": { + "description": "How much experience do you have with other financial instruments?", + "type": "string", + "enum": [ + "No experience", + "Less than a year", + "1 - 2 years", + "Over 3 years" + ] + }, + "trading_frequency_financial_instruments": { + "description": "How many trades have you placed with other financial instruments in the past 12 months?", + "type": "string", + "enum": [ + "No transactions in the past 12 months", + "1 - 5 transactions in the past 12 months", + "6 - 10 transactions in the past 12 months", + "11 - 39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] + } + } }, - "source_of_experience": { - "description": "How much knowledge and experience do you have in relation to online trading?", - "type": "string", - "enum": [ - "I have an academic degree, professional certification, and/or work experience.", - "I trade forex CFDs and other complex financial instruments.", - "I have attended seminars, training, and/or workshops.", - "I have little experience.", - "I have no knowledge." - ] + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" }, - "trading_experience_financial_instruments": { - "description": "How much experience do you have with other financial instruments?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" }, - "trading_frequency_financial_instruments": { - "description": "How many trades have you placed with other financial instruments in the past 12 months?", - "type": "string", - "enum": [ - "No transactions in the past 12 months", - "1 - 5 transactions in the past 12 months", - "6 - 10 transactions in the past 12 months", - "11 - 39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/set_self_exclusion/send.json b/config/v3/set_self_exclusion/send.json index d2161cb6..6b9c2a59 100644 --- a/config/v3/set_self_exclusion/send.json +++ b/config/v3/set_self_exclusion/send.json @@ -1,92 +1,140 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Self-Exclusion (request)", - "description": "Set Self-Exclusion (this call should be used in conjunction with `get_self_exclusion`)", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_self_exclusion"], - "properties": { - "set_self_exclusion": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "exclude_until": { - "description": "[Optional] Exclude me from the website (for a minimum of 6 months, up to a maximum of 5 years). Note: uplifting this self-exclusion may require contacting the company.", - "type": ["null", "string"], - "pattern": "^[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$" - }, - "max_30day_deposit": { - "description": "[Optional] 7-day limit on deposits.", - "type": ["null", "number"] - }, - "max_30day_losses": { - "description": "[Optional] 30-day limit on losses.", - "type": ["null", "number"] - }, - "max_30day_turnover": { - "description": "[Optional] 30-day turnover limit.", - "type": ["null", "number"] - }, - "max_7day_deposit": { - "description": "[Optional] 7-day limit on deposits.", - "type": ["null", "number"] - }, - "max_7day_losses": { - "description": "[Optional] 7-day limit on losses.", - "type": ["null", "number"] - }, - "max_7day_turnover": { - "description": "[Optional] 7-day turnover limit.", - "type": ["null", "number"] - }, - "max_balance": { - "description": "[Optional] Maximum account cash balance.", - "type": ["null", "number"] - }, - "max_deposit": { - "description": "[Optional] Daily deposit limit.", - "type": ["null", "number"] - }, - "max_losses": { - "description": "[Optional] Daily limit on losses.", - "type": ["null", "number"] - }, - "max_open_bets": { - "description": "[Optional] Maximum number of open positions.", - "type": ["integer", "null"], - "minimum": 0 - }, - "max_turnover": { - "description": "[Optional] Daily turnover limit.", - "type": ["null", "number"] - }, - "session_duration_limit": { - "description": "[Optional] Session duration limit, in minutes.", - "type": ["integer", "null"], - "maximum": 99999, - "minimum": 0 - }, - "timeout_until": { - "description": "[Optional] Exclude me from the website (for up to 6 weeks). Requires time in epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted automatically at the expiry of the timeout period.", - "type": ["integer", "null"], - "maximum": 9999999999, - "minimum": 0 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Self-Exclusion (request)", + "description": "Set Self-Exclusion (this call should be used in conjunction with `get_self_exclusion`)", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_self_exclusion" + ], + "properties": { + "set_self_exclusion": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "exclude_until": { + "description": "[Optional] Exclude me from the website (for a minimum of 6 months, up to a maximum of 5 years). Note: uplifting this self-exclusion may require contacting the company.", + "type": [ + "null", + "string" + ], + "pattern": "^[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$" + }, + "max_30day_deposit": { + "description": "[Optional] 7-day limit on deposits.", + "type": [ + "null", + "number" + ] + }, + "max_30day_losses": { + "description": "[Optional] 30-day limit on losses.", + "type": [ + "null", + "number" + ] + }, + "max_30day_turnover": { + "description": "[Optional] 30-day turnover limit.", + "type": [ + "null", + "number" + ] + }, + "max_7day_deposit": { + "description": "[Optional] 7-day limit on deposits.", + "type": [ + "null", + "number" + ] + }, + "max_7day_losses": { + "description": "[Optional] 7-day limit on losses.", + "type": [ + "null", + "number" + ] + }, + "max_7day_turnover": { + "description": "[Optional] 7-day turnover limit.", + "type": [ + "null", + "number" + ] + }, + "max_balance": { + "description": "[Optional] Maximum account cash balance.", + "type": [ + "null", + "number" + ] + }, + "max_deposit": { + "description": "[Optional] Daily deposit limit.", + "type": [ + "null", + "number" + ] + }, + "max_losses": { + "description": "[Optional] Daily limit on losses.", + "type": [ + "null", + "number" + ] + }, + "max_open_bets": { + "description": "[Optional] Maximum number of open positions.", + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "max_turnover": { + "description": "[Optional] Daily turnover limit.", + "type": [ + "null", + "number" + ] + }, + "session_duration_limit": { + "description": "[Optional] Session duration limit, in minutes.", + "type": [ + "integer", + "null" + ], + "maximum": 99999, + "minimum": 0 + }, + "timeout_until": { + "description": "[Optional] Exclude me from the website (for up to 6 weeks). Requires time in epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted automatically at the expiry of the timeout period.", + "type": [ + "integer", + "null" + ], + "maximum": 9999999999, + "minimum": 0 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_settings/send.json b/config/v3/set_settings/send.json index 2017c2d6..c15bf53c 100644 --- a/config/v3/set_settings/send.json +++ b/config/v3/set_settings/send.json @@ -1,186 +1,242 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Settings (request)", - "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_settings"], - "properties": { - "set_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_opening_reason": { - "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", - "type": "string", - "enum": ["Speculative", "Income Earning", "Hedging", "Peer-to-peer exchange"] - }, - "address_city": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{1,35}$" - }, - "address_line_1": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{1,70}$" - }, - "address_line_2": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": ["null", "string"], - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" - }, - "address_postcode": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" - }, - "address_state": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" - }, - "allow_copiers": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", - "type": "integer", - "enum": [0, 1] - }, - "citizen": { - "description": "[Optional] Country of legal citizenship, 2-letter country code.", - "type": ["null", "string"], - "pattern": "^([a-z]{2})?$" - }, - "date_of_birth": { - "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" - }, - "dxtrade_user_exception": { - "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", - "type": "integer", - "enum": [0, 1] - }, - "email_consent": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", - "type": "integer", - "enum": [0, 1] - }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "feature_flag": { - "description": "[Optional] Enable or disable one or multiple features.", - "type": "object", - "additionalProperties": false, - "properties": { - "wallet": { - "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", - "type": "integer", - "enum": [0, 1] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Settings (request)", + "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_settings" + ], + "properties": { + "set_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_opening_reason": { + "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", + "type": "string", + "enum": [ + "Speculative", + "Income Earning", + "Hedging", + "Peer-to-peer exchange" + ] + }, + "address_city": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{1,35}$" + }, + "address_line_1": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{1,70}$" + }, + "address_line_2": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": [ + "null", + "string" + ], + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" + }, + "address_postcode": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" + }, + "address_state": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" + }, + "allow_copiers": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "citizen": { + "description": "[Optional] Country of legal citizenship, 2-letter country code.", + "type": [ + "null", + "string" + ], + "pattern": "^([a-z]{2})?$" + }, + "date_of_birth": { + "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" + }, + "dxtrade_user_exception": { + "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "email_consent": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "feature_flag": { + "description": "[Optional] Enable or disable one or multiple features.", + "type": "object", + "additionalProperties": false, + "properties": { + "wallet": { + "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + }, + "first_name": { + "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "last_name": { + "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "non_pep_declaration": { + "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", + "type": "integer", + "enum": [ + 1 + ] + }, + "phone": { + "description": "[Optional] Note: not applicable for virtual account. Starting with `+` followed by 9-35 digits, hyphens or space.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "place_of_birth": { + "description": "[Optional] Place of birth, 2-letter country code.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "preferred_language": { + "description": "[Optional] User's preferred language, ISO standard language code", + "type": [ + "null", + "string" + ], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "request_professional_status": { + "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", + "type": "integer", + "enum": [ + 1 + ] + }, + "residence": { + "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", + "type": [ + "null", + "string" + ], + "pattern": "^[a-z]{2}$" + }, + "salutation": { + "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", + "type": "string", + "enum": [ + "Mr", + "Ms", + "Miss", + "Mrs" + ] + }, + "secret_answer": { + "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "pattern": "^[\\w\\-\\,\\.\\' ]+", + "maxLength": 50, + "minLength": 4, + "sensitive": 1 + }, + "secret_question": { + "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "enum": [ + "Mother's maiden name", + "Name of your pet", + "Name of first love", + "Memorable town/city", + "Memorable date", + "Favourite dish", + "Brand of first car", + "Favourite artist" + ] + }, + "tax_identification_number": { + "description": "[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[A-Za-z0-9.\\/\\s-]{0,25}$" + }, + "tax_residence": { + "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" + }, + "trading_hub": { + "description": "[Optional] Enable/Disable Trading Hub dashboard", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "first_name": { - "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "last_name": { - "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "non_pep_declaration": { - "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", - "type": "integer", - "enum": [1] - }, - "phone": { - "description": "[Optional] Note: not applicable for virtual account. Starting with `+` followed by 9-35 digits, hyphens or space.", - "type": ["null", "string"], - "sensitive": 1 - }, - "place_of_birth": { - "description": "[Optional] Place of birth, 2-letter country code.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "preferred_language": { - "description": "[Optional] User's preferred language, ISO standard language code", - "type": ["null", "string"], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "request_professional_status": { - "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", - "type": "integer", - "enum": [1] - }, - "residence": { - "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", - "type": ["null", "string"], - "pattern": "^[a-z]{2}$" - }, - "salutation": { - "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", - "type": "string", - "enum": ["Mr", "Ms", "Miss", "Mrs"] - }, - "secret_answer": { - "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.", - "type": "string", - "pattern": "^[\\w\\-\\,\\.\\' ]+", - "maxLength": 50, - "minLength": 4, - "sensitive": 1 - }, - "secret_question": { - "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.", - "type": "string", - "enum": [ - "Mother's maiden name", - "Name of your pet", - "Name of first love", - "Memorable town/city", - "Memorable date", - "Favourite dish", - "Brand of first car", - "Favourite artist" - ] - }, - "tax_identification_number": { - "description": "[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.", - "type": "string", - "pattern": "^[A-Za-z0-9.\\/\\s-]{0,25}$" - }, - "tax_residence": { - "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.", - "type": "string", - "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" - }, - "trading_hub": { - "description": "[Optional] Enable/Disable Trading Hub dashboard", - "type": "integer", - "enum": [0, 1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/statement/send.json b/config/v3/statement/send.json index 9fe5e683..8ed69e9a 100644 --- a/config/v3/statement/send.json +++ b/config/v3/statement/send.json @@ -1,73 +1,83 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Statement (request)", - "description": "Retrieve a summary of account transactions, according to given search criteria", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["statement"], - "properties": { - "statement": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "action_type": { - "description": "[Optional] To filter the statement according to the type of transaction.", - "type": "string", - "enum": [ - "buy", - "sell", - "deposit", - "withdrawal", - "escrow", - "adjustment", - "virtual_credit", - "transfer" - ] - }, - "date_from": { - "description": "[Optional] Start date (epoch)", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "date_to": { - "description": "[Optional] End date (epoch)", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "description": { - "description": "[Optional] If set to 1, will return full contracts description.", - "type": "integer", - "enum": [0, 1] - }, - "limit": { - "description": "[Optional] Maximum number of transactions to receive.", - "type": "number", - "default": 100, - "maximum": 999, - "minimum": 0 - }, - "offset": { - "description": "[Optional] Number of transactions to skip.", - "type": "integer", - "minimum": 0 - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Statement (request)", + "description": "Retrieve a summary of account transactions, according to given search criteria", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "statement" + ], + "properties": { + "statement": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "action_type": { + "description": "[Optional] To filter the statement according to the type of transaction.", + "type": "string", + "enum": [ + "buy", + "sell", + "deposit", + "withdrawal", + "escrow", + "adjustment", + "virtual_credit", + "transfer" + ] + }, + "date_from": { + "description": "[Optional] Start date (epoch)", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "date_to": { + "description": "[Optional] End date (epoch)", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "description": { + "description": "[Optional] If set to 1, will return full contracts description.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "limit": { + "description": "[Optional] Maximum number of transactions to receive.", + "type": "number", + "default": 100, + "maximum": 999, + "minimum": 0 + }, + "offset": { + "description": "[Optional] Number of transactions to skip.", + "type": "integer", + "minimum": 0 + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/states_list/send.json b/config/v3/states_list/send.json index 1ce0be12..13293637 100644 --- a/config/v3/states_list/send.json +++ b/config/v3/states_list/send.json @@ -1,25 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "States List (request)", - "description": "For a given country, returns a list of States of that country. This is useful to populate the account opening form.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["states_list"], - "properties": { - "states_list": { - "title": "States list", - "description": "Client's 2-letter country code (obtained from `residence_list` call)", - "type": "string", - "pattern": "^\\w\\w$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "States List (request)", + "description": "For a given country, returns a list of States of that country. This is useful to populate the account opening form.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "states_list" + ], + "properties": { + "states_list": { + "title": "States list", + "description": "Client's 2-letter country code (obtained from `residence_list` call)", + "type": "string", + "pattern": "^\\w\\w$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/ticks/send.json b/config/v3/ticks/send.json index 698117a2..53292150 100644 --- a/config/v3/ticks/send.json +++ b/config/v3/ticks/send.json @@ -1,40 +1,44 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks Stream (request)", - "description": "Initiate a continuous stream of spot price updates for a given symbol.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ticks"], - "properties": { - "ticks": { - "description": "The short symbol name or array of symbols (obtained from `active_symbols` call).", - "oneOf": [ - { - "type": "string", - "pattern": "^\\w{2,30}$" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ticks Stream (request)", + "description": "Initiate a continuous stream of spot price updates for a given symbol.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "ticks" + ], + "properties": { + "ticks": { + "description": "The short symbol name or array of symbols (obtained from `active_symbols` call).", + "oneOf": [ + { + "type": "string", + "pattern": "^\\w{2,30}$" + }, + { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w{2,30}$" + } + } + ] }, - { - "type": "array", - "items": { - "type": "string", - "pattern": "^\\w{2,30}$" - } + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever a new tick is received.", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever a new tick is received.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/ticks_history/send.json b/config/v3/ticks_history/send.json index 00e5a01f..d9d39db9 100644 --- a/config/v3/ticks_history/send.json +++ b/config/v3/ticks_history/send.json @@ -1,61 +1,84 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks History (request)", - "description": "Get historic tick data for a given symbol.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ticks_history", "end"], - "properties": { - "ticks_history": { - "description": "Short symbol name (obtained from the `active_symbols` call).", - "type": "string", - "pattern": "^\\w{2,30}$" - }, - "adjust_start_time": { - "description": "[Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate.", - "type": "integer", - "enum": [1] - }, - "count": { - "description": "[Optional] An upper limit on ticks to receive.", - "type": "integer", - "default": "5000" - }, - "end": { - "description": "Epoch value representing the latest boundary of the returned ticks. If `latest` is specified, this will be the latest available timestamp.", - "type": "string", - "pattern": "^(latest|[0-9]{1,10})$" - }, - "granularity": { - "description": "[Optional] Only applicable for style: `candles`. Candle time-dimension width setting. (default: `60`).", - "type": "integer", - "enum": [60, 120, 180, 300, 600, 900, 1800, 3600, 7200, 14400, 28800, 86400] - }, - "start": { - "description": "[Optional] Epoch value representing the earliest boundary of the returned ticks. \n- For `\"style\": \"ticks\"`: this will default to 1 day ago.\n- For `\"style\": \"candles\"`: it will default to 1 day ago if count or granularity is undefined.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "style": { - "description": "[Optional] The tick-output style.", - "type": "string", - "default": "ticks", - "enum": ["candles", "ticks"] - }, - "subscribe": { - "description": "[Optional] 1 - to send updates whenever a new tick is received.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ticks History (request)", + "description": "Get historic tick data for a given symbol.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "ticks_history", + "end" + ], + "properties": { + "ticks_history": { + "description": "Short symbol name (obtained from the `active_symbols` call).", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "adjust_start_time": { + "description": "[Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate.", + "type": "integer", + "enum": [ + 1 + ] + }, + "count": { + "description": "[Optional] An upper limit on ticks to receive.", + "type": "integer", + "default": "5000" + }, + "end": { + "description": "Epoch value representing the latest boundary of the returned ticks. If `latest` is specified, this will be the latest available timestamp.", + "type": "string", + "pattern": "^(latest|[0-9]{1,10})$" + }, + "granularity": { + "description": "[Optional] Only applicable for style: `candles`. Candle time-dimension width setting. (default: `60`).", + "type": "integer", + "enum": [ + 60, + 120, + 180, + 300, + 600, + 900, + 1800, + 3600, + 7200, + 14400, + 28800, + 86400 + ] + }, + "start": { + "description": "[Optional] Epoch value representing the earliest boundary of the returned ticks. \n- For `\"style\": \"ticks\"`: this will default to 1 day ago.\n- For `\"style\": \"candles\"`: it will default to 1 day ago if count or granularity is undefined.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "style": { + "description": "[Optional] The tick-output style.", + "type": "string", + "default": "ticks", + "enum": [ + "candles", + "ticks" + ] + }, + "subscribe": { + "description": "[Optional] 1 - to send updates whenever a new tick is received.", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/time/send.json b/config/v3/time/send.json index ce39b1af..d57e3264 100644 --- a/config/v3/time/send.json +++ b/config/v3/time/send.json @@ -1,24 +1,28 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Time (request)", - "description": "Request back-end server epoch time.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["time"], - "properties": { - "time": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server Time (request)", + "description": "Request back-end server epoch time.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "time" + ], + "properties": { + "time": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/tnc_approval/send.json b/config/v3/tnc_approval/send.json index 52b8dfee..2846c65b 100644 --- a/config/v3/tnc_approval/send.json +++ b/config/v3/tnc_approval/send.json @@ -1,40 +1,50 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Terms and Conditions Approval (request)", - "description": "To approve the latest version of terms and conditions.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["tnc_approval"], - "properties": { - "tnc_approval": { - "description": "Must be `1`", - "type": "number", - "enum": [1] - }, - "affiliate_coc_agreement": { - "description": "[Optional] For Affiliate's Code of Conduct Agreement.", - "type": "integer", - "enum": [1] - }, - "ukgc_funds_protection": { - "description": "[Optional] For `ASK_UK_FUNDS_PROTECTION` in `cashier`.", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Terms and Conditions Approval (request)", + "description": "To approve the latest version of terms and conditions.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "tnc_approval" + ], + "properties": { + "tnc_approval": { + "description": "Must be `1`", + "type": "number", + "enum": [ + 1 + ] + }, + "affiliate_coc_agreement": { + "description": "[Optional] For Affiliate's Code of Conduct Agreement.", + "type": "integer", + "enum": [ + 1 + ] + }, + "ukgc_funds_protection": { + "description": "[Optional] For `ASK_UK_FUNDS_PROTECTION` in `cashier`.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/topup_virtual/send.json b/config/v3/topup_virtual/send.json index 5e47aed3..7676a68e 100644 --- a/config/v3/topup_virtual/send.json +++ b/config/v3/topup_virtual/send.json @@ -1,30 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Top Up Virtual-Money Account (request)", - "description": "When a virtual-money's account balance becomes low, it can be topped up using this call.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["topup_virtual"], - "properties": { - "topup_virtual": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Top Up Virtual-Money Account (request)", + "description": "When a virtual-money's account balance becomes low, it can be topped up using this call.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "topup_virtual" + ], + "properties": { + "topup_virtual": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_durations/send.json b/config/v3/trading_durations/send.json index db5a36f0..ec022807 100644 --- a/config/v3/trading_durations/send.json +++ b/config/v3/trading_durations/send.json @@ -1,57 +1,61 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Durations (request)", - "description": "Retrieve a list of all available underlyings and the corresponding contract types and trading duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["trading_durations"], - "properties": { - "trading_durations": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "landing_company": { - "description": "Deprecated - Replaced by landing_company_short.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "landing_company_short": { - "description": "[Optional] If specified, will return only the underlyings for the specified landing company.", - "type": "string", - "enum": [ - "iom", - "malta", - "maltainvest", - "svg", - "virtual", - "vanuatu", - "champion", - "champion-virtual" - ] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Durations (request)", + "description": "Retrieve a list of all available underlyings and the corresponding contract types and trading duration boundaries. If the user is logged in, only the assets available for that user's landing company will be returned.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "trading_durations" + ], + "properties": { + "trading_durations": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "landing_company": { + "description": "Deprecated - Replaced by landing_company_short.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "landing_company_short": { + "description": "[Optional] If specified, will return only the underlyings for the specified landing company.", + "type": "string", + "enum": [ + "iom", + "malta", + "maltainvest", + "svg", + "virtual", + "vanuatu", + "champion", + "champion-virtual" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_platform_investor_password_reset/send.json b/config/v3/trading_platform_investor_password_reset/send.json index ed688592..b3c1831a 100644 --- a/config/v3/trading_platform_investor_password_reset/send.json +++ b/config/v3/trading_platform_investor_password_reset/send.json @@ -1,51 +1,62 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Platform: Investor Password Reset (request)", - "description": "Reset the investor password of a Trading Platform Account", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "trading_platform_investor_password_reset", - "account_id", - "new_password", - "platform", - "verification_code" - ], - "properties": { - "trading_platform_investor_password_reset": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_id": { - "description": "Trading account ID.", - "type": "string" - }, - "new_password": { - "description": "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).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "platform": { - "description": "Name of trading platform.", - "type": "string", - "enum": ["mt5"] - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first)", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform: Investor Password Reset (request)", + "description": "Reset the investor password of a Trading Platform Account", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "trading_platform_investor_password_reset", + "account_id", + "new_password", + "platform", + "verification_code" + ], + "properties": { + "trading_platform_investor_password_reset": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_id": { + "description": "Trading account ID.", + "type": "string" + }, + "new_password": { + "description": "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).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "platform": { + "description": "Name of trading platform.", + "type": "string", + "enum": [ + "mt5" + ] + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first)", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_platform_password_reset/send.json b/config/v3/trading_platform_password_reset/send.json index 0fe0f5af..d97f09ce 100644 --- a/config/v3/trading_platform_password_reset/send.json +++ b/config/v3/trading_platform_password_reset/send.json @@ -1,41 +1,58 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Platform: Password Reset (request)", - "description": "Reset the password of a Trading Platform Account", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["trading_platform_password_reset", "new_password", "platform", "verification_code"], - "properties": { - "trading_platform_password_reset": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "new_password": { - "description": "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).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "platform": { - "description": "Name of trading platform.", - "type": "string", - "enum": ["dxtrade", "mt5"] - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first)", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform: Password Reset (request)", + "description": "Reset the password of a Trading Platform Account", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "trading_platform_password_reset", + "new_password", + "platform", + "verification_code" + ], + "properties": { + "trading_platform_password_reset": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "new_password": { + "description": "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).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "platform": { + "description": "Name of trading platform.", + "type": "string", + "enum": [ + "dxtrade", + "mt5" + ] + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first)", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_servers/send.json b/config/v3/trading_servers/send.json index e7ca4f56..fdb3fe48 100644 --- a/config/v3/trading_servers/send.json +++ b/config/v3/trading_servers/send.json @@ -1,53 +1,74 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server list (request)", - "description": "Get the list of servers for a trading platform.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read"], - "additionalProperties": false, - "required": ["trading_servers"], - "properties": { - "trading_servers": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_type": { - "description": "[Optional] Trading account type.", - "type": "string", - "enum": ["demo", "real"] - }, - "environment": { - "description": "[Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'.", - "type": "string", - "default": "all", - "enum": ["all", "Deriv-Demo", "Deriv-Server", "Deriv-Server-02"] - }, - "market_type": { - "description": "[Optional] Market type.", - "type": "string", - "default": "synthetic", - "enum": ["all", "financial", "synthetic"] - }, - "platform": { - "description": "[Optional] Pass the trading platform name, default to mt5", - "type": "string", - "default": "mt5", - "enum": ["mt5", "dxtrade"] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server list (request)", + "description": "Get the list of servers for a trading platform.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read" + ], + "additionalProperties": false, + "required": [ + "trading_servers" + ], + "properties": { + "trading_servers": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_type": { + "description": "[Optional] Trading account type.", + "type": "string", + "enum": [ + "demo", + "real" + ] + }, + "environment": { + "description": "[Optional] Pass the environment (installation) instance. Currently, there are one demo and two real environments. Defaults to 'all'.", + "type": "string", + "default": "all", + "enum": [ + "all", + "Deriv-Demo", + "Deriv-Server", + "Deriv-Server-02" + ] + }, + "market_type": { + "description": "[Optional] Market type.", + "type": "string", + "default": "synthetic", + "enum": [ + "all", + "financial", + "synthetic" + ] + }, + "platform": { + "description": "[Optional] Pass the trading platform name, default to mt5", + "type": "string", + "default": "mt5", + "enum": [ + "mt5", + "dxtrade" + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_times/send.json b/config/v3/trading_times/send.json index 2c865de9..50f5be89 100644 --- a/config/v3/trading_times/send.json +++ b/config/v3/trading_times/send.json @@ -1,24 +1,26 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Times (request)", - "description": "Receive a list of market opening times for a given date.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["trading_times"], - "properties": { - "trading_times": { - "description": "Date to receive market opening times for. (`yyyy-mm-dd` format. `today` can also be specified).", - "type": "string", - "pattern": "^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}|today)$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Times (request)", + "description": "Receive a list of market opening times for a given date.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "trading_times" + ], + "properties": { + "trading_times": { + "description": "Date to receive market opening times for. (`yyyy-mm-dd` format. `today` can also be specified).", + "type": "string", + "pattern": "^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}|today)$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/transaction/send.json b/config/v3/transaction/send.json index e135ca3e..df3b688f 100644 --- a/config/v3/transaction/send.json +++ b/config/v3/transaction/send.json @@ -1,35 +1,45 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Transactions Stream (request)", - "description": "Subscribe to transaction notifications", - "type": "object", - "auth_required": 1, - "auth_scopes": ["read", "trading_information"], - "additionalProperties": false, - "required": ["transaction", "subscribe"], - "properties": { - "transaction": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "subscribe": { - "description": "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.", - "type": "integer", - "enum": [1] - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Transactions Stream (request)", + "description": "Subscribe to transaction notifications", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "read", + "trading_information" + ], + "additionalProperties": false, + "required": [ + "transaction", + "subscribe" + ], + "properties": { + "transaction": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "subscribe": { + "description": "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.", + "type": "integer", + "enum": [ + 1 + ] + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/transfer_between_accounts/receive.json b/config/v3/transfer_between_accounts/receive.json index b376cd91..3cf8b1de 100644 --- a/config/v3/transfer_between_accounts/receive.json +++ b/config/v3/transfer_between_accounts/receive.json @@ -1,117 +1,153 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Transfer Between Accounts (response)", - "description": "The result of transfer order.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "transfer_between_accounts": { - "title": "transfer_between_accounts", - "description": "If set to 1, transfer succeeded.", - "type": "integer", - "enum": [0, 1] - }, - "accounts": { - "description": "The available accounts to transfer, or the accounts affected by a successful transfer.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "account_category": { - "description": "Category of the account.", - "type": "string", - "enum": ["trading", "wallet"] - }, - "account_type": { - "description": "Type of the account.", - "type": "string", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Transfer Between Accounts (response)", + "description": "The result of transfer order.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "transfer_between_accounts": { + "title": "transfer_between_accounts", + "description": "If set to 1, transfer succeeded.", + "type": "integer", "enum": [ - "binary", - "crypto", - "ctrader", - "doughflow", - "dxtrade", - "derivez", - "mt5", - "p2p", - "paymentagent", - "paymentagent_client", - "standard", - "virtual" + 0, + 1 ] - }, - "balance": { - "description": "Account balance.", + }, + "accounts": { + "description": "The available accounts to transfer, or the accounts affected by a successful transfer.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "account_category": { + "description": "Category of the account.", + "type": "string", + "enum": [ + "trading", + "wallet" + ] + }, + "account_type": { + "description": "Type of the account.", + "type": "string", + "enum": [ + "binary", + "crypto", + "ctrader", + "doughflow", + "dxtrade", + "derivez", + "mt5", + "p2p", + "paymentagent", + "paymentagent_client", + "standard", + "virtual" + ] + }, + "balance": { + "description": "Account balance.", + "type": "string" + }, + "currency": { + "description": "Default account currency.", + "type": "string", + "examples": [ + "USD" + ] + }, + "demo_account": { + "description": "0 for real accounts; 1 for virtual/demo accounts.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "derivez_group": { + "description": "The group of derivez account.", + "type": "string", + "examples": [ + "real\\svg_ez_usd" + ] + }, + "loginid": { + "description": "Account identifier used for system transfers.", + "type": "string", + "examples": [ + "CR000000" + ] + }, + "market_type": { + "description": "Market type of account.", + "type": "string", + "enum": [ + "all", + "financial", + "synthetic" + ] + }, + "mt5_group": { + "description": "The group of mt5 account.", + "type": "string", + "examples": [ + "real\\vanuatu_financial" + ] + }, + "status": { + "description": "The status of account.", + "type": [ + "null", + "string" + ], + "examples": [ + "poa_failed" + ] + }, + "transfers": { + "description": "Type of transfers allowed between the account and the currently authorized account.", + "type": "string", + "enum": [ + "all", + "deposit", + "none", + "withdrawal" + ] + } + } + } + }, + "client_to_full_name": { + "description": "The account to client full name", "type": "string" - }, - "currency": { - "description": "Default account currency.", - "type": "string", - "examples": ["USD"] - }, - "demo_account": { - "description": "0 for real accounts; 1 for virtual/demo accounts.", - "type": "integer", - "enum": [0, 1] - }, - "derivez_group": { - "description": "The group of derivez account.", - "type": "string", - "examples": ["real\\svg_ez_usd"] - }, - "loginid": { - "description": "Account identifier used for system transfers.", - "type": "string", - "examples": ["CR000000"] - }, - "market_type": { - "description": "Market type of account.", - "type": "string", - "enum": ["all", "financial", "synthetic"] - }, - "mt5_group": { - "description": "The group of mt5 account.", - "type": "string", - "examples": ["real\\vanuatu_financial"] - }, - "status": { - "description": "The status of account.", - "type": ["null", "string"], - "examples": ["poa_failed"] - }, - "transfers": { - "description": "Type of transfers allowed between the account and the currently authorized account.", + }, + "client_to_loginid": { + "description": "The account to client loginid", + "type": "string" + }, + "transaction_id": { + "description": "Reference ID of transfer performed", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", "type": "string", - "enum": ["all", "deposit", "none", "withdrawal"] - } + "enum": [ + "transfer_between_accounts" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "client_to_full_name": { - "description": "The account to client full name", - "type": "string" - }, - "client_to_loginid": { - "description": "The account to client loginid", - "type": "string" - }, - "transaction_id": { - "description": "Reference ID of transfer performed", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["transfer_between_accounts"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/transfer_between_accounts/send.json b/config/v3/transfer_between_accounts/send.json index 08a764ab..bd252184 100644 --- a/config/v3/transfer_between_accounts/send.json +++ b/config/v3/transfer_between_accounts/send.json @@ -1,56 +1,65 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Transfer Between Accounts (request)", - "description": "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.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["transfer_between_accounts"], - "properties": { - "transfer_between_accounts": { - "description": "If `account_from` or `account_to` is not provided, it just returns the available accounts.", - "type": "integer", - "enum": [1] - }, - "account_from": { - "description": "[Optional] The loginid of the account to transfer funds from.", - "type": "string", - "pattern": "\\w+" - }, - "account_to": { - "description": "[Optional] The loginid of the account to transfer funds to.", - "type": "string", - "pattern": "\\w+" - }, - "accounts": { - "description": "[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.", - "type": "string", - "default": "brief", - "enum": ["all", "brief"] - }, - "amount": { - "description": "[Optional] The amount to transfer.", - "type": "number", - "minimum": 0 - }, - "currency": { - "description": "[Optional] Currency code.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Transfer Between Accounts (request)", + "description": "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.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "transfer_between_accounts" + ], + "properties": { + "transfer_between_accounts": { + "description": "If `account_from` or `account_to` is not provided, it just returns the available accounts.", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_from": { + "description": "[Optional] The loginid of the account to transfer funds from.", + "type": "string", + "pattern": "\\w+" + }, + "account_to": { + "description": "[Optional] The loginid of the account to transfer funds to.", + "type": "string", + "pattern": "\\w+" + }, + "accounts": { + "description": "[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.", + "type": "string", + "default": "brief", + "enum": [ + "all", + "brief" + ] + }, + "amount": { + "description": "[Optional] The amount to transfer.", + "type": "number", + "minimum": 0 + }, + "currency": { + "description": "[Optional] Currency code.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/unsubscribe_email/send.json b/config/v3/unsubscribe_email/send.json index c12da7ac..aed510a5 100644 --- a/config/v3/unsubscribe_email/send.json +++ b/config/v3/unsubscribe_email/send.json @@ -1,32 +1,38 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Unsubscribe Email (request)", - "description": "It unsubscribe user from the email subscription.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["unsubscribe_email", "binary_user_id", "checksum"], - "properties": { - "unsubscribe_email": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "binary_user_id": { - "description": "Customer User ID.", - "type": "number" - }, - "checksum": { - "description": "The generated checksum for the customer.", - "type": "string" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Unsubscribe Email (request)", + "description": "It unsubscribe user from the email subscription.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "unsubscribe_email", + "binary_user_id", + "checksum" + ], + "properties": { + "unsubscribe_email": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "binary_user_id": { + "description": "Customer User ID.", + "type": "number" + }, + "checksum": { + "description": "The generated checksum for the customer.", + "type": "string" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/verify_email/send.json b/config/v3/verify_email/send.json index 3ef7c7d8..833de726 100644 --- a/config/v3/verify_email/send.json +++ b/config/v3/verify_email/send.json @@ -1,238 +1,244 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Verify Email (request)", - "description": "Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["verify_email", "type"], - "properties": { - "verify_email": { - "description": "Email address to be verified.", - "type": "string", - "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" - }, - "type": { - "description": "Purpose of email verification, request_email and reset_password are the only two types restricted from all unoffical apps", - "type": "string", - "enum": [ - "partner_account_opening", - "account_opening", - "reset_password", - "paymentagent_withdraw", - "payment_withdraw", - "trading_platform_dxtrade_password_reset", - "trading_platform_mt5_password_reset", - "trading_platform_investor_password_reset", - "request_email" - ] - }, - "url_parameters": { - "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", - "type": "object", - "additionalProperties": false, - "properties": { - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "date_first_contact": { - "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "gclid_url": { - "description": "[Optional] Google Click Identifier to track source.", - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - "pa_amount": { - "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", - "type": "number" - }, - "pa_currency": { - "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "pa_loginid": { - "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "pa_remarks": { - "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[0-9A-Za-z .,'-]{0,100}$" - }, - "redirect_to": { - "description": "[Optional] The page ID to redirect to", - "type": "integer" - }, - "signup_device": { - "description": "[Optional] Show whether user has used mobile or desktop.", - "type": "string", - "enum": ["desktop", "mobile"] - }, - "utm_ad_id": { - "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adgroup_id": { - "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adrollclk_id": { - "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign": { - "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign_id": { - "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_content": { - "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_fbcl_id": { - "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email (request)", + "description": "Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "verify_email", + "type" + ], + "properties": { + "verify_email": { + "description": "Email address to be verified.", + "type": "string", + "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" + }, + "type": { + "description": "Purpose of email verification, request_email and reset_password are the only two types restricted from all unoffical apps", + "type": "string", + "enum": [ + "partner_account_opening", + "account_opening", + "reset_password", + "paymentagent_withdraw", + "payment_withdraw", + "trading_platform_dxtrade_password_reset", + "trading_platform_mt5_password_reset", + "trading_platform_investor_password_reset", + "request_email" + ] + }, + "url_parameters": { + "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", + "type": "object", + "additionalProperties": false, + "properties": { + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "pa_amount": { + "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", + "type": "number" + }, + "pa_currency": { + "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "pa_loginid": { + "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "pa_remarks": { + "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,100}$" + }, + "redirect_to": { + "description": "[Optional] The page ID to redirect to", + "type": "integer" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + } } - ] }, - "utm_gl_client_id": { - "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/verify_email_cellxpert/send.json b/config/v3/verify_email_cellxpert/send.json index f71ca1a0..6660e764 100644 --- a/config/v3/verify_email_cellxpert/send.json +++ b/config/v3/verify_email_cellxpert/send.json @@ -1,232 +1,240 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Verify Email Cellxpert (request)", - "description": "Verify an email address for Cellxpert. The system will send an email to the address containing a security code for verification.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["verify_email_cellxpert", "type"], - "properties": { - "verify_email_cellxpert": { - "description": "Email address to be verified.", - "type": "string", - "pattern": "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" - }, - "type": { - "description": "Purpose of the email verification call.", - "type": "string", - "enum": ["partner_account_opening"] - }, - "url_parameters": { - "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", - "type": "object", - "additionalProperties": false, - "properties": { - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "bta": { - "description": "[Optional] Master affiliate Id.", - "type": "integer" - }, - "date_first_contact": { - "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "gclid_url": { - "description": "[Optional] Google Click Identifier to track source.", - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - "pa_amount": { - "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", - "type": "number" - }, - "pa_currency": { - "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "pa_loginid": { - "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "pa_remarks": { - "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", - "type": "string", - "pattern": "^[0-9A-Za-z .,'-]{0,100}$" - }, - "redirect_to": { - "description": "[Optional] The page ID to redirect to", - "type": "integer" - }, - "signup_device": { - "description": "[Optional] Show whether user has used mobile or desktop.", - "type": "string", - "enum": ["desktop", "mobile"] - }, - "utm_ad_id": { - "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email Cellxpert (request)", + "description": "Verify an email address for Cellxpert. The system will send an email to the address containing a security code for verification.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "verify_email_cellxpert", + "type" + ], + "properties": { + "verify_email_cellxpert": { + "description": "Email address to be verified.", + "type": "string", + "pattern": "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" + }, + "type": { + "description": "Purpose of the email verification call.", + "type": "string", + "enum": [ + "partner_account_opening" + ] + }, + "url_parameters": { + "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", + "type": "object", + "additionalProperties": false, + "properties": { + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "bta": { + "description": "[Optional] Master affiliate Id.", + "type": "integer" + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "pa_amount": { + "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", + "type": "number" + }, + "pa_currency": { + "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "pa_loginid": { + "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "pa_remarks": { + "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,100}$" + }, + "redirect_to": { + "description": "[Optional] The page ID to redirect to", + "type": "integer" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + } } - ] }, - "utm_adgroup_id": { - "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "loginid": { + "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" }, - "utm_adrollclk_id": { - "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" }, - "utm_campaign": { - "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign_id": { - "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_content": { - "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_fbcl_id": { - "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_gl_client_id": { - "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "loginid": { - "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/website_status/send.json b/config/v3/website_status/send.json index dbff2c41..e637f742 100644 --- a/config/v3/website_status/send.json +++ b/config/v3/website_status/send.json @@ -1,29 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Status (request)", - "description": "Request server status.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["website_status"], - "properties": { - "website_status": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "subscribe": { - "description": "[Optional] `1` to stream the server/website status updates.", - "type": "integer", - "enum": [0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server Status (request)", + "description": "Request server status.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "website_status" + ], + "properties": { + "website_status": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "subscribe": { + "description": "[Optional] `1` to stream the server/website status updates.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } }