diff --git a/config/v3/active_symbols/send.json b/config/v3/active_symbols/send.json index 173f33543..f4d566495 100644 --- a/config/v3/active_symbols/send.json +++ b/config/v3/active_symbols/send.json @@ -1,69 +1,62 @@ { - "$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"] + }, + "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" } + } } diff --git a/config/v3/api_token/send.json b/config/v3/api_token/send.json index 3e7a09481..b6b0b50cb 100644 --- a/config/v3/api_token/send.json +++ b/config/v3/api_token/send.json @@ -1,70 +1,55 @@ { - "$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. Maximum size is 3500 bytes.", + "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 b697f8905..efe4bad74 100644 --- a/config/v3/app_delete/send.json +++ b/config/v3/app_delete/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 9fa9584ad..dcc42b04b 100644 --- a/config/v3/app_get/send.json +++ b/config/v3/app_get/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 b4ec1d8b6..875d66033 100644 --- a/config/v3/app_list/send.json +++ b/config/v3/app_list/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 d9f2ccda0..0157bd935 100644 --- a/config/v3/app_markup_details/send.json +++ b/config/v3/app_markup_details/send.json @@ -1,101 +1,83 @@ { - "$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. Maximum size is 3500 bytes.", + "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 78aa9fd23..d7bfd45af 100644 --- a/config/v3/app_markup_statistics/send.json +++ b/config/v3/app_markup_statistics/send.json @@ -1,48 +1,40 @@ { - "$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. Maximum size is 3500 bytes.", + "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 591d32521..3ccc7b05d 100644 --- a/config/v3/app_register/send.json +++ b/config/v3/app_register/send.json @@ -1,94 +1,80 @@ { - "$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. Maximum size is 3500 bytes.", + "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 f47a6d45b..8fee6b7d5 100644 --- a/config/v3/app_update/send.json +++ b/config/v3/app_update/send.json @@ -1,91 +1,79 @@ { - "$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. Maximum size is 3500 bytes.", + "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 caafe2572..1037b1fcd 100644 --- a/config/v3/asset_index/send.json +++ b/config/v3/asset_index/send.json @@ -1,61 +1,57 @@ { - "$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. Maximum size is 3500 bytes.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } + } } diff --git a/config/v3/authorize/send.json b/config/v3/authorize/send.json index e464cc1b7..be46396fd 100644 --- a/config/v3/authorize/send.json +++ b/config/v3/authorize/send.json @@ -1,46 +1,41 @@ { - "$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. Maximum size is 3500 bytes.", + "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 4efbe9496..b9610f0de 100644 --- a/config/v3/balance/send.json +++ b/config/v3/balance/send.json @@ -1,51 +1,41 @@ { - "$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. 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/send.json b/config/v3/buy/send.json index b3da2fdbb..14850501c 100644 --- a/config/v3/buy/send.json +++ b/config/v3/buy/send.json @@ -1,225 +1,199 @@ { - "$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 - } + "$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}$" }, - "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" + "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. 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 c8e78659f..07da8c648 100644 --- a/config/v3/buy_contract_for_multiple_accounts/send.json +++ b/config/v3/buy_contract_for_multiple_accounts/send.json @@ -1,181 +1,162 @@ { - "$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)$" + "$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 }, - "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}$" - } - } + "app_markup_percentage": { + "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", + "type": "number" }, - "price": { - "description": "Maximum price at which to purchase the contract.", - "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.", + "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 + "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*$" }, - "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]+$" + "basis": { + "description": "[Optional] Indicate whether amount is 'payout' or 'stake'.", + "type": "string", + "enum": ["payout", "stake"] }, - "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" + "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" + ] }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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}$" } + } + }, + "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 47cf464df..e2d51b699 100644 --- a/config/v3/cancel/send.json +++ b/config/v3/cancel/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 da2cb0381..9e3cf297a 100644 --- a/config/v3/cashier/send.json +++ b/config/v3/cashier/send.json @@ -1,79 +1,63 @@ { - "$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] + }, + "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" } + } } diff --git a/config/v3/contract_update/send.json b/config/v3/contract_update/send.json index 97dd82682..2b2e1e797 100644 --- a/config/v3/contract_update/send.json +++ b/config/v3/contract_update/send.json @@ -1,63 +1,49 @@ { - "$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 - ] + "$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"] }, - "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. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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. 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 137812330..3c7722616 100644 --- a/config/v3/contract_update_history/send.json +++ b/config/v3/contract_update_history/send.json @@ -1,48 +1,41 @@ { - "$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. Maximum size is 3500 bytes.", + "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 f82abd7eb..17447098c 100644 --- a/config/v3/contracts_for/send.json +++ b/config/v3/contracts_for/send.json @@ -1,74 +1,70 @@ { - "$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. 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_start/send.json b/config/v3/copy_start/send.json index 2f4891b6d..fa9a6bec2 100644 --- a/config/v3/copy_start/send.json +++ b/config/v3/copy_start/send.json @@ -1,75 +1,71 @@ { - "$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": { - "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" + "$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}$" }, - "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": "array", + "items": { "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" + "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}$" }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + { + "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": "^[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 f14455260..9363bbb52 100644 --- a/config/v3/copy_stop/send.json +++ b/config/v3/copy_stop/send.json @@ -1,35 +1,31 @@ { - "$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. Maximum size is 3500 bytes.", + "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 9441da2dc..2b6274946 100644 --- a/config/v3/copytrading_list/send.json +++ b/config/v3/copytrading_list/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 fe79d85aa..059e76448 100644 --- a/config/v3/copytrading_statistics/send.json +++ b/config/v3/copytrading_statistics/send.json @@ -1,34 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 023565ff8..cdf96dc52 100644 --- a/config/v3/crypto_config/send.json +++ b/config/v3/crypto_config/send.json @@ -1,38 +1,34 @@ { - "$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. Maximum size is 3500 bytes.", + "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 74d0dcda4..9b21d0a24 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 e3dcdbc05..ba22ac416 100644 --- a/config/v3/crypto_estimations/receive.json +++ b/config/v3/crypto_estimations/receive.json @@ -1,87 +1,74 @@ { - "$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" - ] - } - } - }, - "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" + } + } + } + }, + "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" } + } } diff --git a/config/v3/crypto_estimations/send.json b/config/v3/crypto_estimations/send.json index 87e0c11ea..60ff76a1f 100644 --- a/config/v3/crypto_estimations/send.json +++ b/config/v3/crypto_estimations/send.json @@ -1,46 +1,39 @@ { - "$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. Maximum size is 3500 bytes.", + "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 487cd74fc..b14b28cbd 100644 --- a/config/v3/document_upload/send.json +++ b/config/v3/document_upload/send.json @@ -1,157 +1,135 @@ { - "$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 - ] + "$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"] }, - "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. Maximum size is 3500 bytes.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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. 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 adcf15fcc..742aee932 100644 --- a/config/v3/economic_calendar/send.json +++ b/config/v3/economic_calendar/send.json @@ -1,45 +1,41 @@ { - "$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. Maximum size is 3500 bytes.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } + } } diff --git a/config/v3/exchange_rates/send.json b/config/v3/exchange_rates/send.json index 683959705..384fd4420 100644 --- a/config/v3/exchange_rates/send.json +++ b/config/v3/exchange_rates/send.json @@ -1,51 +1,44 @@ { - "$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 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" } + } } diff --git a/config/v3/forget/send.json b/config/v3/forget/send.json index d15851c68..a991a28ba 100644 --- a/config/v3/forget/send.json +++ b/config/v3/forget/send.json @@ -1,26 +1,24 @@ { - "$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. Maximum size is 3500 bytes.", + "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 6a90282e3..e9192cbce 100644 --- a/config/v3/forget_all/send.json +++ b/config/v3/forget_all/send.json @@ -1,57 +1,55 @@ { - "$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" - } - } - ] + "$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" }, - "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" + { + "type": "array", + "items": { + "$ref": "#/definitions/stream_types" + } } + ] }, - "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" - ] - } + "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" + ] } + } } diff --git a/config/v3/get_account_status/send.json b/config/v3/get_account_status/send.json index 5e8837d37..811ccc148 100644 --- a/config/v3/get_account_status/send.json +++ b/config/v3/get_account_status/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 b7575dbed..39b932379 100644 --- a/config/v3/get_financial_assessment/send.json +++ b/config/v3/get_financial_assessment/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } + } } diff --git a/config/v3/get_limits/send.json b/config/v3/get_limits/send.json index 6d84a071b..6fd7333b9 100644 --- a/config/v3/get_limits/send.json +++ b/config/v3/get_limits/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 098ded986..c90510079 100644 --- a/config/v3/get_self_exclusion/send.json +++ b/config/v3/get_self_exclusion/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 1646a557c..56fc39a94 100644 --- a/config/v3/get_settings/send.json +++ b/config/v3/get_settings/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 545892a9f..75ac374ed 100644 --- a/config/v3/identity_verification_document_add/send.json +++ b/config/v3/identity_verification_document_add/send.json @@ -1,56 +1,52 @@ { - "$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. Maximum size is 3500 bytes.", + "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 779484386..a11f7d6c0 100644 --- a/config/v3/kyc_auth_status/send.json +++ b/config/v3/kyc_auth_status/send.json @@ -1,58 +1,52 @@ { - "$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. Maximum size is 3500 bytes.", + "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 230905828..11075a375 100644 --- a/config/v3/landing_company/receive.json +++ b/config/v3/landing_company/receive.json @@ -1,1752 +1,1426 @@ { - "$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 - } - } + "$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"] + } + } + } + }, + "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" + } }, - "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 - } - } + "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] }, - "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 - ] - } - } + "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"] + } } + } + }, + "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"] + } } + } }, - "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 - ] - } - } - } + "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"] + } } + } }, - "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 - ] - } - } - } + "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"] + } } + } }, - "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", + "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"] + } + } + } + }, + "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] + } + } + }, + "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", - "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 - ] + "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"] + } }, - "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"] + } } + } + }, + "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" }, - "forbidden_postcode_pattern": { - "description": "Forbidden postcode pattern", + "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" + } }, - "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" - ] - } - } - } - }, - "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 - ] + "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"] + } }, - "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"] + } } + } + }, + "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" + } }, - "id": { - "description": "Country code", + "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" + } }, - "is_idv_supported": { - "description": "Flag to indicate if idv is supported or not", - "type": "integer", - "enum": [ - 1, - 0 - ] + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string" + } }, - "lc_to_open_mf_account": { - "description": "Open mf account lc details.", + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { "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" - ] - } - }, - "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 - ] - } - } - } - } + "legal_default_currency": { + "description": "Default account currency", + "type": "string" }, - "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 - ] - } - } + "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_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 - ] - } - } + "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"] + } } + } }, - "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 - ] - } - } - } - } + "shortcode": { + "description": "Landing Company short code", + "type": "string" }, - "name": { - "description": "Country name", + "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" + } }, - "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", + "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] } + } } + } + }, + "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] }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" + "skip_deposit_verification": { + "description": "Flag to indicate whether to skip deposit verifcation or not.", + "type": "integer", + "enum": [0, 1] }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": [ - "landing_company" - ] + "ukgc_funds_protection": { + "description": "Flag to indicate ukgc funds protection setting.", + "type": "integer", + "enum": [0, 1] }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "virtual_company": { + "description": "Virtual Company", + "type": "string" } + } + }, + "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 bc5fc72e9..c5e862619 100644 --- a/config/v3/landing_company/send.json +++ b/config/v3/landing_company/send.json @@ -1,27 +1,25 @@ { - "$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. Maximum size is 3500 bytes.", + "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 bc3328704..49b4cc896 100644 --- a/config/v3/landing_company_details/send.json +++ b/config/v3/landing_company_details/send.json @@ -1,44 +1,42 @@ { - "$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. Maximum size is 3500 bytes.", + "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 fbf2382bb..22e02bd8d 100644 --- a/config/v3/login_history/send.json +++ b/config/v3/login_history/send.json @@ -1,43 +1,37 @@ { - "$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. Maximum size is 3500 bytes.", + "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 8e5473635..967397298 100644 --- a/config/v3/logout/send.json +++ b/config/v3/logout/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 0692b4da4..cb5847aef 100644 --- a/config/v3/mt5_deposit/send.json +++ b/config/v3/mt5_deposit/send.json @@ -1,46 +1,39 @@ { - "$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]+$" + }, + "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/mt5_get_settings/send.json b/config/v3/mt5_get_settings/send.json index 15b874e84..401baa618 100644 --- a/config/v3/mt5_get_settings/send.json +++ b/config/v3/mt5_get_settings/send.json @@ -1,37 +1,30 @@ { - "$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]+$" + }, + "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/mt5_login_list/send.json b/config/v3/mt5_login_list/send.json index 880ffd1ac..6a67a5703 100644 --- a/config/v3/mt5_login_list/send.json +++ b/config/v3/mt5_login_list/send.json @@ -1,31 +1,25 @@ { - "$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] + }, + "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/mt5_new_account/send.json b/config/v3/mt5_new_account/send.json index 201b8a6ae..55028722e 100644 --- a/config/v3/mt5_new_account/send.json +++ b/config/v3/mt5_new_account/send.json @@ -1,174 +1,134 @@ { - "$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 + }, + "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/mt5_password_change/send.json b/config/v3/mt5_password_change/send.json index 64720ecbe..1604dfc80 100644 --- a/config/v3/mt5_password_change/send.json +++ b/config/v3/mt5_password_change/send.json @@ -1,60 +1,48 @@ { - "$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"] + }, + "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/mt5_password_check/send.json b/config/v3/mt5_password_check/send.json index a2215f302..ec2323283 100644 --- a/config/v3/mt5_password_check/send.json +++ b/config/v3/mt5_password_check/send.json @@ -1,53 +1,42 @@ { - "$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"] + }, + "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/mt5_password_reset/send.json b/config/v3/mt5_password_reset/send.json index a35101024..687c4c7a6 100644 --- a/config/v3/mt5_password_reset/send.json +++ b/config/v3/mt5_password_reset/send.json @@ -1,59 +1,47 @@ { - "$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}$" + }, + "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/mt5_withdrawal/send.json b/config/v3/mt5_withdrawal/send.json index 1e3fb58d0..8afe8ad1e 100644 --- a/config/v3/mt5_withdrawal/send.json +++ b/config/v3/mt5_withdrawal/send.json @@ -1,48 +1,39 @@ { - "$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]+$" + }, + "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/new_account_maltainvest/send.json b/config/v3/new_account_maltainvest/send.json index cc4843d5f..f6cc27f17 100644 --- a/config/v3/new_account_maltainvest/send.json +++ b/config/v3/new_account_maltainvest/send.json @@ -1,414 +1,369 @@ { - "$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. Maximum size is 3500 bytes.", + "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 04516908c..779e29872 100644 --- a/config/v3/new_account_real/send.json +++ b/config/v3/new_account_real/send.json @@ -1,192 +1,167 @@ { - "$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. Maximum size is 3500 bytes.", + "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 700081fc6..f6d347ca3 100644 --- a/config/v3/new_account_virtual/send.json +++ b/config/v3/new_account_virtual/send.json @@ -1,233 +1,220 @@ { - "$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. 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 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. 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 fe468d841..824c3a306 100644 --- a/config/v3/oauth_apps/send.json +++ b/config/v3/oauth_apps/send.json @@ -1,36 +1,30 @@ { - "$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. 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_advert_create/receive.json b/config/v3/p2p_advert_create/receive.json index 92924d508..b62336c22 100644 --- a/config/v3/p2p_advert_create/receive.json +++ b/config/v3/p2p_advert_create/receive.json @@ -1,498 +1,410 @@ { - "$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" + "$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" }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": [ - "null", - "number" - ] + "required": { + "description": "Is field required or optional.", + "type": "integer" }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": [ - "integer", - "null" - ] + "type": { + "description": "Field type.", + "type": "string", + "enum": ["text", "memo"] }, - "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" - }, - "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" - } - } - } + "value": { + "description": "Current value of payment method field.", + "type": "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" - ] + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [0, 1] }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": [ - "null", - "string" - ] + "method": { + "description": "Payment method identifier.", + "type": "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": { + "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" + } }, - "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.", + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": ["array", "null"], + "items": { "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" }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" }, - "msg_type": { - "description": "Action name of the request made.", + "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": [ - "p2p_advert_create" + "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" ] - }, - "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 d552efbb5..a9f0f8b54 100644 --- a/config/v3/p2p_advert_create/send.json +++ b/config/v3/p2p_advert_create/send.json @@ -1,143 +1,121 @@ { - "$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"] + }, + "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_advert_info/receive.json b/config/v3/p2p_advert_info/receive.json index d86036e39..58537a3ec 100644 --- a/config/v3/p2p_advert_info/receive.json +++ b/config/v3/p2p_advert_info/receive.json @@ -1,519 +1,412 @@ { - "$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" + "$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" }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": [ - "null", - "number" - ] + "required": { + "description": "Is field required or optional.", + "type": "integer" }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": [ - "integer", - "null" - ] + "type": { + "description": "Field type.", + "type": "string", + "enum": ["text", "memo"] }, - "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" - ] + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 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" - }, - "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" + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [0, 1] }, - "days_until_archive": { - "description": "Days until automatic inactivation of this ad, if no activity occurs.", - "type": "integer" + "method": { + "description": "Payment method identifier.", + "type": "string" }, - "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": { + "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" + } }, - "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.", + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": ["array", "null"], + "items": { "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" - ] - } + } } + } } + } }, - "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" - ] - } - } + "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" }, - "msg_type": { - "description": "Action name of the request made.", + "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": [ - "p2p_advert_info" + "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" ] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + } + } + } + }, + "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": ["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 b92c7cda3..5d10eb3d4 100644 --- a/config/v3/p2p_advert_info/send.json +++ b/config/v3/p2p_advert_info/send.json @@ -1,52 +1,41 @@ { - "$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] + }, + "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_advert_list/receive.json b/config/v3/p2p_advert_list/receive.json index 291b08ce3..f39e9104c 100644 --- a/config/v3/p2p_advert_list/receive.json +++ b/config/v3/p2p_advert_list/receive.json @@ -1,425 +1,344 @@ { - "$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.", + "$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": { "type": "object", "additionalProperties": false, "required": [ - "list" + "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": { - "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" - ] - } - } - } - } + "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" + ] + } + } } - }, - "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 f4a6f5913..9efe63389 100644 --- a/config/v3/p2p_advert_list/send.json +++ b/config/v3/p2p_advert_list/send.json @@ -1,114 +1,91 @@ { - "$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] + }, + "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_advert_update/receive.json b/config/v3/p2p_advert_update/receive.json index 51400c24a..8d8aac83a 100644 --- a/config/v3/p2p_advert_update/receive.json +++ b/config/v3/p2p_advert_update/receive.json @@ -1,476 +1,384 @@ { - "$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" + "$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" }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": [ - "null", - "number" - ] + "required": { + "description": "Is field required or optional.", + "type": "integer" }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": [ - "integer", - "null" - ] + "type": { + "description": "Field type.", + "type": "string", + "enum": ["text", "memo"] }, - "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" - }, - "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" - } - } - } + "value": { + "description": "Current value of payment method field.", + "type": "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" - ] + "is_enabled": { + "description": "Indicates if this method is available on adverts.", + "type": "integer", + "enum": [0, 1] }, - "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" + "method": { + "description": "Payment method identifier.", + "type": "string" }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", + "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" + } }, - "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.", + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": ["array", "null"], + "items": { "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"] }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" + "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" }, - "msg_type": { - "description": "Action name of the request made.", + "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": [ - "p2p_advert_update" + "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" ] - }, - "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 7cf845680..b8fb3e793 100644 --- a/config/v3/p2p_advert_update/send.json +++ b/config/v3/p2p_advert_update/send.json @@ -1,137 +1,112 @@ { - "$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 + }, + "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_adverts/receive.json b/config/v3/p2p_advertiser_adverts/receive.json index 05dd2b8e1..ac9782acc 100644 --- a/config/v3/p2p_advertiser_adverts/receive.json +++ b/config/v3/p2p_advertiser_adverts/receive.json @@ -1,408 +1,339 @@ { - "$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.", + "$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": { "type": "object", "additionalProperties": false, "required": [ - "list" + "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": { - "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" - ] - } - } - } - } + "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" + ] + } + } } - }, - "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 20aae8d86..6defcca42 100644 --- a/config/v3/p2p_advertiser_adverts/send.json +++ b/config/v3/p2p_advertiser_adverts/send.json @@ -1,42 +1,36 @@ { - "$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 + }, + "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_create/send.json b/config/v3/p2p_advertiser_create/send.json index 6a9adaa96..37c084882 100644 --- a/config/v3/p2p_advertiser_create/send.json +++ b/config/v3/p2p_advertiser_create/send.json @@ -1,63 +1,54 @@ { - "$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] + }, + "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_info/send.json b/config/v3/p2p_advertiser_info/send.json index faed809b8..9e6555ed0 100644 --- a/config/v3/p2p_advertiser_info/send.json +++ b/config/v3/p2p_advertiser_info/send.json @@ -1,43 +1,35 @@ { - "$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] + }, + "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_list/send.json b/config/v3/p2p_advertiser_list/send.json index f60fbe532..fddbafc98 100644 --- a/config/v3/p2p_advertiser_list/send.json +++ b/config/v3/p2p_advertiser_list/send.json @@ -1,72 +1,56 @@ { - "$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] + }, + "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_payment_methods/send.json b/config/v3/p2p_advertiser_payment_methods/send.json index 52fcfef9f..0cb4999ef 100644 --- a/config/v3/p2p_advertiser_payment_methods/send.json +++ b/config/v3/p2p_advertiser_payment_methods/send.json @@ -1,94 +1,86 @@ { - "$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 - ] + "$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}$" + } }, - "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 - }, - "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" + "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 + }, + "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 57787b67c..89db4eb1d 100644 --- a/config/v3/p2p_advertiser_relations/send.json +++ b/config/v3/p2p_advertiser_relations/send.json @@ -1,67 +1,61 @@ { - "$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 + }, + "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_update/send.json b/config/v3/p2p_advertiser_update/send.json index 4e2518ff9..f88729d21 100644 --- a/config/v3/p2p_advertiser_update/send.json +++ b/config/v3/p2p_advertiser_update/send.json @@ -1,72 +1,58 @@ { - "$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] + }, + "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_chat_create/send.json b/config/v3/p2p_chat_create/send.json index d12f9afff..5744019c3 100644 --- a/config/v3/p2p_chat_create/send.json +++ b/config/v3/p2p_chat_create/send.json @@ -1,37 +1,30 @@ { - "$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]+$" + }, + "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_order_cancel/send.json b/config/v3/p2p_order_cancel/send.json index 6f839cd9a..09d16eaa9 100644 --- a/config/v3/p2p_order_cancel/send.json +++ b/config/v3/p2p_order_cancel/send.json @@ -1,37 +1,30 @@ { - "$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]+$" + }, + "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_order_confirm/send.json b/config/v3/p2p_order_confirm/send.json index 227b8194f..3c094c119 100644 --- a/config/v3/p2p_order_confirm/send.json +++ b/config/v3/p2p_order_confirm/send.json @@ -1,50 +1,40 @@ { - "$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" + }, + "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_order_create/send.json b/config/v3/p2p_order_create/send.json index 6a01bb942..6abab41ea 100644 --- a/config/v3/p2p_order_create/send.json +++ b/config/v3/p2p_order_create/send.json @@ -1,73 +1,63 @@ { - "$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] + }, + "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_order_dispute/send.json b/config/v3/p2p_order_dispute/send.json index 8648475d7..f2c52c6b1 100644 --- a/config/v3/p2p_order_dispute/send.json +++ b/config/v3/p2p_order_dispute/send.json @@ -1,49 +1,41 @@ { - "$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]+$" + }, + "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_order_info/send.json b/config/v3/p2p_order_info/send.json index dc3c1f67c..f2cd73790 100644 --- a/config/v3/p2p_order_info/send.json +++ b/config/v3/p2p_order_info/send.json @@ -1,44 +1,35 @@ { - "$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] + }, + "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_order_list/send.json b/config/v3/p2p_order_list/send.json index 342d4482c..69a08a252 100644 --- a/config/v3/p2p_order_list/send.json +++ b/config/v3/p2p_order_list/send.json @@ -1,72 +1,61 @@ { - "$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] + }, + "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_order_review/send.json b/config/v3/p2p_order_review/send.json index d4a161144..7b3f798c3 100644 --- a/config/v3/p2p_order_review/send.json +++ b/config/v3/p2p_order_review/send.json @@ -1,56 +1,41 @@ { - "$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] + }, + "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_payment_methods/send.json b/config/v3/p2p_payment_methods/send.json index fd15fd029..a363b009d 100644 --- a/config/v3/p2p_payment_methods/send.json +++ b/config/v3/p2p_payment_methods/send.json @@ -1,31 +1,25 @@ { - "$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] + }, + "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_ping/send.json b/config/v3/p2p_ping/send.json index 59278a7cf..a9c1dd254 100644 --- a/config/v3/p2p_ping/send.json +++ b/config/v3/p2p_ping/send.json @@ -1,31 +1,25 @@ { - "$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] + }, + "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_settings/send.json b/config/v3/p2p_settings/send.json index 289c5d308..071d7b8b7 100644 --- a/config/v3/p2p_settings/send.json +++ b/config/v3/p2p_settings/send.json @@ -1,38 +1,30 @@ { - "$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] + }, + "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/payment_methods/send.json b/config/v3/payment_methods/send.json index b8af333f3..b07018a1e 100644 --- a/config/v3/payment_methods/send.json +++ b/config/v3/payment_methods/send.json @@ -1,38 +1,34 @@ { - "$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. 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_create/send.json b/config/v3/paymentagent_create/send.json index 19e24ea92..3e463678e 100644 --- a/config/v3/paymentagent_create/send.json +++ b/config/v3/paymentagent_create/send.json @@ -1,133 +1,121 @@ { - "$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.", + "$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", "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.", + "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": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,500}$" - }, - "payment_agent_name": { - "description": "The name with which the payment agent is going to be identified.", + "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": "^[\\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 \\.-]*$" - } - } - } - }, - "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" + "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\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" } + } } diff --git a/config/v3/paymentagent_details/send.json b/config/v3/paymentagent_details/send.json index 1b8eac6ca..e85d09e02 100644 --- a/config/v3/paymentagent_details/send.json +++ b/config/v3/paymentagent_details/send.json @@ -1,31 +1,25 @@ { - "$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] + }, + "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_list/send.json b/config/v3/paymentagent_list/send.json index 8b4ef3f48..d9e70d5a4 100644 --- a/config/v3/paymentagent_list/send.json +++ b/config/v3/paymentagent_list/send.json @@ -1,32 +1,30 @@ { - "$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}$" + }, + "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_transfer/send.json b/config/v3/paymentagent_transfer/send.json index 4bf8def1a..e61eabf62 100644 --- a/config/v3/paymentagent_transfer/send.json +++ b/config/v3/paymentagent_transfer/send.json @@ -1,61 +1,49 @@ { - "$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]+$" + }, + "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_withdraw/send.json b/config/v3/paymentagent_withdraw/send.json index 63ee88f2a..3d42d8d6c 100644 --- a/config/v3/paymentagent_withdraw/send.json +++ b/config/v3/paymentagent_withdraw/send.json @@ -1,67 +1,60 @@ { - "$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}$" + }, + "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_withdraw_justification/send.json b/config/v3/paymentagent_withdraw_justification/send.json index 528084a20..a524bd382 100644 --- a/config/v3/paymentagent_withdraw_justification/send.json +++ b/config/v3/paymentagent_withdraw_justification/send.json @@ -1,37 +1,31 @@ { - "$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 + }, + "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/payout_currencies/send.json b/config/v3/payout_currencies/send.json index 7d58b5fbb..9c2a274a8 100644 --- a/config/v3/payout_currencies/send.json +++ b/config/v3/payout_currencies/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 f18e093c3..42d1ca085 100644 --- a/config/v3/ping/send.json +++ b/config/v3/ping/send.json @@ -1,28 +1,24 @@ { - "$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. Maximum size is 3500 bytes.", + "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 66e490be9..0ee0e4995 100644 --- a/config/v3/portfolio/send.json +++ b/config/v3/portfolio/send.json @@ -1,84 +1,77 @@ { - "$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": [ + "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" } + } } diff --git a/config/v3/profit_table/send.json b/config/v3/profit_table/send.json index cbc22e7c0..22e07eecc 100644 --- a/config/v3/profit_table/send.json +++ b/config/v3/profit_table/send.json @@ -1,124 +1,111 @@ { - "$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. 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/send.json b/config/v3/proposal/send.json index 898542ba8..579b64c1f 100644 --- a/config/v3/proposal/send.json +++ b/config/v3/proposal/send.json @@ -1,204 +1,180 @@ { - "$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. 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 (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. 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 124b67e2b..c282466ed 100644 --- a/config/v3/proposal_open_contract/receive.json +++ b/config/v3/proposal_open_contract/receive.json @@ -1,778 +1,585 @@ { - "$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", + "$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" - }, - "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" - ] - }, - "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.", + }, + "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" + }, + "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" }, - "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" - ] + "order_amount": { + "description": "Stop loss amount", + "type": ["null", "number"] }, - "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 - ] + "order_date": { + "description": "Stop loss order epoch", + "type": "integer" }, - "tick_count": { - "description": "Only for tick trades, number of ticks", - "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" }, - "tick_passed": { - "description": "[Only for accumulator] Number of ticks passed since entry_tick", - "type": "integer", - "examples": [ - 500 - ] + "order_amount": { + "description": "Stop out amount", + "type": "number" }, - "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" - ] - } - } - } + "order_date": { + "description": "Stop out order epoch", + "type": "integer" }, - "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" - } - } + "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" }, - "underlying": { - "description": "The underlying symbol code.", - "type": "string", - "examples": [ - "R_50" - ] + "order_amount": { + "description": "Take profit amount", + "type": ["null", "number"] }, - "validation_error": { - "description": "Error message if validation fails", - "type": "string" + "order_date": { + "description": "Take profit order epoch", + "type": "integer" }, - "validation_error_code": { - "description": "Error code if validation fails", - "type": "string" + "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" }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", + "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, - "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" - ] - } + "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" } + } }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" + "underlying": { + "description": "The underlying symbol code.", + "type": "string", + "examples": ["R_50"] }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": [ - "proposal_open_contract" - ] + "validation_error": { + "description": "Error message if validation fails", + "type": "string" }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "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"] } + } + }, + "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 9c50c5cd4..099c1a7c0 100644 --- a/config/v3/proposal_open_contract/send.json +++ b/config/v3/proposal_open_contract/send.json @@ -1,48 +1,39 @@ { - "$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. Maximum size is 3500 bytes.", + "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 1825f0b75..dd555398b 100644 --- a/config/v3/reality_check/send.json +++ b/config/v3/reality_check/send.json @@ -1,37 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 ea07e3350..5c25d82d8 100644 --- a/config/v3/residence_list/send.json +++ b/config/v3/residence_list/send.json @@ -1,28 +1,24 @@ { - "$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. Maximum size is 3500 bytes.", + "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 2033ee130..88d935913 100644 --- a/config/v3/revoke_oauth_app/send.json +++ b/config/v3/revoke_oauth_app/send.json @@ -1,33 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "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 754f591cc..62944d51c 100644 --- a/config/v3/sell/send.json +++ b/config/v3/sell/send.json @@ -1,38 +1,33 @@ { - "$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. Maximum size is 3500 bytes.", + "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 0179b22f5..ba6929295 100644 --- a/config/v3/sell_contract_for_multiple_accounts/send.json +++ b/config/v3/sell_contract_for_multiple_accounts/send.json @@ -1,57 +1,48 @@ { - "$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. Maximum size is 3500 bytes.", + "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 ea74ac85e..95d9e3ae3 100644 --- a/config/v3/sell_expired/send.json +++ b/config/v3/sell_expired/send.json @@ -1,36 +1,30 @@ { - "$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. 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_account_currency/send.json b/config/v3/set_account_currency/send.json index 43e7a58e6..11b1597fe 100644 --- a/config/v3/set_account_currency/send.json +++ b/config/v3/set_account_currency/send.json @@ -1,34 +1,30 @@ { - "$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. 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_financial_assessment/send.json b/config/v3/set_financial_assessment/send.json index 404303fec..4f3b937f6 100644 --- a/config/v3/set_financial_assessment/send.json +++ b/config/v3/set_financial_assessment/send.json @@ -1,566 +1,495 @@ { - "$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 - ] - }, + "$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" - ] - }, - "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" - ] + "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": "[Optional] Level of Education.", - "type": "string", - "enum": [ - "Primary", - "Secondary", - "Tertiary" - ] + "description": "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" - ] + "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" - ] + "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" - ] - }, - "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" - ] - }, - "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": "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": "[Optional] Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] + "description": "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" - ] + "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": "[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" - ] + "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"] + }, + "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"] + }, + "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" - ] + "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" - ] + "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"] }, - "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" - ] + "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." + ] }, - "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" - ] - } - } + "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_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" - ] - } - } + "risk_tolerance": { + "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", + "type": "string", + "enum": ["Yes", "No"] }, - "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]+$" + "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." + ] }, - "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" + "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"] }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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" } + } } diff --git a/config/v3/set_self_exclusion/send.json b/config/v3/set_self_exclusion/send.json index 0bf84b8c8..d2161cb60 100644 --- a/config/v3/set_self_exclusion/send.json +++ b/config/v3/set_self_exclusion/send.json @@ -1,140 +1,92 @@ { - "$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. 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_settings/send.json b/config/v3/set_settings/send.json index d37b277da..2017c2d60 100644 --- a/config/v3/set_settings/send.json +++ b/config/v3/set_settings/send.json @@ -1,242 +1,186 @@ { - "$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. 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 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. 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 7999e4465..9fe5e6837 100644 --- a/config/v3/statement/send.json +++ b/config/v3/statement/send.json @@ -1,83 +1,73 @@ { - "$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. Maximum size is 3500 bytes.", + "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 61c307211..1ce0be12e 100644 --- a/config/v3/states_list/send.json +++ b/config/v3/states_list/send.json @@ -1,27 +1,25 @@ { - "$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. 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/send.json b/config/v3/ticks/send.json index e6003ce46..698117a22 100644 --- a/config/v3/ticks/send.json +++ b/config/v3/ticks/send.json @@ -1,44 +1,40 @@ { - "$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}$" - } - } - ] + "$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}$" }, - "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" + { + "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. 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 bdcfca3ec..00e5a01f5 100644 --- a/config/v3/ticks_history/send.json +++ b/config/v3/ticks_history/send.json @@ -1,84 +1,61 @@ { - "$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. Maximum size is 3500 bytes.", + "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 5eaf26ab3..ce39b1af1 100644 --- a/config/v3/time/send.json +++ b/config/v3/time/send.json @@ -1,28 +1,24 @@ { - "$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. Maximum size is 3500 bytes.", + "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 12afa27ac..52b8dfee7 100644 --- a/config/v3/tnc_approval/send.json +++ b/config/v3/tnc_approval/send.json @@ -1,50 +1,40 @@ { - "$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. Maximum size is 3500 bytes.", + "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 57590a06d..5e47aed3f 100644 --- a/config/v3/topup_virtual/send.json +++ b/config/v3/topup_virtual/send.json @@ -1,36 +1,30 @@ { - "$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. Maximum size is 3500 bytes.", + "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 d62877899..db5a36f0f 100644 --- a/config/v3/trading_durations/send.json +++ b/config/v3/trading_durations/send.json @@ -1,61 +1,57 @@ { - "$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. Maximum size is 3500 bytes.", + "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 9263a2345..ed688592f 100644 --- a/config/v3/trading_platform_investor_password_reset/send.json +++ b/config/v3/trading_platform_investor_password_reset/send.json @@ -1,57 +1,51 @@ { - "$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}$" + }, + "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/trading_platform_password_reset/send.json b/config/v3/trading_platform_password_reset/send.json index e65eb4b75..0fe0f5af3 100644 --- a/config/v3/trading_platform_password_reset/send.json +++ b/config/v3/trading_platform_password_reset/send.json @@ -1,53 +1,41 @@ { - "$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}$" + }, + "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/trading_servers/send.json b/config/v3/trading_servers/send.json index ac45b3308..e7ca4f56f 100644 --- a/config/v3/trading_servers/send.json +++ b/config/v3/trading_servers/send.json @@ -1,74 +1,53 @@ { - "$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. Maximum size is 3500 bytes.", + "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 edf43da67..2c865de90 100644 --- a/config/v3/trading_times/send.json +++ b/config/v3/trading_times/send.json @@ -1,26 +1,24 @@ { - "$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. Maximum size is 3500 bytes.", + "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 82abd44e9..e135ca3e8 100644 --- a/config/v3/transaction/send.json +++ b/config/v3/transaction/send.json @@ -1,45 +1,35 @@ { - "$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. Maximum size is 3500 bytes.", + "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 3cf8b1dec..b376cd91e 100644 --- a/config/v3/transfer_between_accounts/receive.json +++ b/config/v3/transfer_between_accounts/receive.json @@ -1,153 +1,117 @@ { - "$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", + "$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", "enum": [ - 0, - 1 + "binary", + "crypto", + "ctrader", + "doughflow", + "dxtrade", + "derivez", + "mt5", + "p2p", + "paymentagent", + "paymentagent_client", + "standard", + "virtual" ] - }, - "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", + }, + "balance": { + "description": "Account balance.", "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.", + }, + "currency": { + "description": "Default account currency.", "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" + "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" + }, + "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 db3de379b..08a764ab6 100644 --- a/config/v3/transfer_between_accounts/send.json +++ b/config/v3/transfer_between_accounts/send.json @@ -1,65 +1,56 @@ { - "$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. Maximum size is 3500 bytes.", + "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 9e29a2871..c12da7aca 100644 --- a/config/v3/unsubscribe_email/send.json +++ b/config/v3/unsubscribe_email/send.json @@ -1,38 +1,32 @@ { - "$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. 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/send.json b/config/v3/verify_email/send.json index e65091455..3ef7c7d84 100644 --- a/config/v3/verify_email/send.json +++ b/config/v3/verify_email/send.json @@ -1,244 +1,238 @@ { - "$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" - } - ] - } + "$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" } + ] }, - "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_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" + } + ] }, - "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" + "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" + } + ] }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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" + } + ] } + } + }, + "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 b9c816651..f71ca1a0e 100644 --- a/config/v3/verify_email_cellxpert/send.json +++ b/config/v3/verify_email_cellxpert/send.json @@ -1,240 +1,232 @@ { - "$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" - } - ] - } + "$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" } + ] }, - "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_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" + } + ] }, - "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" + "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" + } + ] }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "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" + } + ] } + } + }, + "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 1b9747d45..dbff2c41f 100644 --- a/config/v3/website_status/send.json +++ b/config/v3/website_status/send.json @@ -1,36 +1,29 @@ { - "$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. Maximum size is 3500 bytes.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } + } } diff --git a/src/configs/websocket/index.ts b/src/configs/websocket/index.ts index a6b49de63..fd1aa630f 100644 --- a/src/configs/websocket/index.ts +++ b/src/configs/websocket/index.ts @@ -40,19 +40,15 @@ export class ApiManager { } public augmentedSend( - name: T, - request?: TSocketRequestProps extends never ? undefined : TSocketRequestProps, + request: TSocketRequestProps extends never ? undefined : TSocketRequestProps, ): Promise> { - return this.derivApi.send({ [name]: 1, ...request }) as Promise>; + return this.derivApi.send(request) as Promise>; } public augmentedSubscribe( - name: T, request?: TSocketRequestProps extends never ? undefined : TSocketRequestProps, ): Observable> { - return this.derivApi.subscribe({ [name]: 1, subscribe: 1, ...request }) as Observable< - TSocketResponse - >; + return this.derivApi.subscribe(request) as Observable>; } public authorize(token: string) { diff --git a/src/features/Apiexplorer/RequestJSONBox/__tests__/RequestJsonBox.test.tsx b/src/features/Apiexplorer/RequestJSONBox/__tests__/RequestJsonBox.test.tsx index 7c74c52cd..599ebd1ee 100644 --- a/src/features/Apiexplorer/RequestJSONBox/__tests__/RequestJsonBox.test.tsx +++ b/src/features/Apiexplorer/RequestJSONBox/__tests__/RequestJsonBox.test.tsx @@ -86,18 +86,6 @@ describe('RequestResponseRenderer', () => { expect(placeholder).toHaveLength(1); }); - it('should disable text box if no api call is selected in the dropdown', () => { - const newProps = { - handleChange: jest.fn(), - request_example: '', - name: null as TSocketEndpointNames, - auth: 0, - }; - render(); - const textarea = screen.getByLabelText('Request JSON'); - expect(textarea).toBeDisabled(); - }); - it('should disable text box if no api call is selected in the dropdown', async () => { const newProps = { handleChange: jest.fn(), diff --git a/src/features/Apiexplorer/RequestJSONBox/index.tsx b/src/features/Apiexplorer/RequestJSONBox/index.tsx index 88b409c87..495ac3aa5 100644 --- a/src/features/Apiexplorer/RequestJSONBox/index.tsx +++ b/src/features/Apiexplorer/RequestJSONBox/index.tsx @@ -22,15 +22,6 @@ function RequestJSONBox({ const is_subscribe = useMemo(() => { return request_example?.includes('subscribe'); }, [request_example]); - const [isdisabled, setIsDisabled] = useState(false); - - useEffect(() => { - if (name === null) { - setIsDisabled(true); - } else { - setIsDisabled(false); - } - }, [name]); return (
@@ -44,7 +35,6 @@ function RequestJSONBox({ placeholder={'Request JSON'} onChange={handleChange} value={request_example} - disabled={isdisabled} > {is_subscribe ? ( { wsServer.send({ echo_req: { app_markup_percentage: 0, - app_register: 1, name: 'test app wrong name fake', + app_register: 1, redirect_uri: 'https://example.com', req_id: 1, scopes: [], diff --git a/src/hooks/useSubscription/index.tsx b/src/hooks/useSubscription/index.tsx index a11725c78..06b25cbdb 100644 --- a/src/hooks/useSubscription/index.tsx +++ b/src/hooks/useSubscription/index.tsx @@ -36,10 +36,16 @@ const useSubscription = (name: T) => }, []); const subscribe = useCallback( - (data: Parameters>[1]) => { + (data: Parameters>[0]) => { + let payload = data; + if (name) { + payload = { [name]: 1, subscribe: 1, ...payload }; + } else { + payload = { subscribe: 1, ...payload }; + } setIsLoading(true); setSubscribed(true); - const subscriber_ref = apiManager.augmentedSubscribe(name, data).subscribe(onData, onError); + const subscriber_ref = apiManager.augmentedSubscribe(payload).subscribe(onData, onError); setSubscriber(subscriber_ref); return subscriber_ref; }, diff --git a/src/hooks/useWs/index.tsx b/src/hooks/useWs/index.tsx index b8ac97aae..4a2c96c54 100644 --- a/src/hooks/useWs/index.tsx +++ b/src/hooks/useWs/index.tsx @@ -6,7 +6,7 @@ import { } from '@site/src/configs/websocket/types'; import { useCallback, useState } from 'react'; -const useWS = (name: T) => { +const useWS = (name?: T) => { const [is_loading, setIsLoading] = useState(false); const [error, setError] = useState(); const [data, setData] = useState>(); @@ -19,10 +19,21 @@ const useWS = (name: T) => { }, []); const send = useCallback( - async (data?: Parameters>[1]) => { + async (data?: Parameters>[0]) => { + let payload = data; + + if (name) { + if (payload === undefined || name == 'api_token' || name == 'app_register') { + payload = { [name]: 1, ...payload }; + } + } else { + payload = { ...payload }; + } + setIsLoading(true); + try { - const response = await apiManager.augmentedSend(name, data); + const response = await apiManager.augmentedSend(payload); const key = response['msg_type'] ?? name; setData(response[key] as TSocketResponseData); setFullResponse(response);