From c1979be05a32516604635e6ed7a705b4970261d4 Mon Sep 17 00:00:00 2001 From: user Date: Wed, 13 Sep 2023 01:45:47 +0000 Subject: [PATCH] JSON Schema Update --- _data/v3.yml | 231 ++ config/v3/active_symbols/example.json | 4 +- config/v3/active_symbols/receive.json | 287 +- config/v3/active_symbols/send.json | 102 +- config/v3/api_token/example.json | 10 +- config/v3/api_token/receive.json | 153 +- config/v3/api_token/send.json | 109 +- config/v3/app_delete/example.json | 2 +- config/v3/app_delete/receive.json | 53 +- config/v3/app_delete/send.json | 47 +- config/v3/app_get/example.json | 2 +- config/v3/app_get/receive.json | 167 +- config/v3/app_get/send.json | 47 +- config/v3/app_list/example.json | 2 +- config/v3/app_list/receive.json | 190 +- config/v3/app_list/send.json | 51 +- config/v3/app_markup_details/example.json | 28 +- config/v3/app_markup_details/receive.json | 153 +- config/v3/app_markup_details/send.json | 168 +- config/v3/app_markup_statistics/example.json | 10 +- config/v3/app_markup_statistics/receive.json | 121 +- config/v3/app_markup_statistics/send.json | 73 +- config/v3/app_register/example.json | 21 +- config/v3/app_register/receive.json | 167 +- config/v3/app_register/send.json | 158 +- config/v3/app_update/example.json | 21 +- config/v3/app_update/receive.json | 145 +- config/v3/app_update/send.json | 154 +- config/v3/asset_index/example.json | 2 +- config/v3/asset_index/receive.json | 53 +- config/v3/asset_index/send.json | 89 +- config/v3/authorize/example.json | 2 +- config/v3/authorize/receive.json | 498 ++- config/v3/authorize/send.json | 62 +- config/v3/balance/example.json | 4 +- config/v3/balance/receive.json | 408 ++- config/v3/balance/send.json | 77 +- config/v3/buy/example.json | 4 +- config/v3/buy/receive.json | 175 +- config/v3/buy/send.json | 401 +-- .../example.json | 16 +- .../receive.json | 227 +- .../send.json | 314 +- config/v3/cancel/example.json | 2 +- config/v3/cancel/receive.json | 91 +- config/v3/cancel/send.json | 47 +- config/v3/cashier/example.json | 6 +- config/v3/cashier/receive.json | 192 +- config/v3/cashier/send.json | 127 +- config/v3/contract_update/example.json | 10 +- config/v3/contract_update/receive.json | 157 +- config/v3/contract_update/send.json | 93 +- .../v3/contract_update_history/example.json | 4 +- .../v3/contract_update_history/receive.json | 106 +- config/v3/contract_update_history/send.json | 74 +- config/v3/contracts_for/example.json | 8 +- config/v3/contracts_for/receive.json | 524 +-- config/v3/contracts_for/send.json | 114 +- config/v3/copy_start/example.json | 2 +- config/v3/copy_start/receive.json | 53 +- config/v3/copy_start/send.json | 125 +- config/v3/copy_stop/example.json | 2 +- config/v3/copy_stop/receive.json | 53 +- config/v3/copy_stop/send.json | 51 +- config/v3/copytrading_list/example.json | 2 +- config/v3/copytrading_list/receive.json | 172 +- config/v3/copytrading_list/send.json | 51 +- config/v3/copytrading_statistics/example.json | 4 +- config/v3/copytrading_statistics/receive.json | 213 +- config/v3/copytrading_statistics/send.json | 58 +- config/v3/crypto_config/example.json | 2 +- config/v3/crypto_config/receive.json | 101 +- config/v3/crypto_config/send.json | 57 +- config/v3/document_upload/example.json | 10 +- config/v3/document_upload/receive.json | 106 +- config/v3/document_upload/send.json | 273 +- config/v3/economic_calendar/example.json | 8 +- config/v3/economic_calendar/receive.json | 173 +- config/v3/economic_calendar/send.json | 81 +- config/v3/exchange_rates/example.json | 4 +- config/v3/exchange_rates/receive.json | 123 +- config/v3/exchange_rates/send.json | 80 +- config/v3/forget/example.json | 2 +- config/v3/forget/receive.json | 58 +- config/v3/forget/send.json | 45 +- config/v3/forget_all/example.json | 2 +- config/v3/forget_all/receive.json | 53 +- config/v3/forget_all/send.json | 96 +- config/v3/get_account_status/example.json | 2 +- config/v3/get_account_status/receive.json | 756 +++-- config/v3/get_account_status/send.json | 51 +- .../v3/get_financial_assessment/example.json | 2 +- .../v3/get_financial_assessment/receive.json | 369 +-- config/v3/get_financial_assessment/send.json | 51 +- config/v3/get_limits/example.json | 2 +- config/v3/get_limits/receive.json | 274 +- config/v3/get_limits/send.json | 51 +- config/v3/get_self_exclusion/example.json | 2 +- config/v3/get_self_exclusion/receive.json | 163 +- config/v3/get_self_exclusion/send.json | 51 +- config/v3/get_settings/example.json | 2 +- config/v3/get_settings/receive.json | 440 +-- config/v3/get_settings/send.json | 51 +- .../example.json | 10 +- .../receive.json | 57 +- .../send.json | 93 +- config/v3/kyc_auth_status/example.json | 3 + config/v3/kyc_auth_status/receive.json | 114 + config/v3/kyc_auth_status/send.json | 32 + config/v3/landing_company/example.json | 2 +- config/v3/landing_company/receive.json | 2887 ++++++++++------- config/v3/landing_company/send.json | 47 +- .../v3/landing_company_details/example.json | 2 +- .../v3/landing_company_details/receive.json | 432 +-- config/v3/landing_company_details/send.json | 75 +- config/v3/login_history/example.json | 4 +- config/v3/login_history/receive.json | 110 +- config/v3/login_history/send.json | 65 +- config/v3/logout/example.json | 2 +- config/v3/logout/receive.json | 57 +- config/v3/logout/send.json | 47 +- config/v3/mt5_deposit/example.json | 8 +- config/v3/mt5_deposit/receive.json | 61 +- config/v3/mt5_deposit/send.json | 80 +- config/v3/mt5_get_settings/example.json | 4 +- config/v3/mt5_get_settings/receive.json | 308 +- config/v3/mt5_get_settings/send.json | 62 +- config/v3/mt5_login_list/example.json | 2 +- config/v3/mt5_login_list/receive.json | 435 +-- config/v3/mt5_login_list/send.json | 51 +- config/v3/mt5_new_account/example.json | 34 +- config/v3/mt5_new_account/receive.json | 138 +- config/v3/mt5_new_account/send.json | 289 +- config/v3/mt5_password_change/example.json | 10 +- config/v3/mt5_password_change/receive.json | 53 +- config/v3/mt5_password_change/send.json | 103 +- config/v3/mt5_password_check/example.json | 8 +- config/v3/mt5_password_check/receive.json | 53 +- config/v3/mt5_password_check/send.json | 90 +- config/v3/mt5_password_reset/example.json | 10 +- config/v3/mt5_password_reset/receive.json | 53 +- config/v3/mt5_password_reset/send.json | 101 +- config/v3/mt5_withdrawal/example.json | 8 +- config/v3/mt5_withdrawal/receive.json | 61 +- config/v3/mt5_withdrawal/send.json | 82 +- .../v3/new_account_maltainvest/example.json | 80 +- .../v3/new_account_maltainvest/receive.json | 97 +- config/v3/new_account_maltainvest/send.json | 768 ++--- config/v3/new_account_real/example.json | 40 +- config/v3/new_account_real/receive.json | 105 +- config/v3/new_account_real/send.json | 344 +- config/v3/new_account_virtual/example.json | 10 +- config/v3/new_account_virtual/receive.json | 120 +- config/v3/new_account_virtual/send.json | 436 +-- config/v3/oauth_apps/example.json | 2 +- config/v3/oauth_apps/receive.json | 125 +- config/v3/oauth_apps/send.json | 51 +- config/v3/p2p_advert_create/example.json | 16 +- config/v3/p2p_advert_create/receive.json | 838 ++--- config/v3/p2p_advert_create/send.json | 236 +- config/v3/p2p_advert_info/example.json | 4 +- config/v3/p2p_advert_info/receive.json | 862 ++--- config/v3/p2p_advert_info/send.json | 88 +- config/v3/p2p_advert_list/example.json | 4 +- config/v3/p2p_advert_list/receive.json | 721 ++-- config/v3/p2p_advert_list/send.json | 193 +- config/v3/p2p_advert_update/example.json | 6 +- config/v3/p2p_advert_update/receive.json | 793 +++-- config/v3/p2p_advert_update/send.json | 227 +- config/v3/p2p_advertiser_adverts/example.json | 2 +- config/v3/p2p_advertiser_adverts/receive.json | 699 ++-- config/v3/p2p_advertiser_adverts/send.json | 72 +- config/v3/p2p_advertiser_create/example.json | 4 +- config/v3/p2p_advertiser_create/receive.json | 603 ++-- config/v3/p2p_advertiser_create/send.json | 112 +- config/v3/p2p_advertiser_info/example.json | 2 +- config/v3/p2p_advertiser_info/receive.json | 728 +++-- config/v3/p2p_advertiser_info/send.json | 73 +- config/v3/p2p_advertiser_list/example.json | 4 +- config/v3/p2p_advertiser_list/receive.json | 478 +-- config/v3/p2p_advertiser_list/send.json | 122 +- .../example.json | 29 +- .../receive.json | 232 +- .../p2p_advertiser_payment_methods/send.json | 171 +- .../v3/p2p_advertiser_relations/example.json | 2 +- .../v3/p2p_advertiser_relations/receive.json | 148 +- config/v3/p2p_advertiser_relations/send.json | 123 +- config/v3/p2p_advertiser_update/example.json | 4 +- config/v3/p2p_advertiser_update/receive.json | 671 ++-- config/v3/p2p_advertiser_update/send.json | 125 +- config/v3/p2p_chat_create/example.json | 4 +- config/v3/p2p_chat_create/receive.json | 76 +- config/v3/p2p_chat_create/send.json | 62 +- config/v3/p2p_order_cancel/example.json | 4 +- config/v3/p2p_order_cancel/receive.json | 78 +- config/v3/p2p_order_cancel/send.json | 62 +- config/v3/p2p_order_confirm/example.json | 4 +- config/v3/p2p_order_confirm/receive.json | 88 +- config/v3/p2p_order_confirm/send.json | 85 +- config/v3/p2p_order_create/example.json | 6 +- config/v3/p2p_order_create/receive.json | 795 +++-- config/v3/p2p_order_create/send.json | 131 +- config/v3/p2p_order_dispute/example.json | 6 +- config/v3/p2p_order_dispute/receive.json | 647 ++-- config/v3/p2p_order_dispute/send.json | 79 +- config/v3/p2p_order_info/example.json | 4 +- config/v3/p2p_order_info/receive.json | 961 +++--- config/v3/p2p_order_info/send.json | 74 +- config/v3/p2p_order_list/example.json | 4 +- config/v3/p2p_order_list/receive.json | 821 +++-- config/v3/p2p_order_list/send.json | 107 +- config/v3/p2p_order_review/example.json | 8 +- config/v3/p2p_order_review/receive.json | 114 +- config/v3/p2p_order_review/send.json | 92 +- config/v3/p2p_payment_methods/example.json | 2 +- config/v3/p2p_payment_methods/receive.json | 154 +- config/v3/p2p_payment_methods/send.json | 51 +- config/v3/p2p_ping/example.json | 2 +- config/v3/p2p_ping/receive.json | 55 +- config/v3/p2p_ping/send.json | 51 +- config/v3/payment_methods/example.json | 4 +- config/v3/payment_methods/receive.json | 379 ++- config/v3/payment_methods/send.json | 57 +- config/v3/paymentagent_create/example.json | 52 +- config/v3/paymentagent_create/receive.json | 43 +- config/v3/paymentagent_create/send.json | 241 +- config/v3/paymentagent_details/example.json | 2 +- config/v3/paymentagent_details/receive.json | 307 +- config/v3/paymentagent_details/send.json | 51 +- config/v3/paymentagent_list/example.json | 2 +- config/v3/paymentagent_list/receive.json | 288 +- config/v3/paymentagent_list/send.json | 57 +- config/v3/paymentagent_transfer/example.json | 8 +- config/v3/paymentagent_transfer/receive.json | 82 +- config/v3/paymentagent_transfer/send.json | 105 +- config/v3/paymentagent_withdraw/example.json | 10 +- config/v3/paymentagent_withdraw/receive.json | 74 +- config/v3/paymentagent_withdraw/send.json | 122 +- .../example.json | 4 + .../receive.json | 31 + .../send.json | 38 + config/v3/payout_currencies/example.json | 2 +- config/v3/payout_currencies/receive.json | 65 +- config/v3/payout_currencies/send.json | 47 +- config/v3/ping/example.json | 2 +- config/v3/ping/receive.json | 57 +- config/v3/ping/send.json | 47 +- config/v3/portfolio/example.json | 2 +- config/v3/portfolio/receive.json | 190 +- config/v3/portfolio/send.json | 144 +- config/v3/profit_table/example.json | 10 +- config/v3/profit_table/receive.json | 185 +- config/v3/profit_table/send.json | 217 +- config/v3/proposal/example.json | 18 +- config/v3/proposal/receive.json | 552 ++-- config/v3/proposal/send.json | 365 ++- config/v3/proposal_open_contract/example.json | 6 +- config/v3/proposal_open_contract/receive.json | 1248 ++++--- config/v3/proposal_open_contract/send.json | 72 +- config/v3/reality_check/example.json | 2 +- config/v3/reality_check/receive.json | 127 +- config/v3/reality_check/send.json | 52 +- config/v3/residence_list/example.json | 2 +- config/v3/residence_list/receive.json | 301 +- config/v3/residence_list/send.json | 47 +- config/v3/revoke_oauth_app/example.json | 2 +- config/v3/revoke_oauth_app/receive.json | 53 +- config/v3/revoke_oauth_app/send.json | 47 +- config/v3/sell/example.json | 4 +- config/v3/sell/receive.json | 91 +- config/v3/sell/send.json | 56 +- .../example.json | 11 +- .../receive.json | 191 +- .../send.json | 90 +- config/v3/sell_expired/example.json | 2 +- config/v3/sell_expired/receive.json | 69 +- config/v3/sell_expired/send.json | 51 +- config/v3/set_account_currency/example.json | 2 +- config/v3/set_account_currency/receive.json | 58 +- config/v3/set_account_currency/send.json | 49 +- .../v3/set_financial_assessment/example.json | 68 +- .../v3/set_financial_assessment/receive.json | 83 +- config/v3/set_financial_assessment/send.json | 996 +++--- config/v3/set_self_exclusion/example.json | 26 +- config/v3/set_self_exclusion/receive.json | 53 +- config/v3/set_self_exclusion/send.json | 217 +- config/v3/set_settings/example.json | 30 +- config/v3/set_settings/receive.json | 53 +- config/v3/set_settings/send.json | 411 ++- config/v3/statement/example.json | 8 +- config/v3/statement/receive.json | 324 +- config/v3/statement/send.json | 140 +- config/v3/states_list/example.json | 2 +- config/v3/states_list/receive.json | 79 +- config/v3/states_list/send.json | 47 +- config/v3/ticks/example.json | 4 +- config/v3/ticks/receive.json | 145 +- config/v3/ticks/send.json | 75 +- config/v3/ticks_history/example.json | 12 +- config/v3/ticks_history/receive.json | 188 +- config/v3/ticks_history/send.json | 140 +- config/v3/time/example.json | 2 +- config/v3/time/receive.json | 53 +- config/v3/time/send.json | 47 +- config/v3/tnc_approval/example.json | 2 +- config/v3/tnc_approval/receive.json | 57 +- config/v3/tnc_approval/send.json | 75 +- config/v3/topup_virtual/example.json | 2 +- config/v3/topup_virtual/receive.json | 71 +- config/v3/topup_virtual/send.json | 51 +- config/v3/trading_durations/example.json | 2 +- config/v3/trading_durations/receive.json | 311 +- config/v3/trading_durations/send.json | 89 +- .../example.json | 10 +- .../receive.json | 58 +- .../send.json | 103 +- .../example.json | 8 +- .../receive.json | 58 +- .../trading_platform_password_reset/send.json | 89 +- config/v3/trading_servers/example.json | 4 +- config/v3/trading_servers/receive.json | 204 +- config/v3/trading_servers/send.json | 112 +- config/v3/trading_times/example.json | 2 +- config/v3/trading_times/receive.json | 184 +- config/v3/trading_times/send.json | 45 +- config/v3/transaction/example.json | 4 +- config/v3/transaction/receive.json | 300 +- config/v3/transaction/send.json | 65 +- .../v3/transfer_between_accounts/example.json | 10 +- .../v3/transfer_between_accounts/receive.json | 212 +- config/v3/transfer_between_accounts/send.json | 106 +- config/v3/unsubscribe_email/example.json | 6 +- config/v3/unsubscribe_email/receive.json | 66 +- config/v3/unsubscribe_email/send.json | 65 +- config/v3/verify_email/example.json | 4 +- config/v3/verify_email/receive.json | 58 +- config/v3/verify_email/send.json | 459 +-- config/v3/verify_email_cellxpert/example.json | 4 +- config/v3/verify_email_cellxpert/receive.json | 58 +- config/v3/verify_email_cellxpert/send.json | 449 +-- config/v3/website_status/example.json | 2 +- config/v3/website_status/receive.json | 1016 +++--- config/v3/website_status/send.json | 60 +- 343 files changed, 25873 insertions(+), 20534 deletions(-) create mode 100644 _data/v3.yml create mode 100644 config/v3/kyc_auth_status/example.json create mode 100644 config/v3/kyc_auth_status/receive.json create mode 100644 config/v3/kyc_auth_status/send.json create mode 100644 config/v3/paymentagent_withdraw_justification/example.json create mode 100644 config/v3/paymentagent_withdraw_justification/receive.json create mode 100644 config/v3/paymentagent_withdraw_justification/send.json diff --git a/_data/v3.yml b/_data/v3.yml new file mode 100644 index 00000000..a81f46c9 --- /dev/null +++ b/_data/v3.yml @@ -0,0 +1,231 @@ +groups: + - label: All Calls + methods: + - name: active_symbols + title: Active Symbols + - name: api_token + title: API Token + - name: app_delete + title: 'Application: Delete' + - name: app_get + title: 'Application: Get Details' + - name: app_list + title: 'Application: List' + - name: app_markup_details + title: 'Application: Markup Details' + - name: app_markup_statistics + title: 'Application: Markup Statistics' + - name: app_register + title: 'Application: Register' + - name: app_update + title: 'Application: Update' + - name: asset_index + title: Asset Index + - name: authorize + title: Authorize + - name: balance + title: Balance + - name: buy + title: Buy Contract + - name: buy_contract_for_multiple_accounts + title: Buy Contract for Multiple Accounts + - name: cancel + title: Cancel a Contract + - name: cashier + title: Cashier Information + - name: contract_update + title: Update Contract + - name: contract_update_history + title: Update Contract History + - name: contracts_for + title: Contracts For Symbol + - name: copy_start + title: 'Copy Trading: Start' + - name: copy_stop + title: 'Copy Trading: Stop' + - name: copytrading_list + title: 'Copy Trading: List' + - name: copytrading_statistics + title: 'Copy Trading: Statistics' + - name: crypto_config + title: Cryptocurrency configurations + - name: document_upload + title: Document Upload + - name: economic_calendar + title: Economic Calendar + - name: exchange_rates + title: Exchange Rates + - name: forget + title: Forget + - name: forget_all + title: Forget All + - name: get_account_status + title: Account Status + - name: get_financial_assessment + title: Get Financial Assessment + - name: get_limits + title: Account Limits + - name: get_self_exclusion + title: Get Self-Exclusion + - name: get_settings + title: Get Account Settings + - name: identity_verification_document_add + title: Identity Verification Add Document + - name: kyc_auth_status + title: KYC Authentication Status + - name: landing_company + title: Landing Company + - name: landing_company_details + title: Landing Company Details + - name: login_history + title: Login History + - name: logout + title: Log Out + - name: mt5_deposit + title: 'MT5: Deposit' + - name: mt5_get_settings + title: 'MT5: Get Setting' + - name: mt5_login_list + title: 'MT5: Accounts List' + - name: mt5_new_account + title: 'MT5: New Account' + - name: mt5_password_change + title: 'MT5: Password Change' + - name: mt5_password_check + title: 'MT5: Password Check' + - name: mt5_password_reset + title: 'MT5: Password Reset' + - name: mt5_withdrawal + title: 'MT5: Withdrawal' + - name: new_account_maltainvest + title: 'New Real-Money Account: Deriv Investment (Europe) Ltd' + - name: new_account_real + title: 'New Real-Money Account: Default Landing Company' + - name: new_account_virtual + title: New Virtual-Money Account + - name: oauth_apps + title: OAuth Applications + - name: p2p_advert_create + title: P2P Advert Create + - name: p2p_advert_info + title: P2P Advert Information + - name: p2p_advert_list + title: P2P Advert List + - name: p2p_advert_update + title: P2P Advert Update + - name: p2p_advertiser_adverts + title: P2P Advertiser Adverts + - name: p2p_advertiser_create + title: P2P Advertiser Create + - name: p2p_advertiser_info + title: P2P Advertiser Information + - name: p2p_advertiser_list + title: P2P Advertiser List + - name: p2p_advertiser_payment_methods + title: P2P Advertiser Payment Methods + - name: p2p_advertiser_relations + title: P2P Advertiser Relations + - name: p2p_advertiser_update + title: P2P Advertiser Update + - name: p2p_chat_create + title: P2P Chat Create + - name: p2p_order_cancel + title: P2P Order Cancel + - name: p2p_order_confirm + title: P2P Order Confirm + - name: p2p_order_create + title: P2P Order Create + - name: p2p_order_dispute + title: P2P Order Dispute + - name: p2p_order_info + title: P2P Order Information + - name: p2p_order_list + title: P2P Order List + - name: p2p_order_review + title: P2P Order Review + - name: p2p_payment_methods + title: P2P Payment Methods + - name: p2p_ping + title: P2P Ping + - name: payment_methods + title: Payment Methods + - name: paymentagent_create + title: Payment agent create + - name: paymentagent_details + title: Payment agent details + - name: paymentagent_list + title: 'Payment Agent: List' + - name: paymentagent_transfer + title: 'Payment Agent: Transfer' + - name: paymentagent_withdraw + title: 'Payment Agent: Withdraw' + - name: paymentagent_withdraw_justification + title: 'Payment Agent: Withdraw justification' + - name: payout_currencies + title: Payout Currencies + - name: ping + title: Ping + - name: portfolio + title: Portfolio + - name: profit_table + title: Profit Table + - name: proposal + title: Price Proposal + - name: proposal_open_contract + title: 'Price Proposal: Open Contracts' + - name: reality_check + title: Reality Check + - name: residence_list + title: Countries List + - name: revoke_oauth_app + title: Revoke Oauth Application + - name: sell + title: Sell Contract + - name: sell_contract_for_multiple_accounts + title: 'Sell Contracts: Multiple Accounts' + - name: sell_expired + title: Sell Expired Contracts + - name: set_account_currency + title: Set Account Currency + - name: set_financial_assessment + title: Set Financial Assessment + - name: set_self_exclusion + title: Set Self-Exclusion + - name: set_settings + title: Set Account Settings + - name: statement + title: Statement + - name: states_list + title: States List + - name: ticks + title: Ticks Stream + - name: ticks_history + title: Ticks History + - name: time + title: Server Time + - name: tnc_approval + title: Terms and Conditions Approval + - name: topup_virtual + title: Top Up Virtual-Money Account + - name: trading_durations + title: Trading Durations + - name: trading_platform_investor_password_reset + title: 'Trading Platform: Investor Password Reset' + - name: trading_platform_password_reset + title: 'Trading Platform: Password Reset' + - name: trading_servers + title: Server list + - name: trading_times + title: Trading Times + - name: transaction + title: Transactions Stream + - name: transfer_between_accounts + title: Transfer Between Accounts + - name: unsubscribe_email + title: Unsubscribe Email + - name: verify_email + title: Verify Email + - name: verify_email_cellxpert + title: Verify Email Cellxpert + - name: website_status + title: Server Status diff --git a/config/v3/active_symbols/example.json b/config/v3/active_symbols/example.json index af065ac7..ade1d13d 100644 --- a/config/v3/active_symbols/example.json +++ b/config/v3/active_symbols/example.json @@ -1,4 +1,4 @@ { - "active_symbols": "brief", - "product_type": "basic" + "active_symbols": "brief", + "product_type": "basic" } diff --git a/config/v3/active_symbols/receive.json b/config/v3/active_symbols/receive.json index 68e223bd..ec40b893 100644 --- a/config/v3/active_symbols/receive.json +++ b/config/v3/active_symbols/receive.json @@ -1,140 +1,157 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Active Symbols (response)", - "description": "A message containing the list of active symbols.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "active_symbols": { - "title": "active_symbols", - "description": "List of active symbols.", - "type": "array", - "items": { - "description": "The information about each symbol.", - "type": "object", - "additionalProperties": false, - "required": [ - "display_name", - "display_order", - "exchange_is_open", - "is_trading_suspended", - "market", - "market_display_name", - "pip", - "subgroup", - "subgroup_display_name", - "submarket", - "submarket_display_name", - "symbol", - "symbol_type" - ], - "properties": { - "allow_forward_starting": { - "description": "`1` if the symbol is tradable in a forward starting contract, `0` if not.", - "type": "integer", - "enum": [0, 1] - }, - "delay_amount": { - "description": "Amount the data feed is delayed (in minutes) due to Exchange licensing requirements. Only returned on `full` active symbols call.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Active Symbols (response)", + "description": "A message containing the list of active symbols.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "active_symbols": { + "title": "active_symbols", + "description": "List of active symbols.", + "type": "array", + "items": { + "description": "The information about each symbol.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "display_order", + "exchange_is_open", + "is_trading_suspended", + "market", + "market_display_name", + "pip", + "subgroup", + "subgroup_display_name", + "submarket", + "submarket_display_name", + "symbol", + "symbol_type" + ], + "properties": { + "allow_forward_starting": { + "description": "`1` if the symbol is tradable in a forward starting contract, `0` if not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "delay_amount": { + "description": "Amount the data feed is delayed (in minutes) due to Exchange licensing requirements. Only returned on `full` active symbols call.", + "type": "integer" + }, + "display_name": { + "description": "Display name.", + "type": "string" + }, + "display_order": { + "description": "Display order.", + "type": "integer" + }, + "exchange_is_open": { + "description": "`1` if market is currently open, `0` if closed.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "exchange_name": { + "description": "Exchange name (for underlyings listed on a Stock Exchange). Only returned on `full` active symbols call.", + "type": "string" + }, + "intraday_interval_minutes": { + "description": "Intraday interval minutes. Only returned on `full` active symbols call.", + "type": "integer" + }, + "is_trading_suspended": { + "description": "`1` indicates that trading is currently suspended, `0` if not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "market": { + "description": "Market category (forex, indices, etc).", + "type": "string" + }, + "market_display_name": { + "description": "Translated market name.", + "type": "string" + }, + "pip": { + "description": "Pip size (i.e. minimum fluctuation amount).", + "type": "number" + }, + "quoted_currency_symbol": { + "description": "For stock indices, the underlying currency for that instrument. Only returned on `full` active symbols call.", + "type": "string" + }, + "spot": { + "description": "Latest spot price of the underlying. Only returned on `full` active symbols call.", + "type": [ + "null", + "number" + ] + }, + "spot_age": { + "description": "Number of seconds elapsed since the last spot price. Only returned on `full` active symbols call.", + "type": "string" + }, + "spot_percentage_change": { + "description": "Daily percentage for a symbol. Only returned on 'full' active symbols call.", + "type": "string" + }, + "spot_time": { + "description": "Latest spot epoch time. Only returned on `full` active symbols call.", + "type": "string" + }, + "subgroup": { + "description": "Subgroup name.", + "type": "string" + }, + "subgroup_display_name": { + "description": "Translated subgroup name.", + "type": "string" + }, + "submarket": { + "description": "Submarket name.", + "type": "string" + }, + "submarket_display_name": { + "description": "Translated submarket name.", + "type": "string" + }, + "symbol": { + "description": "The symbol code for this underlying.", + "type": "string" + }, + "symbol_type": { + "description": "Symbol type (forex, commodities, etc).", + "type": "string" + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "active_symbols" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", "type": "integer" - }, - "display_name": { - "description": "Display name.", - "type": "string" - }, - "display_order": { - "description": "Display order.", - "type": "integer" - }, - "exchange_is_open": { - "description": "`1` if market is currently open, `0` if closed.", - "type": "integer", - "enum": [0, 1] - }, - "exchange_name": { - "description": "Exchange name (for underlyings listed on a Stock Exchange). Only returned on `full` active symbols call.", - "type": "string" - }, - "intraday_interval_minutes": { - "description": "Intraday interval minutes. Only returned on `full` active symbols call.", - "type": "integer" - }, - "is_trading_suspended": { - "description": "`1` indicates that trading is currently suspended, `0` if not.", - "type": "integer", - "enum": [0, 1] - }, - "market": { - "description": "Market category (forex, indices, etc).", - "type": "string" - }, - "market_display_name": { - "description": "Translated market name.", - "type": "string" - }, - "pip": { - "description": "Pip size (i.e. minimum fluctuation amount).", - "type": "number" - }, - "quoted_currency_symbol": { - "description": "For stock indices, the underlying currency for that instrument. Only returned on `full` active symbols call.", - "type": "string" - }, - "spot": { - "description": "Latest spot price of the underlying. Only returned on `full` active symbols call.", - "type": ["null", "number"] - }, - "spot_age": { - "description": "Number of seconds elapsed since the last spot price. Only returned on `full` active symbols call.", - "type": "string" - }, - "spot_percentage_change": { - "description": "Daily percentage for a symbol. Only returned on 'full' active symbols call.", - "type": "string" - }, - "spot_time": { - "description": "Latest spot epoch time. Only returned on `full` active symbols call.", - "type": "string" - }, - "subgroup": { - "description": "Subgroup name.", - "type": "string" - }, - "subgroup_display_name": { - "description": "Translated subgroup name.", - "type": "string" - }, - "submarket": { - "description": "Submarket name.", - "type": "string" - }, - "submarket_display_name": { - "description": "Translated submarket name.", - "type": "string" - }, - "symbol": { - "description": "The symbol code for this underlying.", - "type": "string" - }, - "symbol_type": { - "description": "Symbol type (forex, commodities, etc).", - "type": "string" - } } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["active_symbols"] - }, - "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/active_symbols/send.json b/config/v3/active_symbols/send.json index a43a8618..a9a1e425 100644 --- a/config/v3/active_symbols/send.json +++ b/config/v3/active_symbols/send.json @@ -1,43 +1,65 @@ { - "$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": "[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"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/api_token/example.json b/config/v3/api_token/example.json index 1614a5ea..f308b8d1 100644 --- a/config/v3/api_token/example.json +++ b/config/v3/api_token/example.json @@ -1,5 +1,9 @@ { - "api_token": 1, - "new_token": "Token example", - "new_token_scopes": ["admin", "read", "trade"] + "api_token": 1, + "new_token": "Token example", + "new_token_scopes": [ + "admin", + "read", + "trade" + ] } diff --git a/config/v3/api_token/receive.json b/config/v3/api_token/receive.json index 7c9ca407..9309d51b 100644 --- a/config/v3/api_token/receive.json +++ b/config/v3/api_token/receive.json @@ -1,78 +1,93 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "API Token (response)", - "description": "The result of the API token request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "api_token": { - "title": "api_token", - "description": "Contains the result of API token according to the type of request.", - "type": "object", - "additionalProperties": false, - "properties": { - "delete_token": { - "description": "Token deleted.", - "type": "integer", - "enum": [1] - }, - "new_token": { - "description": "Token created.", - "type": "integer", - "enum": [1] - }, - "tokens": { - "description": "API tokens", - "type": "array", - "items": { - "description": "The information for each token.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "API Token (response)", + "description": "The result of the API token request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "api_token": { + "title": "api_token", + "description": "Contains the result of API token according to the type of request.", "type": "object", "additionalProperties": false, "properties": { - "display_name": { - "description": "The token name specified when creating.", - "type": "string" - }, - "last_used": { - "description": "The last date which the token has been used.", - "type": "string" - }, - "scopes": { - "description": "List of permission scopes of the token.", - "type": "array", - "items": { - "description": "The permission scope.", - "type": "string", - "enum": ["read", "trade", "trading_information", "payments", "admin"] + "delete_token": { + "description": "Token deleted.", + "type": "integer", + "enum": [ + 1 + ] + }, + "new_token": { + "description": "Token created.", + "type": "integer", + "enum": [ + 1 + ] + }, + "tokens": { + "description": "API tokens", + "type": "array", + "items": { + "description": "The information for each token.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "The token name specified when creating.", + "type": "string" + }, + "last_used": { + "description": "The last date which the token has been used.", + "type": "string" + }, + "scopes": { + "description": "List of permission scopes of the token.", + "type": "array", + "items": { + "description": "The permission scope.", + "type": "string", + "enum": [ + "read", + "trade", + "trading_information", + "payments", + "admin" + ] + } + }, + "token": { + "description": "The token that can be used to `authorize` with.", + "type": "string", + "sensitive": 1 + }, + "valid_for_ip": { + "description": "The IP restriction for the token. No restriction if empty.", + "type": "string", + "sensitive": 1 + } + } + } } - }, - "token": { - "description": "The token that can be used to `authorize` with.", - "type": "string", - "sensitive": 1 - }, - "valid_for_ip": { - "description": "The IP restriction for the token. No restriction if empty.", - "type": "string", - "sensitive": 1 - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "api_token" + ] + }, + "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": ["api_token"] - }, - "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/api_token/send.json b/config/v3/api_token/send.json index 71a4f28c..e964fdcd 100644 --- a/config/v3/api_token/send.json +++ b/config/v3/api_token/send.json @@ -1,49 +1,66 @@ { - "$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"] - } - }, - "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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_delete/example.json b/config/v3/app_delete/example.json index 72d48d0e..b1d436c8 100644 --- a/config/v3/app_delete/example.json +++ b/config/v3/app_delete/example.json @@ -1,3 +1,3 @@ { - "app_delete": 1234 + "app_delete": 1234 } diff --git a/config/v3/app_delete/receive.json b/config/v3/app_delete/receive.json index cfe7835c..2415c988 100644 --- a/config/v3/app_delete/receive.json +++ b/config/v3/app_delete/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Delete (response)", - "description": "The result of delete application request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_delete": { - "title": "app_delete", - "description": "1 on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["app_delete"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Delete (response)", + "description": "The result of delete application request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_delete": { + "title": "app_delete", + "description": "1 on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_delete" + ] + }, + "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/app_delete/send.json b/config/v3/app_delete/send.json index d671a7db..faf7bfee 100644 --- a/config/v3/app_delete/send.json +++ b/config/v3/app_delete/send.json @@ -1,24 +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" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_get/example.json b/config/v3/app_get/example.json index d23254be..a01e59f0 100644 --- a/config/v3/app_get/example.json +++ b/config/v3/app_get/example.json @@ -1,3 +1,3 @@ { - "app_get": 1234 + "app_get": 1234 } diff --git a/config/v3/app_get/receive.json b/config/v3/app_get/receive.json index e0bcf900..54d40534 100644 --- a/config/v3/app_get/receive.json +++ b/config/v3/app_get/receive.json @@ -1,88 +1,93 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Get Details (response)", - "description": "A message with requested application details", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_get": { - "title": "app_get", - "description": "The information of the requested application.", - "type": "object", - "additionalProperties": false, - "required": [ - "app_id", - "app_markup_percentage", - "appstore", - "github", - "googleplay", - "homepage", - "name", - "redirect_uri", - "verification_uri" - ], - "properties": { - "active": { - "description": "Active.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Get Details (response)", + "description": "A message with requested application details", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_get": { + "title": "app_get", + "description": "The information of the requested application.", + "type": "object", + "additionalProperties": false, + "required": [ + "app_id", + "app_markup_percentage", + "appstore", + "github", + "googleplay", + "homepage", + "name", + "redirect_uri", + "verification_uri" + ], + "properties": { + "active": { + "description": "Active.", + "type": "integer" + }, + "app_id": { + "description": "Application ID.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "Markup added to contract prices (as a percentage of contract payout).", + "type": "number" + }, + "appstore": { + "description": "Application's App Store URL.", + "type": "string" + }, + "github": { + "description": "Application's GitHub page (for open-source projects).", + "type": "string" + }, + "googleplay": { + "description": "Application's Google Play URL.", + "type": "string" + }, + "homepage": { + "description": "Application's homepage URL.", + "type": "string" + }, + "name": { + "description": "Application name.", + "type": "string" + }, + "redirect_uri": { + "description": "The URL to redirect to after a successful login.", + "type": "string" + }, + "scopes": { + "description": "Scope Details.", + "type": "array", + "items": { + "type": "string" + } + }, + "verification_uri": { + "description": "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" + } + } }, - "app_id": { - "description": "Application ID.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "app_markup_percentage": { - "description": "Markup added to contract prices (as a percentage of contract payout).", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_get" + ] }, - "appstore": { - "description": "Application's App Store URL.", - "type": "string" - }, - "github": { - "description": "Application's GitHub page (for open-source projects).", - "type": "string" - }, - "googleplay": { - "description": "Application's Google Play URL.", - "type": "string" - }, - "homepage": { - "description": "Application's homepage URL.", - "type": "string" - }, - "name": { - "description": "Application name.", - "type": "string" - }, - "redirect_uri": { - "description": "The URL to redirect to after a successful login.", - "type": "string" - }, - "scopes": { - "description": "Scope Details.", - "type": "array", - "items": { - "type": "string" - } - }, - "verification_uri": { - "description": "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" + "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": ["app_get"] - }, - "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/app_get/send.json b/config/v3/app_get/send.json index 973e7adf..9d0fea1c 100644 --- a/config/v3/app_get/send.json +++ b/config/v3/app_get/send.json @@ -1,24 +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" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_list/example.json b/config/v3/app_list/example.json index fdd70762..80e6f61e 100644 --- a/config/v3/app_list/example.json +++ b/config/v3/app_list/example.json @@ -1,3 +1,3 @@ { - "app_list": 1 + "app_list": 1 } diff --git a/config/v3/app_list/receive.json b/config/v3/app_list/receive.json index 93fb7f58..1e0edc60 100644 --- a/config/v3/app_list/receive.json +++ b/config/v3/app_list/receive.json @@ -1,92 +1,112 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: List (response)", - "description": "A message with created applications", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_list": { - "title": "app_list", - "description": "List of created applications for the authorized account.", - "type": "array", - "items": { - "title": "Application object", - "type": "object", - "additionalProperties": false, - "required": [ - "app_id", - "app_markup_percentage", - "appstore", - "github", - "googleplay", - "homepage", - "name", - "redirect_uri", - "verification_uri" - ], - "properties": { - "active": { - "description": "Active.", - "type": "integer" - }, - "app_id": { - "description": "Application ID.", - "type": "integer" - }, - "app_markup_percentage": { - "description": "Markup added to contract prices (as a percentage of contract payout).", - "type": "number" - }, - "appstore": { - "description": "Application's App Store URL.", - "type": ["null", "string"] - }, - "github": { - "description": "Application's GitHub page. (for open-source projects)", - "type": ["null", "string"] - }, - "googleplay": { - "description": "Application's Google Play URL.", - "type": ["null", "string"] - }, - "homepage": { - "description": "Application's homepage URL.", - "type": ["null", "string"] - }, - "name": { - "description": "Application name.", - "type": "string" - }, - "redirect_uri": { - "description": "The URL to redirect to after a successful login.", - "type": "string" - }, - "scopes": { - "description": "Scope Details.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: List (response)", + "description": "A message with created applications", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_list": { + "title": "app_list", + "description": "List of created applications for the authorized account.", "type": "array", "items": { - "type": "string" + "title": "Application object", + "type": "object", + "additionalProperties": false, + "required": [ + "app_id", + "app_markup_percentage", + "appstore", + "github", + "googleplay", + "homepage", + "name", + "redirect_uri", + "verification_uri" + ], + "properties": { + "active": { + "description": "Active.", + "type": "integer" + }, + "app_id": { + "description": "Application ID.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "Markup added to contract prices (as a percentage of contract payout).", + "type": "number" + }, + "appstore": { + "description": "Application's App Store URL.", + "type": [ + "null", + "string" + ] + }, + "github": { + "description": "Application's GitHub page. (for open-source projects)", + "type": [ + "null", + "string" + ] + }, + "googleplay": { + "description": "Application's Google Play URL.", + "type": [ + "null", + "string" + ] + }, + "homepage": { + "description": "Application's homepage URL.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "Application name.", + "type": "string" + }, + "redirect_uri": { + "description": "The URL to redirect to after a successful login.", + "type": "string" + }, + "scopes": { + "description": "Scope Details.", + "type": "array", + "items": { + "type": "string" + } + }, + "verification_uri": { + "description": "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": [ + "null", + "string" + ] + } + } } - }, - "verification_uri": { - "description": "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": ["null", "string"] - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_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": ["app_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/app_list/send.json b/config/v3/app_list/send.json index d12640f4..a543d59c 100644 --- a/config/v3/app_list/send.json +++ b/config/v3/app_list/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_markup_details/example.json b/config/v3/app_markup_details/example.json index 8c6bebd3..4a1bfae4 100644 --- a/config/v3/app_markup_details/example.json +++ b/config/v3/app_markup_details/example.json @@ -1,14 +1,18 @@ { - "app_markup_details": 1, - "description": 1, - "app_id": 1234, - "client_loginid": "CR12345", - "date_from": "2017-08-01 00:00:00", - "date_to": "2017-08-31 23:59:59", - "limit": 100, - "offset": 0, - "sort": "ASC", - "sort_fields": ["app_id", "client_loginid", "transaction_time"], - "passthrough": {}, - "req_id": 3 + "app_markup_details": 1, + "description": 1, + "app_id": 1234, + "client_loginid": "CR12345", + "date_from": "2017-08-01 00:00:00", + "date_to": "2017-08-31 23:59:59", + "limit": 100, + "offset": 0, + "sort": "ASC", + "sort_fields": [ + "app_id", + "client_loginid", + "transaction_time" + ], + "passthrough": {}, + "req_id": 3 } diff --git a/config/v3/app_markup_details/receive.json b/config/v3/app_markup_details/receive.json index 51524224..d909eb09 100644 --- a/config/v3/app_markup_details/receive.json +++ b/config/v3/app_markup_details/receive.json @@ -1,81 +1,88 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Markup Details (response)", - "description": "Per transaction reporting of app_markup", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_markup_details": { - "title": "app_markup_details", - "description": "App Markup transaction details", - "type": "object", - "additionalProperties": false, - "properties": { - "transactions": { - "description": "Array of returned transactions", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Markup Details (response)", + "description": "Per transaction reporting of app_markup", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_markup_details": { + "title": "app_markup_details", + "description": "App Markup transaction details", "type": "object", "additionalProperties": false, "properties": { - "app_id": { - "description": "ID of the application where this contract was purchased.", - "type": "integer" - }, - "app_markup": { - "description": "The markup the client paid in their currency", - "type": "number" - }, - "app_markup_usd": { - "description": "The markup the client paid in USD", - "type": "number" - }, - "app_markup_value": { - "description": "The markup the client paid in the app developer's currency", - "type": "number" - }, - "client_currcode": { - "description": "Currency code of the client", - "type": "string" - }, - "client_loginid": { - "description": "Login ID of the client", - "type": "string" - }, - "dev_currcode": { - "description": "Currency code of the app developer", - "type": "string" - }, - "dev_loginid": { - "description": "Login ID of the app developer", - "type": "string" - }, - "transaction_id": { - "description": "The transaction ID. Every contract (buy or sell) and every payment has a unique ID.", - "type": "integer", - "examples": [10867502908] - }, - "transaction_time": { - "description": "The epoch value of purchase time of transaction", - "type": "string" - } + "transactions": { + "description": "Array of returned transactions", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "app_id": { + "description": "ID of the application where this contract was purchased.", + "type": "integer" + }, + "app_markup": { + "description": "The markup the client paid in their currency", + "type": "number" + }, + "app_markup_usd": { + "description": "The markup the client paid in USD", + "type": "number" + }, + "app_markup_value": { + "description": "The markup the client paid in the app developer's currency", + "type": "number" + }, + "client_currcode": { + "description": "Currency code of the client", + "type": "string" + }, + "client_loginid": { + "description": "Login ID of the client", + "type": "string" + }, + "dev_currcode": { + "description": "Currency code of the app developer", + "type": "string" + }, + "dev_loginid": { + "description": "Login ID of the app developer", + "type": "string" + }, + "transaction_id": { + "description": "The transaction ID. Every contract (buy or sell) and every payment has a unique ID.", + "type": "integer", + "examples": [ + 10867502908 + ] + }, + "transaction_time": { + "description": "The epoch value of purchase time of transaction", + "type": "string" + } + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_markup_details" + ] + }, + "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": ["app_markup_details"] - }, - "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/app_markup_details/send.json b/config/v3/app_markup_details/send.json index 7a7d5366..2d9b279f 100644 --- a/config/v3/app_markup_details/send.json +++ b/config/v3/app_markup_details/send.json @@ -1,77 +1,97 @@ { - "$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": "number" - }, - "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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_markup_statistics/example.json b/config/v3/app_markup_statistics/example.json index 2da4e6d9..e256f213 100644 --- a/config/v3/app_markup_statistics/example.json +++ b/config/v3/app_markup_statistics/example.json @@ -1,7 +1,7 @@ { - "app_markup_statistics": 1, - "date_from": "2022-01-01 00:00:00", - "date_to": "2022-01-31 23:59:59", - "passthrough": {}, - "req_id": 4 + "app_markup_statistics": 1, + "date_from": "2022-01-01 00:00:00", + "date_to": "2022-01-31 23:59:59", + "passthrough": {}, + "req_id": 4 } diff --git a/config/v3/app_markup_statistics/receive.json b/config/v3/app_markup_statistics/receive.json index e8779500..1c7e2055 100644 --- a/config/v3/app_markup_statistics/receive.json +++ b/config/v3/app_markup_statistics/receive.json @@ -1,68 +1,73 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Markup Statistics (response)", - "description": "Per application reporting of app_markup", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_markup_statistics": { - "title": "app_markup_statistics", - "description": "App Markup transaction statistics", - "type": "object", - "additionalProperties": false, - "properties": { - "breakdown": { - "description": "Array of summed app markups grouped by app_id", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Markup Statistics (response)", + "description": "Per application reporting of app_markup", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_markup_statistics": { + "title": "app_markup_statistics", + "description": "App Markup transaction statistics", "type": "object", "additionalProperties": false, "properties": { - "app_id": { - "description": "ID of the application where this contract was purchased.", - "type": "integer" - }, - "app_markup_usd": { - "description": "The sum of markup the client paid in USD", - "type": "number" - }, - "app_markup_value": { - "description": "The sum of markup the client paid in developer's currency", - "type": "number" - }, - "dev_currcode": { - "description": "Currency code of the app developer", - "type": "string" - }, - "transactions_count": { - "description": "The count of app transactions", - "type": "number" - } + "breakdown": { + "description": "Array of summed app markups grouped by app_id", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "app_id": { + "description": "ID of the application where this contract was purchased.", + "type": "integer" + }, + "app_markup_usd": { + "description": "The sum of markup the client paid in USD", + "type": "number" + }, + "app_markup_value": { + "description": "The sum of markup the client paid in developer's currency", + "type": "number" + }, + "dev_currcode": { + "description": "Currency code of the app developer", + "type": "string" + }, + "transactions_count": { + "description": "The count of app transactions", + "type": "number" + } + } + } + }, + "total_app_markup_usd": { + "description": "The sum of markup the client paid in USD", + "type": "number" + }, + "total_transactions_count": { + "description": "The total count of transactions", + "type": "number" + } } - } }, - "total_app_markup_usd": { - "description": "The sum of markup the client paid in USD", - "type": "number" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "total_transactions_count": { - "description": "The total count of transactions", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_markup_statistics" + ] + }, + "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": ["app_markup_statistics"] - }, - "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/app_markup_statistics/send.json b/config/v3/app_markup_statistics/send.json index 80744b61..d436aa42 100644 --- a/config/v3/app_markup_statistics/send.json +++ b/config/v3/app_markup_statistics/send.json @@ -1,35 +1,44 @@ { - "$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})$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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})$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_register/example.json b/config/v3/app_register/example.json index 0b24240e..64bb3d8f 100644 --- a/config/v3/app_register/example.json +++ b/config/v3/app_register/example.json @@ -1,11 +1,14 @@ { - "app_register": 1, - "appstore": "https://itunes.apple.com/test_app", - "github": "https://github.com/test_org/app", - "googleplay": "https://play.google.com/store/apps/details?id=test.app", - "homepage": "https://test.example.com/", - "name": "Test Application", - "redirect_uri": "https://test.example.com/redirect", - "scopes": ["read", "trade"], - "verification_uri": "https://test.example.com/verify" + "app_register": 1, + "appstore": "https://itunes.apple.com/test_app", + "github": "https://github.com/test_org/app", + "googleplay": "https://play.google.com/store/apps/details?id=test.app", + "homepage": "https://test.example.com/", + "name": "Test Application", + "redirect_uri": "https://test.example.com/redirect", + "scopes": [ + "read", + "trade" + ], + "verification_uri": "https://test.example.com/verify" } diff --git a/config/v3/app_register/receive.json b/config/v3/app_register/receive.json index 431e691e..e0eb2093 100644 --- a/config/v3/app_register/receive.json +++ b/config/v3/app_register/receive.json @@ -1,88 +1,93 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Register (response)", - "description": "A message with created application details", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_register": { - "title": "app_register", - "description": "The information of the created application.", - "type": "object", - "additionalProperties": false, - "required": [ - "app_id", - "app_markup_percentage", - "appstore", - "github", - "googleplay", - "homepage", - "name", - "redirect_uri", - "verification_uri" - ], - "properties": { - "active": { - "description": "Active.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Register (response)", + "description": "A message with created application details", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_register": { + "title": "app_register", + "description": "The information of the created application.", + "type": "object", + "additionalProperties": false, + "required": [ + "app_id", + "app_markup_percentage", + "appstore", + "github", + "googleplay", + "homepage", + "name", + "redirect_uri", + "verification_uri" + ], + "properties": { + "active": { + "description": "Active.", + "type": "integer" + }, + "app_id": { + "description": "Application ID.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "Markup added to contract prices (as a percentage of contract payout).", + "type": "number" + }, + "appstore": { + "description": "Application's App Store URL.", + "type": "string" + }, + "github": { + "description": "Application's GitHub page (for open-source projects).", + "type": "string" + }, + "googleplay": { + "description": "Application's Google Play URL.", + "type": "string" + }, + "homepage": { + "description": "Application's homepage URL.", + "type": "string" + }, + "name": { + "description": "Application name.", + "type": "string" + }, + "redirect_uri": { + "description": "The URL to redirect to after a successful login.", + "type": "string" + }, + "scopes": { + "description": "Scope Details.", + "type": "array", + "items": { + "type": "string" + } + }, + "verification_uri": { + "description": "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" + } + } }, - "app_id": { - "description": "Application ID.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "app_markup_percentage": { - "description": "Markup added to contract prices (as a percentage of contract payout).", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_register" + ] }, - "appstore": { - "description": "Application's App Store URL.", - "type": "string" - }, - "github": { - "description": "Application's GitHub page (for open-source projects).", - "type": "string" - }, - "googleplay": { - "description": "Application's Google Play URL.", - "type": "string" - }, - "homepage": { - "description": "Application's homepage URL.", - "type": "string" - }, - "name": { - "description": "Application name.", - "type": "string" - }, - "redirect_uri": { - "description": "The URL to redirect to after a successful login.", - "type": "string" - }, - "scopes": { - "description": "Scope Details.", - "type": "array", - "items": { - "type": "string" - } - }, - "verification_uri": { - "description": "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" + "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": ["app_register"] - }, - "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/app_register/send.json b/config/v3/app_register/send.json index 6cb77b97..ca125603 100644 --- a/config/v3/app_register/send.json +++ b/config/v3/app_register/send.json @@ -1,74 +1,90 @@ { - "$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"] - } - }, - "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 \\.-]*$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 \\.-]*$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/app_update/example.json b/config/v3/app_update/example.json index 0dcbda30..8a10e2f2 100644 --- a/config/v3/app_update/example.json +++ b/config/v3/app_update/example.json @@ -1,11 +1,14 @@ { - "app_update": 999, - "appstore": "https://itunes.apple.com/test_app", - "github": "https://github.com/test_org/app", - "googleplay": "https://play.google.com/store/apps/details?id=test.app", - "homepage": "https://test.example.com/", - "name": "Test Application", - "redirect_uri": "https://test.example.com/redirect", - "scopes": ["read", "trade"], - "verification_uri": "https://test.example.com/verify" + "app_update": 999, + "appstore": "https://itunes.apple.com/test_app", + "github": "https://github.com/test_org/app", + "googleplay": "https://play.google.com/store/apps/details?id=test.app", + "homepage": "https://test.example.com/", + "name": "Test Application", + "redirect_uri": "https://test.example.com/redirect", + "scopes": [ + "read", + "trade" + ], + "verification_uri": "https://test.example.com/verify" } diff --git a/config/v3/app_update/receive.json b/config/v3/app_update/receive.json index 1c20c0b9..052e1eab 100644 --- a/config/v3/app_update/receive.json +++ b/config/v3/app_update/receive.json @@ -1,77 +1,82 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Application: Update (response)", - "description": "A message with created application", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "app_update": { - "title": "app_update", - "description": "Information of the updated application.", - "type": "object", - "additionalProperties": false, - "properties": { - "active": { - "description": "Active.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Application: Update (response)", + "description": "A message with created application", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "app_update": { + "title": "app_update", + "description": "Information of the updated application.", + "type": "object", + "additionalProperties": false, + "properties": { + "active": { + "description": "Active.", + "type": "integer" + }, + "app_id": { + "description": "Application ID.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "Markup added to contract prices (as a percentage of contract payout).", + "type": "number" + }, + "appstore": { + "description": "Application's App Store URL.", + "type": "string" + }, + "github": { + "description": "Application's GitHub page (for open-source projects).", + "type": "string" + }, + "googleplay": { + "description": "Application's Google Play URL.", + "type": "string" + }, + "homepage": { + "description": "Application's homepage URL.", + "type": "string" + }, + "name": { + "description": "Application name.", + "type": "string" + }, + "redirect_uri": { + "description": "The URL to redirect to after a successful login.", + "type": "string" + }, + "scopes": { + "description": "Scope Details.", + "type": "array", + "items": { + "type": "string" + } + }, + "verification_uri": { + "description": "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" + } + } }, - "app_id": { - "description": "Application ID.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "app_markup_percentage": { - "description": "Markup added to contract prices (as a percentage of contract payout).", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "app_update" + ] }, - "appstore": { - "description": "Application's App Store URL.", - "type": "string" - }, - "github": { - "description": "Application's GitHub page (for open-source projects).", - "type": "string" - }, - "googleplay": { - "description": "Application's Google Play URL.", - "type": "string" - }, - "homepage": { - "description": "Application's homepage URL.", - "type": "string" - }, - "name": { - "description": "Application name.", - "type": "string" - }, - "redirect_uri": { - "description": "The URL to redirect to after a successful login.", - "type": "string" - }, - "scopes": { - "description": "Scope Details.", - "type": "array", - "items": { - "type": "string" - } - }, - "verification_uri": { - "description": "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" + "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": ["app_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/app_update/send.json b/config/v3/app_update/send.json index 5389e3ed..686e6d13 100644 --- a/config/v3/app_update/send.json +++ b/config/v3/app_update/send.json @@ -1,73 +1,87 @@ { - "$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"] - } - }, - "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 \\.-]*$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 \\.-]*$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/asset_index/example.json b/config/v3/asset_index/example.json index c78d25a9..0190a8d9 100644 --- a/config/v3/asset_index/example.json +++ b/config/v3/asset_index/example.json @@ -1,3 +1,3 @@ { - "asset_index": 1 + "asset_index": 1 } diff --git a/config/v3/asset_index/receive.json b/config/v3/asset_index/receive.json index 1b1c748b..cbeac2fd 100644 --- a/config/v3/asset_index/receive.json +++ b/config/v3/asset_index/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Asset Index (response)", - "description": "A message with Asset Index", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "asset_index": { - "title": "asset_index", - "description": "List of underlyings by their display name and symbol followed by their available contract types and duration boundaries.", - "type": "array" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["asset_index"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Asset Index (response)", + "description": "A message with Asset Index", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "asset_index": { + "title": "asset_index", + "description": "List of underlyings by their display name and symbol followed by their available contract types and duration boundaries.", + "type": "array" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "asset_index" + ] + }, + "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/asset_index/send.json b/config/v3/asset_index/send.json index d5daace4..b380c2ae 100644 --- a/config/v3/asset_index/send.json +++ b/config/v3/asset_index/send.json @@ -1,38 +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": "[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" - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/authorize/example.json b/config/v3/authorize/example.json index 9eb3f334..dec6f9bf 100644 --- a/config/v3/authorize/example.json +++ b/config/v3/authorize/example.json @@ -1,3 +1,3 @@ { - "authorize": "uw2mk7no3oktoRVVsB4Dz7TQncfABuFDgO95dlxfMxRuPUDz" + "authorize": "uw2mk7no3oktoRVVsB4Dz7TQncfABuFDgO95dlxfMxRuPUDz" } diff --git a/config/v3/authorize/receive.json b/config/v3/authorize/receive.json index 371ca3b1..e3020c88 100644 --- a/config/v3/authorize/receive.json +++ b/config/v3/authorize/receive.json @@ -1,318 +1,228 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Authorize (response)", - "description": "A message containing account information for the holder of that token.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "authorize": { - "title": "authorize", - "description": "Account information for the holder of the token.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_list": { - "description": "List of accounts for current user.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Authorize (response)", + "description": "A message containing account information for the holder of that token.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "authorize": { + "title": "authorize", + "description": "Account information for the holder of the token.", "type": "object", "additionalProperties": false, "properties": { - "account_type": { - "description": "Account type.", - "type": "string", - "enum": ["trading", "wallet"] - }, - "created_at": { - "description": "Creation time of the account as epoch.", - "type": "integer" - }, - "currency": { - "description": "Currency of specified account.", - "type": "string" - }, - "excluded_until": { - "description": "Epoch of date till client has excluded him/herself from the website, only present if client is self excluded.", - "type": "integer" - }, - "is_disabled": { - "description": "Boolean value: 1 or 0, indicating whether the account is marked as disabled or not.", - "type": "integer", - "enum": [1, 0] - }, - "is_virtual": { - "description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.", - "type": "integer", - "enum": [1, 0] - }, - "landing_company_name": { - "description": "Landing company shortcode the account belongs to.", - "type": "string" - }, - "loginid": { - "description": "The account ID of specified account.", - "type": "string" - }, - "trading": { - "description": "Details of the Trading account.", - "type": "object", - "additionalProperties": false, - "properties": { - "linked_to": { - "description": "Details of the Wallet account linked to the Trading account.", + "account_list": { + "description": "List of accounts for current user.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Wallet account ID.", - "type": "string" - }, - "balance": { - "description": "Wallet account balance.", - "type": "string" - }, - "currency": { - "description": "Wallet account currency.", - "type": "string" - }, - "payment_method": { - "description": "Wallet account payment method.", - "type": "string" + "type": "object", + "additionalProperties": false, + "properties": { + "account_category": { + "description": "Account category.", + "type": "string", + "enum": [ + "trading", + "wallet" + ] + }, + "account_type": { + "description": "Account type.", + "type": "string" + }, + "created_at": { + "description": "Creation time of the account as epoch.", + "type": "integer" + }, + "currency": { + "description": "Currency of specified account.", + "type": "string" + }, + "excluded_until": { + "description": "Epoch of date till client has excluded him/herself from the website, only present if client is self excluded.", + "type": "integer" + }, + "is_disabled": { + "description": "Boolean value: 1 or 0, indicating whether the account is marked as disabled or not.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "is_virtual": { + "description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "landing_company_name": { + "description": "Landing company shortcode the account belongs to.", + "type": "string" + }, + "linked_to": { + "description": "Details of the list of Trading accounts linked to the Wallet account.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "loginid": { + "description": "Account ID.", + "type": "string" + }, + "platform": { + "description": "Account platform name.", + "type": "string", + "enum": [ + "derivez", + "dtrade", + "dwallet", + "dxtrade", + "mt5" + ] + } + } + } + }, + "loginid": { + "description": "The account ID of specified account.", + "type": "string" + } } - } } - } - } - }, - "wallet": { - "description": "Details of the Wallet account.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Wallet account ID.", - "type": "string" - }, - "balance": { - "description": "Wallet account balance.", + }, + "balance": { + "description": "Cash balance of the account.", "type": "number" - }, - "currency": { - "description": "Wallet account currency.", + }, + "country": { + "description": "2-letter country code (ISO standard).", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "currency": { + "description": "Currency of the account.", + "type": "string" + }, + "email": { + "description": "User email.", + "type": "string" + }, + "fullname": { + "description": "User's full name. Will be empty for virtual accounts.", "type": "string" - }, - "linked_to": { + }, + "is_virtual": { + "description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "landing_company_fullname": { + "description": "Landing company name the account belongs to.", + "type": "string" + }, + "landing_company_name": { + "description": "Landing company shortcode the account belongs to.", + "type": "string" + }, + "linked_to": { "description": "Details of the list of Trading accounts linked to the Wallet account.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Trading account ID.", - "type": "string" - }, - "balance": { - "description": "Trading account balance.", - "type": "string" - }, - "currency": { - "description": "Trading account currency.", - "type": "string" - }, - "platform": { - "description": "Trading account platform name.", - "type": "string", - "enum": ["deriv", "dxtrade", "mt5"] + "type": "object", + "additionalProperties": false, + "properties": { + "loginid": { + "description": "Account ID.", + "type": "string" + }, + "platform": { + "description": "Account platform name.", + "type": "string", + "enum": [ + "derivez", + "dtrade", + "dwallet", + "dxtrade", + "mt5" + ] + } } - } } - }, - "payment_method": { - "description": "Wallet account payment method.", - "type": "string" - } - } - } - } - } - }, - "balance": { - "description": "Cash balance of the account.", - "type": "number" - }, - "country": { - "description": "2-letter country code (ISO standard).", - "type": "string", - "pattern": "^[a-z]{0,2}$" - }, - "currency": { - "description": "Currency of the account.", - "type": "string" - }, - "email": { - "description": "User email.", - "type": "string" - }, - "fullname": { - "description": "User's full name. Will be empty for virtual accounts.", - "type": "string" - }, - "is_virtual": { - "description": "Boolean value: 1 or 0, indicating whether the account is a virtual-money account.", - "type": "integer", - "enum": [0, 1] - }, - "landing_company_fullname": { - "description": "Landing company name the account belongs to.", - "type": "string" - }, - "landing_company_name": { - "description": "Landing company shortcode the account belongs to.", - "type": "string" - }, - "local_currencies": { - "description": "Currencies in client's residence country", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Currency code", - "type": "object", - "additionalProperties": false, - "required": ["fractional_digits"], - "properties": { - "fractional_digits": { - "description": "Number of fractional digits.", - "type": "integer" - } - } - } - } - }, - "loginid": { - "description": "The account ID that the token was issued for.", - "type": "string" - }, - "preferred_language": { - "description": "User's preferred language, ISO standard code of language", - "type": ["null", "string"], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "scopes": { - "description": "Scopes available to the token.", - "type": "array", - "items": { - "type": "string" - } - }, - "trading": { - "description": "Details of the Trading account.", - "type": "object", - "additionalProperties": false, - "properties": { - "linked_to": { - "description": "Details of the Wallet account linked to the Trading account.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Wallet account ID.", - "type": "string" - }, - "balance": { - "description": "Wallet account balance.", - "type": "string" - }, - "currency": { - "description": "Wallet account currency.", - "type": "string" - }, - "payment_method": { - "description": "Wallet account payment method.", + }, + "local_currencies": { + "description": "Currencies in client's residence country", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Currency code", + "type": "object", + "additionalProperties": false, + "required": [ + "fractional_digits" + ], + "properties": { + "fractional_digits": { + "description": "Number of fractional digits.", + "type": "integer" + } + } + } + } + }, + "loginid": { + "description": "The account ID that the token was issued for.", "type": "string" - } + }, + "preferred_language": { + "description": "User's preferred language, ISO standard code of language", + "type": [ + "null", + "string" + ], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "scopes": { + "description": "Scopes available to the token.", + "type": "array", + "items": { + "type": "string" + } + }, + "upgradeable_landing_companies": { + "description": "List of landing company shortcodes the account can upgrade to.", + "type": "array" + }, + "user_id": { + "description": "The internal user ID for this account.", + "type": "integer" } - } } - } }, - "upgradeable_landing_companies": { - "description": "List of landing company shortcodes the account can upgrade to.", - "type": "array" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "user_id": { - "description": "The internal user ID for this account.", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "authorize" + ] }, - "wallet": { - "description": "Details of the Wallet account.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Wallet account ID.", - "type": "string" - }, - "balance": { - "description": "Wallet account balance.", - "type": "number" - }, - "currency": { - "description": "Wallet account currency.", - "type": "string" - }, - "linked_to": { - "description": "Details of the list of Trading accounts linked to the Wallet account.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Trading account ID.", - "type": "string" - }, - "balance": { - "description": "Trading account balance.", - "type": "string" - }, - "currency": { - "description": "Trading account currency.", - "type": "string" - }, - "platform": { - "description": "Trading account platform name.", - "type": "string", - "enum": ["deriv", "dxtrade", "mt5"] - } - } - } - }, - "payment_method": { - "description": "Wallet account payment method.", - "type": "string" - } - } + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["authorize"] - }, - "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/authorize/send.json b/config/v3/authorize/send.json index 37ba6f68..4091e5c8 100644 --- a/config/v3/authorize/send.json +++ b/config/v3/authorize/send.json @@ -1,31 +1,37 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/balance/example.json b/config/v3/balance/example.json index d5ec80ca..05a186b3 100644 --- a/config/v3/balance/example.json +++ b/config/v3/balance/example.json @@ -1,4 +1,4 @@ { - "balance": 1, - "subscribe": 1 + "balance": 1, + "subscribe": 1 } diff --git a/config/v3/balance/receive.json b/config/v3/balance/receive.json index be4ebb2c..422c3262 100644 --- a/config/v3/balance/receive.json +++ b/config/v3/balance/receive.json @@ -1,199 +1,249 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Balance (response)", - "description": "Return details of user account balance", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "balance": { - "title": "balance", - "description": "Current balance of one or more accounts.", - "type": "object", - "additionalProperties": false, - "required": ["balance", "currency", "loginid"], - "properties": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Balance (response)", + "description": "Return details of user account balance", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { "balance": { - "description": "Balance of current account.", - "type": "number", - "minimum": 0 - }, - "accounts": { - "description": "List of active accounts.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^.+[0-9]{3,}$": { - "description": "Individual accounts details.", - "type": "object", - "additionalProperties": false, - "required": [ + "title": "balance", + "description": "Current balance of one or more accounts.", + "type": "object", + "additionalProperties": false, + "required": [ "balance", - "converted_amount", "currency", - "demo_account", - "status", - "type" - ], - "properties": { + "loginid" + ], + "properties": { "balance": { - "description": "Account balance", - "type": "number" + "description": "Balance of current account.", + "type": "number", + "minimum": 0 }, - "converted_amount": { - "description": "Account balance converted the total currency.", - "type": "number" + "accounts": { + "description": "List of active accounts.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^.+[0-9]{3,}$": { + "description": "Individual accounts details.", + "type": "object", + "additionalProperties": false, + "required": [ + "balance", + "converted_amount", + "currency", + "demo_account", + "status", + "type" + ], + "properties": { + "balance": { + "description": "Account balance", + "type": "number" + }, + "converted_amount": { + "description": "Account balance converted the total currency.", + "type": "number" + }, + "currency": { + "description": "Account currency.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] + }, + "demo_account": { + "description": "If set to 1, this is a demo account.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "status": { + "description": "Boolean value of 1 or 0. Indicates the status of account. 1 indicates account is good and accessible.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "type": { + "description": "Type of account.", + "type": "string", + "enum": [ + "mt5", + "deriv" + ] + } + } + } + } }, "currency": { - "description": "Account currency.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] + "description": "Currency of current account.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] }, - "demo_account": { - "description": "If set to 1, this is a demo account.", - "type": "integer", - "enum": [0, 1] + "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" + ] }, - "status": { - "description": "Boolean value of 1 or 0. Indicates the status of account. 1 indicates account is good and accessible.", - "type": "integer", - "enum": [1, 0] + "loginid": { + "description": "Client loginid.", + "type": "string", + "pattern": "^[A-Z]{2,4}[0-9]{1,10}$", + "examples": [ + "CR000000" + ] }, - "type": { - "description": "Type of account.", - "type": "string", - "enum": ["mt5", "deriv"] + "total": { + "description": "Summary totals of accounts by type.", + "type": "object", + "additionalProperties": false, + "properties": { + "deriv": { + "description": "Total balance of all real money Deriv accounts.", + "type": "object", + "additionalProperties": false, + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Total of balances.", + "type": "number", + "minimum": 0 + }, + "currency": { + "description": "Currency of total.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] + } + } + }, + "deriv_demo": { + "description": "Total balance of all demo Deriv accounts.", + "type": "object", + "additionalProperties": false, + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Total of balances.", + "type": "number", + "minimum": 0 + }, + "currency": { + "description": "Currency of total.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] + } + } + }, + "mt5": { + "description": "Total balance of all MT5 real money accounts.", + "type": "object", + "additionalProperties": false, + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Total balance of all MT5 accounts", + "type": "number" + }, + "currency": { + "description": "Currency of total.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] + } + } + }, + "mt5_demo": { + "description": "Total balance of all MT5 demo accounts.", + "type": "object", + "additionalProperties": false, + "required": [ + "amount", + "currency" + ], + "properties": { + "amount": { + "description": "Total of balances.", + "type": "number" + }, + "currency": { + "description": "Currency of total.", + "type": "string", + "pattern": "^(|[a-zA-Z0-9]{2,20})$", + "examples": [ + "USD" + ] + } + } + } + } } - } } - } }, - "currency": { - "description": "Currency of current account.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] + "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" + ] + } + } }, - "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" }, - "loginid": { - "description": "Client loginid.", - "type": "string", - "pattern": "^[A-Z]{2,4}[0-9]{1,10}$", - "examples": ["CR000000"] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "balance" + ] }, - "total": { - "description": "Summary totals of accounts by type.", - "type": "object", - "additionalProperties": false, - "properties": { - "deriv": { - "description": "Total balance of all real money Deriv accounts.", - "type": "object", - "additionalProperties": false, - "required": ["amount", "currency"], - "properties": { - "amount": { - "description": "Total of balances.", - "type": "number", - "minimum": 0 - }, - "currency": { - "description": "Currency of total.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] - } - } - }, - "deriv_demo": { - "description": "Total balance of all demo Deriv accounts.", - "type": "object", - "additionalProperties": false, - "required": ["amount", "currency"], - "properties": { - "amount": { - "description": "Total of balances.", - "type": "number", - "minimum": 0 - }, - "currency": { - "description": "Currency of total.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] - } - } - }, - "mt5": { - "description": "Total balance of all MT5 real money accounts.", - "type": "object", - "additionalProperties": false, - "required": ["amount", "currency"], - "properties": { - "amount": { - "description": "Total balance of all MT5 accounts", - "type": "number" - }, - "currency": { - "description": "Currency of total.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] - } - } - }, - "mt5_demo": { - "description": "Total balance of all MT5 demo accounts.", - "type": "object", - "additionalProperties": false, - "required": ["amount", "currency"], - "properties": { - "amount": { - "description": "Total of balances.", - "type": "number" - }, - "currency": { - "description": "Currency of total.", - "type": "string", - "pattern": "^(|[a-zA-Z0-9]{2,20})$", - "examples": ["USD"] - } - } - } - } - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["balance"] - }, - "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/balance/send.json b/config/v3/balance/send.json index 64abc42e..ea1b4770 100644 --- a/config/v3/balance/send.json +++ b/config/v3/balance/send.json @@ -1,36 +1,47 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/buy/example.json b/config/v3/buy/example.json index dee86514..940502e9 100644 --- a/config/v3/buy/example.json +++ b/config/v3/buy/example.json @@ -1,4 +1,4 @@ { - "buy": "uw2mk7no3oktoRVVsB4Dz7TQnFfABuFDgO95dlxfMxRuPUsz", - "price": 100 + "buy": "uw2mk7no3oktoRVVsB4Dz7TQnFfABuFDgO95dlxfMxRuPUsz", + "price": 100 } diff --git a/config/v3/buy/receive.json b/config/v3/buy/receive.json index 334d814b..93cda76e 100644 --- a/config/v3/buy/receive.json +++ b/config/v3/buy/receive.json @@ -1,91 +1,100 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Buy Contract (response)", - "description": "A message with transaction results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "buy": { - "title": "buy", - "description": "Receipt confirmation for the purchase", - "type": "object", - "additionalProperties": false, - "required": [ - "balance_after", - "buy_price", - "contract_id", - "longcode", - "payout", - "purchase_time", - "shortcode", - "start_time", - "transaction_id" - ], - "properties": { - "balance_after": { - "description": "The new account balance after completion of the purchase", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract (response)", + "description": "A message with transaction results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "buy": { + "title": "buy", + "description": "Receipt confirmation for the purchase", + "type": "object", + "additionalProperties": false, + "required": [ + "balance_after", + "buy_price", + "contract_id", + "longcode", + "payout", + "purchase_time", + "shortcode", + "start_time", + "transaction_id" + ], + "properties": { + "balance_after": { + "description": "The new account balance after completion of the purchase", + "type": "number" + }, + "buy_price": { + "description": "Actual effected purchase price", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier", + "type": "integer" + }, + "longcode": { + "description": "The description of contract purchased", + "type": "string" + }, + "payout": { + "description": "Proposed payout value", + "type": "number" + }, + "purchase_time": { + "description": "Epoch value of the transaction purchase time", + "type": "integer" + }, + "shortcode": { + "description": "Compact description of the contract purchased", + "type": "string" + }, + "start_time": { + "description": "Epoch value showing the expected start time of the contract", + "type": "integer" + }, + "transaction_id": { + "description": "Internal transaction identifier", + "type": "integer" + } + } }, - "buy_price": { - "description": "Actual effected purchase price", - "type": "number" + "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" + ] + } + } }, - "contract_id": { - "description": "Internal contract identifier", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "longcode": { - "description": "The description of contract purchased", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "buy" + ] }, - "payout": { - "description": "Proposed payout value", - "type": "number" - }, - "purchase_time": { - "description": "Epoch value of the transaction purchase time", - "type": "integer" - }, - "shortcode": { - "description": "Compact description of the contract purchased", - "type": "string" - }, - "start_time": { - "description": "Epoch value showing the expected start time of the contract", - "type": "integer" - }, - "transaction_id": { - "description": "Internal transaction identifier", - "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"] + "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": ["buy"] - }, - "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/buy/send.json b/config/v3/buy/send.json index ac893033..370f7abf 100644 --- a/config/v3/buy/send.json +++ b/config/v3/buy/send.json @@ -1,192 +1,221 @@ { - "$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" - ] - }, - "currency": { - "description": "This can only be the account-holder's currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify date_expiry or duration.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "date_start": { - "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity", - "type": "integer", - "maximum": 99999999, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", - "type": "string", - "enum": ["d", "m", "s", "h", "t"] - }, - "growth_rate": { - "description": "[Optional] Growth rate of an accumulator contract.", - "type": "number" - }, - "limit_order": { - "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and `ACCU` contracts).", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", - "type": "number" - }, - "take_profit": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract (request)", + "description": "Buy a Contract", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "buy", + "price" + ], + "properties": { + "buy": { + "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", + "type": "string", + "pattern": "^(?:[\\w-]{32,128}|1)$" + }, + "parameters": { + "description": "[Optional] Used to pass the parameters for contract buy.", + "type": "object", + "additionalProperties": false, + "required": [ + "contract_type", + "currency", + "symbol" + ], + "properties": { + "amount": { + "description": "[Optional] Proposed payout or stake value", + "type": "number", + "minimum": 0 + }, + "app_markup_percentage": { + "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", + "type": "number" + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier_range": { + "description": "[Optional] Barrier range for callputspread.", + "type": "string", + "enum": [ + "tight", + "middle", + "wide" + ] + }, + "basis": { + "description": "[Optional] Indicates whether amount is 'payout' or 'stake' for binary options.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "cancellation": { + "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", + "type": "string", + "pattern": "^\\w+$" + }, + "contract_type": { + "description": "A valid contract-type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "ACCU", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify date_expiry or duration.", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + }, + "date_start": { + "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity", + "type": "integer", + "maximum": 99999999, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", + "type": "string", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "growth_rate": { + "description": "[Optional] Growth rate of an accumulator contract.", + "type": "number" + }, + "limit_order": { + "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and `ACCU` contracts).", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", + "type": "number" + }, + "take_profit": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", + "type": "number" + } + } + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "product_type": { + "description": "[Optional] The product type.", + "type": "string", + "default": "basic", + "enum": [ + "basic" + ] + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", + "type": "integer" + }, + "symbol": { + "description": "Symbol code", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "trading_period_start": { + "description": "[Optional] An epoch value of a predefined trading period start time", + "type": "integer", + "maximum": 9999999999, + "minimum": 1 + } } - } - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "product_type": { - "description": "[Optional] The product type.", - "type": "string", - "default": "basic", - "enum": ["basic"] - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", - "type": "integer" - }, - "symbol": { - "description": "Symbol code", - "type": "string", - "pattern": "^\\w{2,30}$" }, - "trading_period_start": { - "description": "[Optional] An epoch value of a predefined trading period start time", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 + "price": { + "description": "Maximum price at which to purchase the contract.", + "type": "number", + "minimum": 0 + }, + "subscribe": { + "description": "[Optional] `1` to stream.", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "price": { - "description": "Maximum price at which to purchase the contract.", - "type": "number", - "minimum": 0 - }, - "subscribe": { - "description": "[Optional] `1` to stream.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/buy_contract_for_multiple_accounts/example.json b/config/v3/buy_contract_for_multiple_accounts/example.json index 592b0bfd..d65677e3 100644 --- a/config/v3/buy_contract_for_multiple_accounts/example.json +++ b/config/v3/buy_contract_for_multiple_accounts/example.json @@ -1,10 +1,10 @@ { - "buy_contract_for_multiple_accounts": "AE79667A-3561-11E6-880B-19CE0BCBE464", - "price": 2.57, - "tokens": [ - "EWHdv7feGJRmMf1kqv79lgfPiGjLLGV9GHTZFQ345FzJSfNE", - "ONqj76yAnVKnPtc", - "oSpp7ohpGf50tP6", - "uz6OSIcFIcPKK5T" - ] + "buy_contract_for_multiple_accounts": "AE79667A-3561-11E6-880B-19CE0BCBE464", + "price": 2.57, + "tokens": [ + "EWHdv7feGJRmMf1kqv79lgfPiGjLLGV9GHTZFQ345FzJSfNE", + "ONqj76yAnVKnPtc", + "oSpp7ohpGf50tP6", + "uz6OSIcFIcPKK5T" + ] } diff --git a/config/v3/buy_contract_for_multiple_accounts/receive.json b/config/v3/buy_contract_for_multiple_accounts/receive.json index 2a1fc5f8..6e65eb3b 100644 --- a/config/v3/buy_contract_for_multiple_accounts/receive.json +++ b/config/v3/buy_contract_for_multiple_accounts/receive.json @@ -1,114 +1,125 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Buy Contract for Multiple Accounts (response)", - "description": "A message with transaction results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "buy_contract_for_multiple_accounts": { - "title": "buy_contract_for_multiple_accounts", - "description": "Receipt confirmation for the purchase", - "type": "object", - "additionalProperties": false, - "required": ["result"], - "properties": { - "result": { - "description": "List of results containing transactions and/or errors for the bought contracts.", - "type": "array", - "items": { - "anyOf": [ - { - "description": "Receipt for one contract", - "type": "object", - "additionalProperties": false, - "required": [ - "buy_price", - "contract_id", - "longcode", - "payout", - "purchase_time", - "shortcode", - "start_time", - "token", - "transaction_id" - ], - "properties": { - "buy_price": { - "description": "Actual effected purchase price", - "type": "number" - }, - "contract_id": { - "description": "Internal contract identifier", - "type": "integer" - }, - "longcode": { - "description": "The description of contract purchased", - "type": "string" - }, - "payout": { - "description": "Proposed payout value", - "type": "number" - }, - "purchase_time": { - "description": "Epoch value of the transaction purchase time", - "type": "integer" - }, - "shortcode": { - "description": "Compact description of the contract purchased", - "type": "string" - }, - "start_time": { - "description": "Epoch value showing the expected start time of the contract", - "type": "integer" - }, - "token": { - "description": "The token designating the account", - "type": "string", - "sensitive": 1 - }, - "transaction_id": { - "description": "Internal transaction identifier", - "type": "integer" - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract for Multiple Accounts (response)", + "description": "A message with transaction results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "buy_contract_for_multiple_accounts": { + "title": "buy_contract_for_multiple_accounts", + "description": "Receipt confirmation for the purchase", + "type": "object", + "additionalProperties": false, + "required": [ + "result" + ], + "properties": { + "result": { + "description": "List of results containing transactions and/or errors for the bought contracts.", + "type": "array", + "items": { + "anyOf": [ + { + "description": "Receipt for one contract", + "type": "object", + "additionalProperties": false, + "required": [ + "buy_price", + "contract_id", + "longcode", + "payout", + "purchase_time", + "shortcode", + "start_time", + "token", + "transaction_id" + ], + "properties": { + "buy_price": { + "description": "Actual effected purchase price", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier", + "type": "integer" + }, + "longcode": { + "description": "The description of contract purchased", + "type": "string" + }, + "payout": { + "description": "Proposed payout value", + "type": "number" + }, + "purchase_time": { + "description": "Epoch value of the transaction purchase time", + "type": "integer" + }, + "shortcode": { + "description": "Compact description of the contract purchased", + "type": "string" + }, + "start_time": { + "description": "Epoch value showing the expected start time of the contract", + "type": "integer" + }, + "token": { + "description": "The token designating the account", + "type": "string", + "sensitive": 1 + }, + "transaction_id": { + "description": "Internal transaction identifier", + "type": "integer" + } + } + }, + { + "description": "Error message", + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message_to_client", + "token" + ], + "properties": { + "code": { + "description": "An error code", + "type": "string" + }, + "message_to_client": { + "description": "An error message localized according to the websocket", + "type": "string" + }, + "token": { + "description": "The token designating the account", + "type": "string" + } + } + } + ] + } } - }, - { - "description": "Error message", - "type": "object", - "additionalProperties": false, - "required": ["code", "message_to_client", "token"], - "properties": { - "code": { - "description": "An error code", - "type": "string" - }, - "message_to_client": { - "description": "An error message localized according to the websocket", - "type": "string" - }, - "token": { - "description": "The token designating the account", - "type": "string" - } - } - } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "buy_contract_for_multiple_accounts" ] - } + }, + "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": ["buy_contract_for_multiple_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/buy_contract_for_multiple_accounts/send.json b/config/v3/buy_contract_for_multiple_accounts/send.json index 5b1ae0e9..ce9e7e12 100644 --- a/config/v3/buy_contract_for_multiple_accounts/send.json +++ b/config/v3/buy_contract_for_multiple_accounts/send.json @@ -1,155 +1,177 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Buy Contract for Multiple Accounts (request)", - "description": "Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["buy_contract_for_multiple_accounts", "price", "tokens"], - "properties": { - "buy_contract_for_multiple_accounts": { - "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", - "type": "string", - "pattern": "^(?:[\\w-]{32,128}|1)$" - }, - "parameters": { - "description": "[Optional] Used to pass the parameters for contract buy.", - "type": "object", - "additionalProperties": false, - "required": ["contract_type", "currency", "symbol"], - "properties": { - "amount": { - "description": "[Optional] Proposed `payout` or `stake` value", - "type": "number", - "minimum": 0 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Buy Contract for Multiple Accounts (request)", + "description": "Buy a Contract for multiple Accounts specified by the `tokens` parameter. Note, although this is an authorized call, the contract is not bought for the authorized account.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "buy_contract_for_multiple_accounts", + "price", + "tokens" + ], + "properties": { + "buy_contract_for_multiple_accounts": { + "description": "Either the ID received from a Price Proposal (`proposal` call), or `1` if contract buy parameters are passed in the `parameters` field.", + "type": "string", + "pattern": "^(?:[\\w-]{32,128}|1)$" }, - "app_markup_percentage": { - "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", - "type": "number" + "parameters": { + "description": "[Optional] Used to pass the parameters for contract buy.", + "type": "object", + "additionalProperties": false, + "required": [ + "contract_type", + "currency", + "symbol" + ], + "properties": { + "amount": { + "description": "[Optional] Proposed `payout` or `stake` value", + "type": "number", + "minimum": 0 + }, + "app_markup_percentage": { + "description": "[Optional] Markup added to contract prices (as a percentage of contract payout)", + "type": "number" + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + }, + "basis": { + "description": "[Optional] Indicate whether amount is 'payout' or 'stake'.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "contract_type": { + "description": "A valid contract-type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify `date_expiry` or `duration`.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "date_start": { + "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity", + "type": "integer", + "maximum": 3600, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", + "type": "string", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", + "type": "integer" + }, + "symbol": { + "description": "Symbol code", + "type": "string", + "pattern": "^\\w{2,30}$" + } + } }, - "barrier": { - "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + "price": { + "description": "Maximum price at which to purchase the contract.", + "type": "number", + "minimum": 0 }, - "barrier2": { - "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers.", - "type": "string", - "pattern": "^(?=.{1,20}$)[+-]?\\d+\\.?\\d*$" + "tokens": { + "description": "List of API tokens identifying the accounts for which the contract is bought. Note: If the same token appears multiple times or if multiple tokens designate the same account, the contract is bought multiple times for this account.", + "type": "array", + "items": { + "description": "API token identifying the accounts for which the contract is bought.", + "type": "string", + "pattern": "^[\\w\\s-]+$" + }, + "sensitive": 1 }, - "basis": { - "description": "[Optional] Indicate whether amount is 'payout' or 'stake'.", - "type": "string", - "enum": ["payout", "stake"] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 }, - "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" - ] - }, - "currency": { - "description": "This can only be the account-holder's currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. You must either specify `date_expiry` or `duration`.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "date_start": { - "description": "[Optional] For forward-starting contracts, epoch value of the starting time of the contract.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity", - "type": "integer", - "maximum": 3600, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit is `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks", - "type": "string", - "enum": ["d", "m", "s", "h", "t"] - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for tickhigh and ticklow contracts.", - "type": "integer" - }, - "symbol": { - "description": "Symbol code", - "type": "string", - "pattern": "^\\w{2,30}$" + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "price": { - "description": "Maximum price at which to purchase the contract.", - "type": "number", - "minimum": 0 - }, - "tokens": { - "description": "List of API tokens identifying the accounts for which the contract is bought. Note: If the same token appears multiple times or if multiple tokens designate the same account, the contract is bought multiple times for this account.", - "type": "array", - "items": { - "description": "API token identifying the accounts for which the contract is bought.", - "type": "string", - "pattern": "^[\\w\\s-]+$" - }, - "sensitive": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/cancel/example.json b/config/v3/cancel/example.json index ed5f681e..7d396cf2 100644 --- a/config/v3/cancel/example.json +++ b/config/v3/cancel/example.json @@ -1,3 +1,3 @@ { - "cancel": 11542203588 + "cancel": 11542203588 } diff --git a/config/v3/cancel/receive.json b/config/v3/cancel/receive.json index 12b913b5..fcad84be 100644 --- a/config/v3/cancel/receive.json +++ b/config/v3/cancel/receive.json @@ -1,50 +1,55 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cancel a Contract (response)", - "description": "A message with transaction results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "cancel": { - "title": "cancel", - "description": "Receipt for the transaction", - "type": "object", - "additionalProperties": false, - "properties": { - "balance_after": { - "description": "New account balance after completion of the sale", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cancel a Contract (response)", + "description": "A message with transaction results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "cancel": { + "title": "cancel", + "description": "Receipt for the transaction", + "type": "object", + "additionalProperties": false, + "properties": { + "balance_after": { + "description": "New account balance after completion of the sale", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier for the sold contract", + "type": "integer" + }, + "reference_id": { + "description": "Internal transaction identifier for the corresponding buy transaction", + "type": "integer" + }, + "sold_for": { + "description": "Actual effected sale price", + "type": "number" + }, + "transaction_id": { + "description": "Internal transaction identifier for the sale transaction", + "type": "integer" + } + } }, - "contract_id": { - "description": "Internal contract identifier for the sold contract", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "reference_id": { - "description": "Internal transaction identifier for the corresponding buy transaction", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "cancel" + ] }, - "sold_for": { - "description": "Actual effected sale price", - "type": "number" - }, - "transaction_id": { - "description": "Internal transaction identifier for the sale transaction", - "type": "integer" + "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": ["cancel"] - }, - "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/cancel/send.json b/config/v3/cancel/send.json index 0235b90b..c28ec834 100644 --- a/config/v3/cancel/send.json +++ b/config/v3/cancel/send.json @@ -1,24 +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" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/cashier/example.json b/config/v3/cashier/example.json index c6dbfa7a..d1a076b4 100644 --- a/config/v3/cashier/example.json +++ b/config/v3/cashier/example.json @@ -1,5 +1,5 @@ { - "cashier": "deposit", - "provider": "doughflow", - "verification_code": "my_verification_code" + "cashier": "deposit", + "provider": "doughflow", + "verification_code": "my_verification_code" } diff --git a/config/v3/cashier/receive.json b/config/v3/cashier/receive.json index a5cc6e34..9c484dc5 100644 --- a/config/v3/cashier/receive.json +++ b/config/v3/cashier/receive.json @@ -1,94 +1,116 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cashier Information (response)", - "description": "Cashier information for the specified type.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "cashier": { - "title": "cashier", - "description": "Possible error codes are:\n- `ASK_TNC_APPROVAL`: API call `tnc_approval`\n- `ASK_AUTHENTICATE`\n- `ASK_UK_FUNDS_PROTECTION`: API call `tnc_approval`\n- `ASK_CURRENCY`: API call `set_account_currency`\n- `ASK_EMAIL_VERIFY`: API call `verify_email`\n- `ASK_FIX_DETAILS`: API call `set_settings`", - "oneOf": [ - { - "description": "Response for type `url`, It will return url to cashier service.", - "type": "string" - }, - { - "description": "Response for type `api'.", - "type": "object", - "required": ["action"], - "properties": { - "action": { - "description": "Type of operation, which is requested.", - "type": "string", - "enum": ["deposit", "withdraw"] - }, - "deposit": { - "description": "[Optional] Result for `deposit` action.", - "type": "object", - "required": ["address"], - "properties": { - "address": { - "description": "Address for crypto deposit.", - "type": "string" - } - } - }, - "withdraw": { - "description": "[Optional] Result for `withdraw` action.", - "oneOf": [ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cashier Information (response)", + "description": "Cashier information for the specified type.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "cashier": { + "title": "cashier", + "description": "Possible error codes are:\n- `ASK_TNC_APPROVAL`: API call `tnc_approval`\n- `ASK_AUTHENTICATE`\n- `ASK_UK_FUNDS_PROTECTION`: API call `tnc_approval`\n- `ASK_CURRENCY`: API call `set_account_currency`\n- `ASK_EMAIL_VERIFY`: API call `verify_email`\n- `ASK_FIX_DETAILS`: API call `set_settings`", + "oneOf": [ { - "title": "Withdraw operation", - "description": "Result for withdraw operation.", - "type": "object", - "required": ["id", "status_code", "status_message"], - "properties": { - "id": { - "description": "The unique identifier for the transaction.", - "type": "string" - }, - "status_code": { - "description": "The status code of the withdrawal.", - "type": "string", - "enum": ["LOCKED"] - }, - "status_message": { - "description": "The status message of the withdrawal.", - "type": "string" - } - } + "description": "Response for type `url`, It will return url to cashier service.", + "type": "string" }, { - "title": "Dry-run validation", - "description": "Result for `dry_run` validation.", - "type": "object", - "required": ["dry_run"], - "properties": { - "dry_run": { - "description": "The `dry_run` was successful.", - "type": "integer", - "enum": [1] + "description": "Response for type `api'.", + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "description": "Type of operation, which is requested.", + "type": "string", + "enum": [ + "deposit", + "withdraw" + ] + }, + "deposit": { + "description": "[Optional] Result for `deposit` action.", + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "description": "Address for crypto deposit.", + "type": "string" + } + } + }, + "withdraw": { + "description": "[Optional] Result for `withdraw` action.", + "oneOf": [ + { + "title": "Withdraw operation", + "description": "Result for withdraw operation.", + "type": "object", + "required": [ + "id", + "status_code", + "status_message" + ], + "properties": { + "id": { + "description": "The unique identifier for the transaction.", + "type": "string" + }, + "status_code": { + "description": "The status code of the withdrawal.", + "type": "string", + "enum": [ + "LOCKED" + ] + }, + "status_message": { + "description": "The status message of the withdrawal.", + "type": "string" + } + } + }, + { + "title": "Dry-run validation", + "description": "Result for `dry_run` validation.", + "type": "object", + "required": [ + "dry_run" + ], + "properties": { + "dry_run": { + "description": "The `dry_run` was successful.", + "type": "integer", + "enum": [ + 1 + ] + } + } + } + ] + } } - } } - ] - } - } + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "cashier" + ] + }, + "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": ["cashier"] - }, - "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/cashier/send.json b/config/v3/cashier/send.json index cefae6eb..3842a7d3 100644 --- a/config/v3/cashier/send.json +++ b/config/v3/cashier/send.json @@ -1,58 +1,75 @@ { - "$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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/contract_update/example.json b/config/v3/contract_update/example.json index 2ab10244..817077a7 100644 --- a/config/v3/contract_update/example.json +++ b/config/v3/contract_update/example.json @@ -1,7 +1,7 @@ { - "contract_update": 1, - "contract_id": 123, - "limit_order": { - "take_profit": 1 - } + "contract_update": 1, + "contract_id": 123, + "limit_order": { + "take_profit": 1 + } } diff --git a/config/v3/contract_update/receive.json b/config/v3/contract_update/receive.json index d23f24dc..1d2a2f01 100644 --- a/config/v3/contract_update/receive.json +++ b/config/v3/contract_update/receive.json @@ -1,76 +1,93 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Update Contract (response)", - "description": "Contract update status", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "contract_update": { - "title": "contract_update", - "description": "Contains the update status of the request", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "The target spot price 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": "Stop loss pip-sized barrier value", - "type": ["null", "string"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Update Contract (response)", + "description": "Contract update status", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "contract_update": { + "title": "contract_update", + "description": "Contains the update status of the request", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "The target spot price 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": "Stop loss pip-sized barrier value", + "type": [ + "null", + "string" + ] + } + } + }, + "take_profit": { + "description": "The target spot price 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": "Take profit pip-sized barrier value", + "type": [ + "null", + "string" + ] + } + } + } } - } }, - "take_profit": { - "description": "The target spot price 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": "Take profit pip-sized barrier value", - "type": ["null", "string"] - } - } + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "contract_update" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["contract_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/contract_update/send.json b/config/v3/contract_update/send.json index 5222f6cd..36916a89 100644 --- a/config/v3/contract_update/send.json +++ b/config/v3/contract_update/send.json @@ -1,44 +1,59 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Update Contract (request)", - "description": "Update a contract condition.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["trade"], - "additionalProperties": false, - "required": ["contract_update", "contract_id", "limit_order"], - "properties": { - "contract_update": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "contract_id": { - "description": "Internal unique contract identifier.", - "type": "integer" - }, - "limit_order": { - "description": "Specify limit order to update.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "New stop loss value for a contract. To cancel, pass `null`.", - "type": ["null", "number"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Update Contract (request)", + "description": "Update a contract condition.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "contract_update", + "contract_id", + "limit_order" + ], + "properties": { + "contract_update": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "take_profit": { - "description": "New take profit value for a contract. To cancel, pass `null`.", - "type": ["null", "number"] + "contract_id": { + "description": "Internal unique contract identifier.", + "type": "integer" + }, + "limit_order": { + "description": "Specify limit order to update.", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "New stop loss value for a contract. To cancel, pass `null`.", + "type": [ + "null", + "number" + ] + }, + "take_profit": { + "description": "New take profit value for a contract. To cancel, pass `null`.", + "type": [ + "null", + "number" + ] + } + } + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/contract_update_history/example.json b/config/v3/contract_update_history/example.json index 11b9b2c1..4dc2f383 100644 --- a/config/v3/contract_update_history/example.json +++ b/config/v3/contract_update_history/example.json @@ -1,4 +1,4 @@ { - "contract_update_history": 1, - "contract_id": 123 + "contract_update_history": 1, + "contract_id": 123 } diff --git a/config/v3/contract_update_history/receive.json b/config/v3/contract_update_history/receive.json index 85188f88..5a6ed815 100644 --- a/config/v3/contract_update_history/receive.json +++ b/config/v3/contract_update_history/receive.json @@ -1,54 +1,62 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Update Contract History (response)", - "description": "Contract update history status", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "contract_update_history": { - "title": "contract_update_history", - "description": "Contains the historical and the most recent update status of the contract", - "type": "array", - "items": { - "description": "Contains the changed parameter.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Display name of the changed parameter.", - "type": "string" - }, - "order_amount": { - "description": "The amount.", - "type": "string" - }, - "order_date": { - "description": "The epoch when the changed was done.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Update Contract History (response)", + "description": "Contract update history status", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "contract_update_history": { + "title": "contract_update_history", + "description": "Contains the historical and the most recent update status of the contract", + "type": "array", + "items": { + "description": "Contains the changed parameter.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Display name of the changed parameter.", + "type": "string" + }, + "order_amount": { + "description": "The amount.", + "type": "string" + }, + "order_date": { + "description": "The epoch when the changed was done.", + "type": "integer" + }, + "order_type": { + "description": "The contract parameter updated.", + "type": "string" + }, + "value": { + "description": "The pip-sized barrier value.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "contract_update_history" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", "type": "integer" - }, - "order_type": { - "description": "The contract parameter updated.", - "type": "string" - }, - "value": { - "description": "The pip-sized barrier value.", - "type": ["null", "string"] - } } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["contract_update_history"] - }, - "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/contract_update_history/send.json b/config/v3/contract_update_history/send.json index 722db754..234808f5 100644 --- a/config/v3/contract_update_history/send.json +++ b/config/v3/contract_update_history/send.json @@ -1,36 +1,44 @@ { - "$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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/contracts_for/example.json b/config/v3/contracts_for/example.json index 88e74641..21e1ab05 100644 --- a/config/v3/contracts_for/example.json +++ b/config/v3/contracts_for/example.json @@ -1,6 +1,6 @@ { - "contracts_for": "R_50", - "currency": "USD", - "landing_company": "svg", - "product_type": "basic" + "contracts_for": "R_50", + "currency": "USD", + "landing_company": "svg", + "product_type": "basic" } diff --git a/config/v3/contracts_for/receive.json b/config/v3/contracts_for/receive.json index 3c02f908..4d64c025 100644 --- a/config/v3/contracts_for/receive.json +++ b/config/v3/contracts_for/receive.json @@ -1,230 +1,324 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Contracts For Symbol (response)", - "description": "Get the list of currently available contracts", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "contracts_for": { - "title": "contracts_for", - "description": "List of available contracts. Note: if the user is authenticated, then only contracts allowed under his account will be returned.", - "type": "object", - "additionalProperties": false, - "required": ["available"], - "properties": { - "available": { - "description": "Array of available contracts details", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Contracts For Symbol (response)", + "description": "Get the list of currently available contracts", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "contracts_for": { + "title": "contracts_for", + "description": "List of available contracts. Note: if the user is authenticated, then only contracts allowed under his account will be returned.", "type": "object", "additionalProperties": false, "required": [ - "barrier_category", - "barriers", - "contract_category", - "contract_category_display", - "contract_type", - "exchange_name", - "expiry_type", - "market", - "max_contract_duration", - "min_contract_duration", - "sentiment", - "start_type", - "submarket", - "underlying_symbol" + "available" ], "properties": { - "available_barriers": { - "description": "Array of available barriers for a predefined trading period", - "type": "array", - "minItems": 1 - }, - "barrier": { - "description": "Barrier Details.", - "type": ["null", "string"] - }, - "barrier_category": { - "description": "Category of barrier.", - "type": "string", - "examples": ["american", "asian", "euro_atm", "euro_non_atm"] - }, - "barrier_choices": { - "description": "[Only for Vanilla] Barrier Choices", - "type": "array" - }, - "barriers": { - "description": "Number of barriers.", - "type": "number", - "examples": [0, 1, 2] - }, - "cancellation_range": { - "description": "Cancellation range", - "type": "array" - }, - "contract_category": { - "description": "Category of contract.", - "type": "string", - "examples": ["asian", "callput"] - }, - "contract_category_display": { - "description": "Category of the contract.", - "type": "string", - "examples": ["Asians", "Up/Down"] - }, - "contract_display": { - "description": "Display name for the type of contract.", - "type": "string", - "examples": ["Asian Up", "Higher"] - }, - "contract_type": { - "description": "Type of contract.", - "type": "string", - "examples": ["ASIANU", "CALL"] - }, - "exchange_name": { - "description": "Name of exchange", - "type": "string", - "examples": ["RANDOM"] - }, - "expired_barriers": { - "description": "Array of barriers already expired", - "type": "array" - }, - "expiry_type": { - "description": "Expiry Type.", - "type": "string", - "examples": ["daily", "intraday", "tick"] - }, - "forward_starting_options": { - "description": "Array of returned forward starting options", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "blackouts": { - "description": "The epoch value for the blackouts of forward starting session.", - "type": "array" + "available": { + "description": "Array of available contracts details", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "barrier_category", + "barriers", + "contract_category", + "contract_category_display", + "contract_type", + "exchange_name", + "expiry_type", + "market", + "max_contract_duration", + "min_contract_duration", + "sentiment", + "start_type", + "submarket", + "underlying_symbol" + ], + "properties": { + "available_barriers": { + "description": "Array of available barriers for a predefined trading period", + "type": "array", + "minItems": 1 + }, + "barrier": { + "description": "Barrier Details.", + "type": [ + "null", + "string" + ] + }, + "barrier_category": { + "description": "Category of barrier.", + "type": "string", + "examples": [ + "american", + "asian", + "euro_atm", + "euro_non_atm" + ] + }, + "barrier_choices": { + "description": "[Only for Vanilla] Barrier Choices", + "type": "array" + }, + "barriers": { + "description": "Number of barriers.", + "type": "number", + "examples": [ + 0, + 1, + 2 + ] + }, + "cancellation_range": { + "description": "Cancellation range", + "type": "array" + }, + "contract_category": { + "description": "Category of contract.", + "type": "string", + "examples": [ + "asian", + "callput" + ] + }, + "contract_category_display": { + "description": "Category of the contract.", + "type": "string", + "examples": [ + "Asians", + "Up/Down" + ] + }, + "contract_display": { + "description": "Display name for the type of contract.", + "type": "string", + "examples": [ + "Asian Up", + "Higher" + ] + }, + "contract_type": { + "description": "Type of contract.", + "type": "string", + "examples": [ + "ASIANU", + "CALL" + ] + }, + "exchange_name": { + "description": "Name of exchange", + "type": "string", + "examples": [ + "RANDOM" + ] + }, + "expired_barriers": { + "description": "Array of barriers already expired", + "type": "array" + }, + "expiry_type": { + "description": "Expiry Type.", + "type": "string", + "examples": [ + "daily", + "intraday", + "tick" + ] + }, + "forward_starting_options": { + "description": "Array of returned forward starting options", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "blackouts": { + "description": "The epoch value for the blackouts of forward starting session.", + "type": "array" + }, + "close": { + "description": "The epoch value for the closing date of forward starting session.", + "type": "string" + }, + "date": { + "description": "The epoch value for the date of forward starting session.", + "type": "string" + }, + "open": { + "description": "The epoch value for the opening date of forward starting session.", + "type": "string" + } + } + }, + "minItems": 1 + }, + "growth_rate_range": { + "description": "Growth rate range.", + "type": "array" + }, + "high_barrier": { + "description": "High barrier Details.", + "type": [ + "null", + "string" + ] + }, + "last_digit_range": { + "description": "Last digit range", + "type": "array" + }, + "low_barrier": { + "description": "Low barrier Details.", + "type": [ + "null", + "string" + ] + }, + "market": { + "description": "Type of market.", + "type": "string", + "examples": [ + "forex", + "indices", + "synthetic_index" + ] + }, + "max_contract_duration": { + "description": "Maximum contract duration", + "type": "string", + "examples": [ + "10" + ] + }, + "max_stake": { + "description": "[Only for turbos options] Maximum contract stake", + "type": [ + "null", + "number" + ] + }, + "min_contract_duration": { + "description": "Minimum contract duration.", + "type": "string", + "examples": [ + "5" + ] + }, + "min_stake": { + "description": "[Only for turbos options] Minimum contract stake", + "type": [ + "null", + "number" + ] + }, + "multiplier_range": { + "description": "Multiplier range.", + "type": "array" + }, + "payout_limit": { + "description": "Maximum payout.", + "type": "number", + "examples": [ + 10000 + ] + }, + "sentiment": { + "description": "Type of sentiment.", + "type": "string", + "examples": [ + "differ", + "down", + "match", + "up" + ] + }, + "start_type": { + "description": "Start Type.", + "type": "string", + "examples": [ + "forward", + "spot" + ] + }, + "submarket": { + "description": "Type of submarket.", + "type": "string", + "examples": [ + "major_pairs", + "random_index" + ] + }, + "trading_period": { + "description": "A hash of predefined trading period", + "type": "object" + }, + "underlying_symbol": { + "description": "Symbol code", + "type": "string", + "examples": [ + "R_50", + "frxEURUSD" + ] + } + } }, - "close": { - "description": "The epoch value for the closing date of forward starting session.", - "type": "string" - }, - "date": { - "description": "The epoch value for the date of forward starting session.", - "type": "string" - }, - "open": { - "description": "The epoch value for the opening date of forward starting session.", - "type": "string" - } - } + "minItems": 1 + }, + "close": { + "description": "Symbol's next market-close time as an epoch value", + "type": [ + "integer", + "null" + ] + }, + "feed_license": { + "description": "Indicates the feed license for symbol, for example whether its realtime or delayed", + "type": "string" + }, + "hit_count": { + "description": "Count of contracts available", + "type": "number" }, - "minItems": 1 - }, - "growth_rate_range": { - "description": "Growth rate range.", - "type": "array" - }, - "high_barrier": { - "description": "High barrier Details.", - "type": ["null", "string"] - }, - "last_digit_range": { - "description": "Last digit range", - "type": "array" - }, - "low_barrier": { - "description": "Low barrier Details.", - "type": ["null", "string"] - }, - "market": { - "description": "Type of market.", - "type": "string", - "examples": ["forex", "indices", "synthetic_index"] - }, - "max_contract_duration": { - "description": "Maximum contract duration", - "type": "string", - "examples": ["10"] - }, - "min_contract_duration": { - "description": "Minimum contract duration.", - "type": "string", - "examples": ["5"] - }, - "multiplier_range": { - "description": "Multiplier range.", - "type": "array" - }, - "payout_limit": { - "description": "Maximum payout.", - "type": "number", - "examples": [10000] - }, - "sentiment": { - "description": "Type of sentiment.", - "type": "string", - "examples": ["differ", "down", "match", "up"] - }, - "start_type": { - "description": "Start Type.", - "type": "string", - "examples": ["forward", "spot"] - }, - "submarket": { - "description": "Type of submarket.", - "type": "string", - "examples": ["major_pairs", "random_index"] - }, - "trading_period": { - "description": "A hash of predefined trading period", - "type": "object" - }, - "underlying_symbol": { - "description": "Symbol code", - "type": "string", - "examples": ["R_50", "frxEURUSD"] - } + "non_available": { + "description": "Array of non_available contracts details", + "type": "array" + }, + "open": { + "description": "Symbol's next market-open time as an epoch value", + "type": [ + "integer", + "null" + ] + }, + "spot": { + "description": "Current spot price for this underlying", + "type": [ + "null", + "number" + ] + } } - }, - "minItems": 1 - }, - "close": { - "description": "Symbol's next market-close time as an epoch value", - "type": ["integer", "null"] - }, - "feed_license": { - "description": "Indicates the feed license for symbol, for example whether its realtime or delayed", - "type": "string" }, - "hit_count": { - "description": "Count of contracts available", - "type": "number" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "open": { - "description": "Symbol's next market-open time as an epoch value", - "type": ["integer", "null"] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "contracts_for" + ] }, - "spot": { - "description": "Current spot price for this underlying", - "type": ["null", "number"] + "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": ["contracts_for"] - }, - "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/contracts_for/send.json b/config/v3/contracts_for/send.json index bacd727b..ffdcf764 100644 --- a/config/v3/contracts_for/send.json +++ b/config/v3/contracts_for/send.json @@ -1,50 +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": "[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.", - "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"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copy_start/example.json b/config/v3/copy_start/example.json index d172ae05..b5d00963 100644 --- a/config/v3/copy_start/example.json +++ b/config/v3/copy_start/example.json @@ -1,3 +1,3 @@ { - "copy_start": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" + "copy_start": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" } diff --git a/config/v3/copy_start/receive.json b/config/v3/copy_start/receive.json index 11a85dc1..4dcdf001 100644 --- a/config/v3/copy_start/receive.json +++ b/config/v3/copy_start/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Start (response)", - "description": "A message with results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "copy_start": { - "title": "copy_start", - "description": "Copy start confirmation. Returns 1 is success.", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["copy_start"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Start (response)", + "description": "A message with results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "copy_start": { + "title": "copy_start", + "description": "Copy start confirmation. Returns 1 is success.", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "copy_start" + ] + }, + "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/copy_start/send.json b/config/v3/copy_start/send.json index ae820d99..49323ac8 100644 --- a/config/v3/copy_start/send.json +++ b/config/v3/copy_start/send.json @@ -1,66 +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": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Start (request)", + "description": "Start copy trader bets", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "trade" + ], + "additionalProperties": false, + "required": [ + "copy_start" + ], + "properties": { + "copy_start": { + "description": "API tokens identifying the accounts of trader which will be used to copy trades", "type": "string", - "pattern": "^\\w{4,128}$" - } - } - ] - }, - "max_trade_stake": { - "description": "[Optional] Used to set maximum trade stake to be copied.", - "type": "number" - }, - "min_trade_stake": { - "description": "[Optional] Used to set minimal trade stake to be copied.", - "type": "number" - }, - "trade_types": { - "description": "[Optional] Used to set trade types to be copied. E.x [\"CALL\", \"PUT\"]", - "oneOf": [ - { - "type": "string", - "pattern": "^\\w{3,128}$" + "pattern": "^[\\w\\s-]{15,32}$", + "sensitive": 1 }, - { - "type": "array", - "items": { - "type": "string", - "pattern": "^\\w{3,128}$" - } + "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" + }, + "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}$" + } + } + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/copy_stop/example.json b/config/v3/copy_stop/example.json index d948715a..d8c33635 100644 --- a/config/v3/copy_stop/example.json +++ b/config/v3/copy_stop/example.json @@ -1,3 +1,3 @@ { - "copy_stop": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" + "copy_stop": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" } diff --git a/config/v3/copy_stop/receive.json b/config/v3/copy_stop/receive.json index 288db0b5..31011ff6 100644 --- a/config/v3/copy_stop/receive.json +++ b/config/v3/copy_stop/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Stop (response)", - "description": "A message with results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "copy_stop": { - "title": "copy_stop", - "description": "Copy stopping confirmation. Returns 1 is success.", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["copy_stop"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Stop (response)", + "description": "A message with results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "copy_stop": { + "title": "copy_stop", + "description": "Copy stopping confirmation. Returns 1 is success.", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "copy_stop" + ] + }, + "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/copy_stop/send.json b/config/v3/copy_stop/send.json index c94dba93..b231c029 100644 --- a/config/v3/copy_stop/send.json +++ b/config/v3/copy_stop/send.json @@ -1,26 +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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copytrading_list/example.json b/config/v3/copytrading_list/example.json index 1e6cfb64..bdff9f96 100644 --- a/config/v3/copytrading_list/example.json +++ b/config/v3/copytrading_list/example.json @@ -1,3 +1,3 @@ { - "copytrading_list": 1 + "copytrading_list": 1 } diff --git a/config/v3/copytrading_list/receive.json b/config/v3/copytrading_list/receive.json index 7c1489ab..31323c5d 100644 --- a/config/v3/copytrading_list/receive.json +++ b/config/v3/copytrading_list/receive.json @@ -1,87 +1,103 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: List (response)", - "description": "Details of copiers and/or traders for Copy Trading", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "copytrading_list": { - "title": "copytrading_list", - "description": "The trading information of copiers or traders.", - "type": "object", - "additionalProperties": false, - "required": ["copiers", "traders"], - "properties": { - "copiers": { - "description": "List of users who are currently copy trading the authenticated user", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: List (response)", + "description": "Details of copiers and/or traders for Copy Trading", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "copytrading_list": { + "title": "copytrading_list", + "description": "The trading information of copiers or traders.", "type": "object", "additionalProperties": false, - "required": ["loginid"], + "required": [ + "copiers", + "traders" + ], "properties": { - "loginid": { - "description": "The loginid of the copier's account.", - "type": "string" - } - } - } - }, - "traders": { - "description": "List of traders being followed by the authenticated user", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "assets": { - "description": "The list of assets to copy the trades of.", - "type": "array", - "items": { - "type": "string" + "copiers": { + "description": "List of users who are currently copy trading the authenticated user", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "loginid" + ], + "properties": { + "loginid": { + "description": "The loginid of the copier's account.", + "type": "string" + } + } + } + }, + "traders": { + "description": "List of traders being followed by the authenticated user", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "assets": { + "description": "The list of assets to copy the trades of.", + "type": "array", + "items": { + "type": "string" + } + }, + "loginid": { + "description": "The loginid of the trader's account.", + "type": "string" + }, + "max_trade_stake": { + "description": "Maximum trading stake set for the trader.", + "type": [ + "null", + "number" + ] + }, + "min_trade_stake": { + "description": "Minimum trading stake set for the trader.", + "type": [ + "null", + "number" + ] + }, + "token": { + "description": "The token provided for the trader.", + "type": "string", + "sensitive": 1 + }, + "trade_types": { + "description": "The type of trades set.", + "type": "array", + "items": { + "type": "string" + } + } + } + } } - }, - "loginid": { - "description": "The loginid of the trader's account.", - "type": "string" - }, - "max_trade_stake": { - "description": "Maximum trading stake set for the trader.", - "type": ["null", "number"] - }, - "min_trade_stake": { - "description": "Minimum trading stake set for the trader.", - "type": ["null", "number"] - }, - "token": { - "description": "The token provided for the trader.", - "type": "string", - "sensitive": 1 - }, - "trade_types": { - "description": "The type of trades set.", - "type": "array", - "items": { - "type": "string" - } - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "copytrading_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": ["copytrading_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/copytrading_list/send.json b/config/v3/copytrading_list/send.json index cde199b5..4126f6cd 100644 --- a/config/v3/copytrading_list/send.json +++ b/config/v3/copytrading_list/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/copytrading_statistics/example.json b/config/v3/copytrading_statistics/example.json index c0ccd6de..aa357200 100644 --- a/config/v3/copytrading_statistics/example.json +++ b/config/v3/copytrading_statistics/example.json @@ -1,4 +1,4 @@ { - "copytrading_statistics": 1, - "trader_id": "CR1234" + "copytrading_statistics": 1, + "trader_id": "CR1234" } diff --git a/config/v3/copytrading_statistics/receive.json b/config/v3/copytrading_statistics/receive.json index a0c448f7..f0a1784c 100644 --- a/config/v3/copytrading_statistics/receive.json +++ b/config/v3/copytrading_statistics/receive.json @@ -1,112 +1,117 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Statistics (response)", - "description": "The statistics of the trader.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "copytrading_statistics": { - "title": "copytrading_statistics", - "description": "Statistics of the trader", - "type": "object", - "additionalProperties": false, - "required": [ - "active_since", - "avg_duration", - "avg_loss", - "avg_profit", - "copiers", - "last_12months_profitable_trades", - "monthly_profitable_trades", - "performance_probability", - "total_trades", - "trades_breakdown", - "trades_profitable" - ], - "properties": { - "active_since": { - "description": "This is the epoch the investor started trading.", - "type": "integer" - }, - "avg_duration": { - "description": "Average seconds of keeping positions open.", - "type": "integer" - }, - "avg_loss": { - "description": "Average loss of trades in percentage.", - "type": "number" - }, - "avg_profit": { - "description": "Average profitable trades in percentage.", - "type": "number" - }, - "copiers": { - "description": "Number of copiers for this trader.", - "type": "number" - }, - "last_12months_profitable_trades": { - "description": "Represents the net change in equity for a 12-month period.", - "type": "number" - }, - "monthly_profitable_trades": { - "description": "Represents the net change in equity per month.", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^[0-9]{4}\\-[0-9]{2}$": { - "description": "Monthly profitable trades in percentage.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Copy Trading: Statistics (response)", + "description": "The statistics of the trader.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "copytrading_statistics": { + "title": "copytrading_statistics", + "description": "Statistics of the trader", + "type": "object", + "additionalProperties": false, + "required": [ + "active_since", + "avg_duration", + "avg_loss", + "avg_profit", + "copiers", + "last_12months_profitable_trades", + "monthly_profitable_trades", + "performance_probability", + "total_trades", + "trades_breakdown", + "trades_profitable" + ], + "properties": { + "active_since": { + "description": "This is the epoch the investor started trading.", + "type": "integer" + }, + "avg_duration": { + "description": "Average seconds of keeping positions open.", + "type": "integer" + }, + "avg_loss": { + "description": "Average loss of trades in percentage.", + "type": "number" + }, + "avg_profit": { + "description": "Average profitable trades in percentage.", + "type": "number" + }, + "copiers": { + "description": "Number of copiers for this trader.", + "type": "number" + }, + "last_12months_profitable_trades": { + "description": "Represents the net change in equity for a 12-month period.", + "type": "number" + }, + "monthly_profitable_trades": { + "description": "Represents the net change in equity per month.", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^[0-9]{4}\\-[0-9]{2}$": { + "description": "Monthly profitable trades in percentage.", + "type": "number" + } + } + }, + "performance_probability": { + "description": "Trader performance probability.", + "type": "number" + }, + "total_trades": { + "description": "Total number of trades for all time.", + "type": "integer" + }, + "trades_breakdown": { + "description": "Represents the portfolio distribution by markets.", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^\\w+$": { + "description": "Number of trades in percentage.", + "type": "number" + } + } + }, + "trades_profitable": { + "description": "Number of profit trades in percentage.", + "type": "number" + }, + "yearly_profitable_trades": { + "description": "Represents the net change in equity per year.", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^[0-9]{4}$": { + "description": "Yearly profitable trades in percentage.", + "type": "number" + } + } + } } - } - }, - "performance_probability": { - "description": "Trader performance probability.", - "type": "number" }, - "total_trades": { - "description": "Total number of trades for all time.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "trades_breakdown": { - "description": "Represents the portfolio distribution by markets.", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^\\w+$": { - "description": "Number of trades in percentage.", - "type": "number" - } - } + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "copytrading_statistics" + ] }, - "trades_profitable": { - "description": "Number of profit trades in percentage.", - "type": "number" - }, - "yearly_profitable_trades": { - "description": "Represents the net change in equity per year.", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^[0-9]{4}$": { - "description": "Yearly profitable trades in percentage.", - "type": "number" - } - } + "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": ["copytrading_statistics"] - }, - "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/copytrading_statistics/send.json b/config/v3/copytrading_statistics/send.json index 181c75d7..791f2e40 100644 --- a/config/v3/copytrading_statistics/send.json +++ b/config/v3/copytrading_statistics/send.json @@ -1,29 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Copy Trading: Statistics (request)", - "description": "Retrieve performance, trading, risk and copiers statistics of trader.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["copytrading_statistics", "trader_id"], - "properties": { - "copytrading_statistics": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "trader_id": { - "description": "The ID of the target trader.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/crypto_config/example.json b/config/v3/crypto_config/example.json index 7e1e79ab..622db09f 100644 --- a/config/v3/crypto_config/example.json +++ b/config/v3/crypto_config/example.json @@ -1,3 +1,3 @@ { - "crypto_config": 1 + "crypto_config": 1 } diff --git a/config/v3/crypto_config/receive.json b/config/v3/crypto_config/receive.json index 53040211..817bc9fa 100644 --- a/config/v3/crypto_config/receive.json +++ b/config/v3/crypto_config/receive.json @@ -1,53 +1,60 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Cryptocurrency configurations (response)", - "description": "The response will display the configuration details related to cryptocurrencies", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "crypto_config": { - "title": "crypto_config", - "description": "Provides cryptocurrencies configuration.", - "type": "object", - "additionalProperties": false, - "required": ["currencies_config"], - "properties": { - "currencies_config": { - "description": "Currency configuration including limitiations for each crypto currency.", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Cryptocurrency code", - "type": "object", - "additionalProperties": false, - "properties": { - "minimum_deposit": { - "description": "Minimum deposit amount in corresponding cryptocurrency value.", - "type": "number" - }, - "minimum_withdrawal": { - "description": "Minimum withdrawal for the cryptocurrency in USD.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Cryptocurrency configurations (response)", + "description": "The response will display the configuration details related to cryptocurrencies", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "crypto_config": { + "title": "crypto_config", + "description": "Provides cryptocurrencies configuration.", + "type": "object", + "additionalProperties": false, + "required": [ + "currencies_config" + ], + "properties": { + "currencies_config": { + "description": "Currency configuration including limitiations for each crypto currency.", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Cryptocurrency code", + "type": "object", + "additionalProperties": false, + "properties": { + "minimum_deposit": { + "description": "Minimum deposit amount in corresponding cryptocurrency value.", + "type": "number" + }, + "minimum_withdrawal": { + "description": "Minimum withdrawal for the cryptocurrency in USD.", + "type": "number" + } + } + } + } } - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "crypto_config" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["crypto_config"] - }, - "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_config/send.json b/config/v3/crypto_config/send.json index 0566ec3c..a5570b07 100644 --- a/config/v3/crypto_config/send.json +++ b/config/v3/crypto_config/send.json @@ -1,29 +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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/document_upload/example.json b/config/v3/document_upload/example.json index ec9ef526..42f06863 100644 --- a/config/v3/document_upload/example.json +++ b/config/v3/document_upload/example.json @@ -1,7 +1,7 @@ { - "document_upload": 1, - "document_format": "JPG", - "document_type": "bankstatement", - "expected_checksum": "1a79a4d60de6718e8e5b326e338ae533", - "file_size": 12345 + "document_upload": 1, + "document_format": "JPG", + "document_type": "bankstatement", + "expected_checksum": "1a79a4d60de6718e8e5b326e338ae533", + "file_size": 12345 } diff --git a/config/v3/document_upload/receive.json b/config/v3/document_upload/receive.json index c1636c10..d3213d28 100644 --- a/config/v3/document_upload/receive.json +++ b/config/v3/document_upload/receive.json @@ -1,56 +1,64 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Document Upload (response)", - "description": "Receive details of uploaded authentication documents", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "document_upload": { - "title": "document_upload", - "description": "Details of the uploaded documents.", - "type": "object", - "additionalProperties": false, - "required": ["call_type", "upload_id"], - "properties": { - "call_type": { - "description": "Current call type, add this to your binary payload metadata", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Document Upload (response)", + "description": "Receive details of uploaded authentication documents", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "document_upload": { + "title": "document_upload", + "description": "Details of the uploaded documents.", + "type": "object", + "additionalProperties": false, + "required": [ + "call_type", + "upload_id" + ], + "properties": { + "call_type": { + "description": "Current call type, add this to your binary payload metadata", + "type": "number" + }, + "checksum": { + "description": "Hex encoded SHA-1 checksum of the file", + "type": "string" + }, + "document_issuing_country": { + "description": "2-letter country code", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "size": { + "description": "File size", + "type": "number" + }, + "status": { + "description": "Upload status (`success` or `failure`)", + "type": "string" + }, + "upload_id": { + "description": "Current upload ID, add this to your binary payload metadata", + "type": "number" + } + } }, - "checksum": { - "description": "Hex encoded SHA-1 checksum of the file", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "document_issuing_country": { - "description": "2-letter country code", - "type": "string", - "pattern": "^[a-z]{2}$" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "document_upload" + ] }, - "size": { - "description": "File size", - "type": "number" - }, - "status": { - "description": "Upload status (`success` or `failure`)", - "type": "string" - }, - "upload_id": { - "description": "Current upload ID, add this to your binary payload metadata", - "type": "number" + "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": ["document_upload"] - }, - "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/document_upload/send.json b/config/v3/document_upload/send.json index 29ecd2de..b7ddf748 100644 --- a/config/v3/document_upload/send.json +++ b/config/v3/document_upload/send.json @@ -1,130 +1,153 @@ { - "$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": "[Optional] 2-letter country code", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "document_type": { - "description": "Document type", - "type": "string", - "enum": [ - "passport", - "national_identity_card", - "driving_licence", - "utility_bill", - "bankstatement", - "power_of_attorney", - "amlglobalcheck", - "docverification", - "proofid", - "driverslicense", - "proofaddress", - "other", - "voter_card", - "student_card", - "nimc_slip", - "birth_certificate", - "pan_card", - "tax_photo_id", - "selfie_with_id", - "poi_others", - "insurance_bill", - "tax_receipt", - "phone_bill", - "poa_others", - "proof_of_ownership", - "tax_return", - "employment_contract", - "brokerage statement", - "payslip", - "edd_others", - "coi", - "business_poa", - "article_of_association", - "memorandum", - "authorisation_letter", - "declarations", - "business_documents_others" - ] - }, - "expected_checksum": { - "description": "The checksum of the file to be uploaded", - "type": "string", - "pattern": "^[[:xdigit:]]{32}" - }, - "expiration_date": { - "description": "[Optional] Document expiration date (required for Passport, Proof of ID and Driver's License)", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "file_size": { - "description": "Document size (should be less than 10MB)", - "type": "integer" - }, - "lifetime_valid": { - "description": "[Optional] Boolean value that indicates whether this document is lifetime valid (only applies to POI document types, cancels out the expiration_date given if any)", - "type": "integer", - "enum": [0, 1] - }, - "page_type": { - "description": "[Optional] To determine document side", - "type": "string", - "enum": ["front", "back", "photo"] - }, - "proof_of_ownership": { - "description": "[Optional] It contains info about the proof of ownership being uploaded (mandatory for proof_of_ownership document type)", - "type": "object", - "additionalProperties": false, - "required": ["details", "id"], - "properties": { - "details": { - "description": "A collection of unspecific information related to the proof of ownership being uploaded", - "type": "object", - "required": ["payment_identifier"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Document Upload (request)", + "description": "Request KYC information from client", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "document_upload", + "document_format", + "document_type", + "expected_checksum", + "file_size" + ], + "properties": { + "document_upload": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "id": { - "description": "The id of the proof of ownership as shown in the /get_account_status proof of ownership list", - "type": "number" + "document_format": { + "description": "Document file format", + "type": "string", + "enum": [ + "PNG", + "JPG", + "JPEG", + "GIF", + "PDF" + ] + }, + "document_id": { + "description": "[Optional] Document ID (required for Passport, Proof of ID and Driver's License)", + "type": "string", + "pattern": "^[\\w\\s-]{0,30}$" + }, + "document_issuing_country": { + "description": "2-letter country code, mandatory for POI only", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "document_type": { + "description": "Document type", + "type": "string", + "enum": [ + "passport", + "national_identity_card", + "driving_licence", + "utility_bill", + "bankstatement", + "power_of_attorney", + "amlglobalcheck", + "docverification", + "proofid", + "driverslicense", + "proofaddress", + "other", + "voter_card", + "student_card", + "nimc_slip", + "birth_certificate", + "pan_card", + "tax_photo_id", + "selfie_with_id", + "poi_others", + "insurance_bill", + "tax_receipt", + "phone_bill", + "poa_others", + "proof_of_ownership", + "tax_return", + "employment_contract", + "brokerage statement", + "payslip", + "edd_others", + "coi", + "business_poa", + "article_of_association", + "memorandum", + "authorisation_letter", + "declarations", + "business_documents_others" + ] + }, + "expected_checksum": { + "description": "The checksum of the file to be uploaded", + "type": "string", + "pattern": "^[[:xdigit:]]{32}" + }, + "expiration_date": { + "description": "[Optional] Document expiration date (required for Passport, Proof of ID and Driver's License)", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "file_size": { + "description": "Document size (should be less than 10MB)", + "type": "integer" + }, + "lifetime_valid": { + "description": "[Optional] Boolean value that indicates whether this document is lifetime valid (only applies to POI document types, cancels out the expiration_date given if any)", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "page_type": { + "description": "[Optional] To determine document side", + "type": "string", + "enum": [ + "front", + "back", + "photo" + ] + }, + "proof_of_ownership": { + "description": "[Optional] It contains info about the proof of ownership being uploaded (mandatory for proof_of_ownership document type)", + "type": "object", + "additionalProperties": false, + "required": [ + "details", + "id" + ], + "properties": { + "details": { + "description": "A collection of unspecific information related to the proof of ownership being uploaded", + "type": "object", + "required": [ + "payment_identifier" + ] + }, + "id": { + "description": "The id of the proof of ownership as shown in the /get_account_status proof of ownership list", + "type": "number" + } + } + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/economic_calendar/example.json b/config/v3/economic_calendar/example.json index 7f75217d..5e8aa061 100644 --- a/config/v3/economic_calendar/example.json +++ b/config/v3/economic_calendar/example.json @@ -1,6 +1,6 @@ { - "economic_calendar": 1, - "currency": "USD", - "end_date": 1561196696, - "start_date": 1561096696 + "economic_calendar": 1, + "currency": "USD", + "end_date": 1471996799, + "start_date": 1469491200 } diff --git a/config/v3/economic_calendar/receive.json b/config/v3/economic_calendar/receive.json index 195c30c5..9966a34e 100644 --- a/config/v3/economic_calendar/receive.json +++ b/config/v3/economic_calendar/receive.json @@ -1,92 +1,99 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Economic Calendar (response)", - "description": "A list of economic events.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "economic_calendar": { - "title": "economic_calendar", - "description": "Economic calendar.", - "type": "object", - "additionalProperties": false, - "properties": { - "events": { - "description": "Array of economic events", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Economic Calendar (response)", + "description": "A list of economic events.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "economic_calendar": { + "title": "economic_calendar", + "description": "Economic calendar.", "type": "object", "additionalProperties": false, "properties": { - "actual": { - "description": "Actual value.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_value": { - "description": "Actual value.", - "type": "string" - } + "events": { + "description": "Array of economic events", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "actual": { + "description": "Actual value.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_value": { + "description": "Actual value.", + "type": "string" + } + } + }, + "currency": { + "description": "Currency symbol.", + "type": "string" + }, + "event_name": { + "description": "Event name.", + "type": "string" + }, + "forecast": { + "description": "Forecasted value.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_value": { + "description": "Forecasted value.", + "type": "string" + } + } + }, + "impact": { + "description": "Impact.", + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "previous": { + "description": "Previous value.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_value": { + "description": "Previous value.", + "type": "string" + } + } + }, + "release_date": { + "description": "Release date.", + "type": "integer", + "examples": [ + 1441175849 + ] + } + } + } } - }, - "currency": { - "description": "Currency symbol.", - "type": "string" - }, - "event_name": { - "description": "Event name.", - "type": "string" - }, - "forecast": { - "description": "Forecasted value.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_value": { - "description": "Forecasted value.", - "type": "string" - } - } - }, - "impact": { - "description": "Impact.", - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "previous": { - "description": "Previous value.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_value": { - "description": "Previous value.", - "type": "string" - } - } - }, - "release_date": { - "description": "Release date.", - "type": "integer", - "examples": [1441175849] - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "economic_calendar" + ] + }, + "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": ["economic_calendar"] - }, - "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/economic_calendar/send.json b/config/v3/economic_calendar/send.json index 56052d16..718c1edf 100644 --- a/config/v3/economic_calendar/send.json +++ b/config/v3/economic_calendar/send.json @@ -1,41 +1,46 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Economic Calendar (request)", - "description": "Specify a currency to receive a list of events related to that specific currency. For example, specifying USD will return a list of USD-related events. If the currency is omitted, you will receive a list for all currencies.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["economic_calendar"], - "properties": { - "economic_calendar": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "currency": { - "description": "[Optional] Currency symbol.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "end_date": { - "description": "[Optional] End date.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "start_date": { - "description": "[Optional] Start date.", - "type": "integer", - "maximum": 9999999999, - "minimum": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/exchange_rates/example.json b/config/v3/exchange_rates/example.json index 92968f27..c3cf7843 100644 --- a/config/v3/exchange_rates/example.json +++ b/config/v3/exchange_rates/example.json @@ -1,4 +1,4 @@ { - "exchange_rates": 1, - "base_currency": "USD" + "exchange_rates": 1, + "base_currency": "USD" } diff --git a/config/v3/exchange_rates/receive.json b/config/v3/exchange_rates/receive.json index 3f93ad0e..fb469e2d 100644 --- a/config/v3/exchange_rates/receive.json +++ b/config/v3/exchange_rates/receive.json @@ -1,63 +1,72 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Exchange Rates (response)", - "description": "The exchange rate values from the specified base currency to all currencies supported by the system.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "exchange_rates": { - "title": "exchange_rates", - "description": "Exchange rate values from base to all other currencies", - "type": "object", - "additionalProperties": false, - "properties": { - "base_currency": { - "description": "Base currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date": { - "description": "Date retrieval epoch time represented as an integer number", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Exchange Rates (response)", + "description": "The exchange rate values from the specified base currency to all currencies supported by the system.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "exchange_rates": { + "title": "exchange_rates", + "description": "Exchange rate values from base to all other currencies", + "type": "object", + "additionalProperties": false, + "properties": { + "base_currency": { + "description": "Base currency", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date": { + "description": "Date retrieval epoch time represented as an integer number", + "type": "integer" + }, + "rates": { + "description": "Rates of exchanging a unit of base currency into the target currencies", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "The rate of exchanging a unit of the base currency into a target currency (represented by the key)", + "type": "number" + } + } + } + } }, - "rates": { - "description": "Rates of exchanging a unit of base currency into the target currencies", - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "The rate of exchanging a unit of the base currency into a target currency (represented by the key)", - "type": "number" + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + } } - } - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "exchange_rates" + ] + }, + "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": ["exchange_rates"] - }, - "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/exchange_rates/send.json b/config/v3/exchange_rates/send.json index 6483a7e1..a87af466 100644 --- a/config/v3/exchange_rates/send.json +++ b/config/v3/exchange_rates/send.json @@ -1,39 +1,47 @@ { - "$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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/forget/example.json b/config/v3/forget/example.json index 9cb3b465..cbdc43dd 100644 --- a/config/v3/forget/example.json +++ b/config/v3/forget/example.json @@ -1,3 +1,3 @@ { - "forget": "d1ee7d0d-3ca9-fbb4-720b-5312d487185b" + "forget": "d1ee7d0d-3ca9-fbb4-720b-5312d487185b" } diff --git a/config/v3/forget/receive.json b/config/v3/forget/receive.json index a66fcd21..6bf04936 100644 --- a/config/v3/forget/receive.json +++ b/config/v3/forget/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget (response)", - "description": "The result of forget request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "forget": { - "title": "forget", - "description": "If set to 1, stream exited and stopped. If set to 0, stream did not exist.", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["forget"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Forget (response)", + "description": "The result of forget request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "forget": { + "title": "forget", + "description": "If set to 1, stream exited and stopped. If set to 0, stream did not exist.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "forget" + ] + }, + "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/forget/send.json b/config/v3/forget/send.json index fb00f97e..213c5d25 100644 --- a/config/v3/forget/send.json +++ b/config/v3/forget/send.json @@ -1,24 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget (request)", - "description": "Immediately cancel the real-time stream of messages with a specific ID.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["forget"], - "properties": { - "forget": { - "description": "ID of the real-time stream of messages to cancel.", - "type": "string", - "pattern": "^[\\w-]{32,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/forget_all/example.json b/config/v3/forget_all/example.json index c14cd577..7894c26e 100644 --- a/config/v3/forget_all/example.json +++ b/config/v3/forget_all/example.json @@ -1,3 +1,3 @@ { - "forget_all": "ticks" + "forget_all": "ticks" } diff --git a/config/v3/forget_all/receive.json b/config/v3/forget_all/receive.json index 3608141f..d97a5653 100644 --- a/config/v3/forget_all/receive.json +++ b/config/v3/forget_all/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget All (response)", - "description": "The result of forget all request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "forget_all": { - "title": "forget_all", - "description": "IDs of the cancelled streams", - "type": "array" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["forget_all"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Forget All (response)", + "description": "The result of forget all request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "forget_all": { + "title": "forget_all", + "description": "IDs of the cancelled streams", + "type": "array" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "forget_all" + ] + }, + "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/forget_all/send.json b/config/v3/forget_all/send.json index a7060b3c..546dcfda 100644 --- a/config/v3/forget_all/send.json +++ b/config/v3/forget_all/send.json @@ -1,52 +1,56 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Forget All (request)", - "description": "Immediately cancel the real-time streams of messages of given type.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["forget_all"], - "properties": { - "forget_all": { - "description": "Cancel all streams by type. The value can be either a single type e.g. `\"ticks\"`, or an array of multiple types e.g. `[\"candles\", \"ticks\"]`.", - "oneOf": [ - { - "$ref": "#/definitions/stream_types" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Forget All (request)", + "description": "Immediately cancel the real-time streams of messages of given type.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "forget_all" + ], + "properties": { + "forget_all": { + "description": "Cancel all streams by type. The value can be either a single type e.g. `\"ticks\"`, or an array of multiple types e.g. `[\"candles\", \"ticks\"]`.", + "oneOf": [ + { + "$ref": "#/definitions/stream_types" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/stream_types" + } + } + ] }, - { - "type": "array", - "items": { - "$ref": "#/definitions/stream_types" - } + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "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", - "website_status" - ] + "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" + ] + } } - } } diff --git a/config/v3/get_account_status/example.json b/config/v3/get_account_status/example.json index 39ff488c..fa0b648c 100644 --- a/config/v3/get_account_status/example.json +++ b/config/v3/get_account_status/example.json @@ -1,3 +1,3 @@ { - "get_account_status": 1 + "get_account_status": 1 } diff --git a/config/v3/get_account_status/receive.json b/config/v3/get_account_status/receive.json index 35472c25..e3f4121a 100644 --- a/config/v3/get_account_status/receive.json +++ b/config/v3/get_account_status/receive.json @@ -1,365 +1,441 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Account Status (response)", - "description": "A message with Account Status", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "get_account_status": { - "title": "get_account_status", - "description": "Account status details", - "type": "object", - "additionalProperties": false, - "required": [ - "currency_config", - "p2p_status", - "prompt_client_to_authenticate", - "risk_classification", - "status" - ], - "properties": { - "authentication": { - "description": "This represents the authentication status of the user and it includes what authentication is needed.", - "type": "object", - "additionalProperties": false, - "required": ["needs_verification"], - "properties": { - "attempts": { - "description": "POI attempts made by the client", - "type": "object", - "additionalProperties": false, - "properties": { - "count": { - "description": "A number of POI attempts made by the client", - "type": "integer" - }, - "history": { - "description": "A list of POI attempts made by the client in chronological descending order", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account Status (response)", + "description": "A message with Account Status", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "get_account_status": { + "title": "get_account_status", + "description": "Account status details", + "type": "object", + "additionalProperties": false, + "required": [ + "currency_config", + "p2p_status", + "prompt_client_to_authenticate", + "risk_classification", + "status" + ], + "properties": { + "authentication": { + "description": "This represents the authentication status of the user and it includes what authentication is needed.", "type": "object", "additionalProperties": false, + "required": [ + "needs_verification" + ], "properties": { - "country_code": { - "description": "2-letter country code used to request the attempt.", - "type": "string" - }, - "id": { - "description": "The id of the attempt.", - "type": "string" - }, - "service": { - "description": "The service used to make the verification.", - "type": "string" - }, - "status": { - "description": "Status of the attempt.", - "type": "string", - "enum": ["verified", "rejected", "pending", "expired", "none"] - }, - "timestamp": { - "description": "The epoch of the attempt.", - "type": "integer" - } - } - } - }, - "latest": { - "description": "The latest POI attempt made by the client", - "type": ["null", "object"] - } - } - }, - "document": { - "description": "The authentication status for document.", - "type": "object", - "additionalProperties": false, - "properties": { - "expiry_date": { - "description": "This is the epoch of the document expiry date.", - "type": "integer" - }, - "status": { - "description": "This represents the current status of the proof of address document submitted for authentication.", - "type": "string", - "enum": ["none", "pending", "rejected", "verified", "expired", "suspected"] - } - } - }, - "identity": { - "description": "The authentication status for identity.", - "type": "object", - "additionalProperties": false, - "properties": { - "expiry_date": { - "description": "This is the epoch of the document expiry date.", - "type": "integer" - }, - "services": { - "description": "This shows the information about the authentication services implemented", - "type": "object", - "additionalProperties": false, - "properties": { - "idv": { - "description": "This shows the information related to IDV supported services", - "type": "object", - "additionalProperties": false, - "properties": { - "expiry_date": { - "description": "This is the epoch of the document expiry date.", - "type": "integer" - }, - "last_rejected": { - "description": "Show the last IDV reported reasons for the rejected cases", - "type": "array", - "items": { - "type": "string" - } + "attempts": { + "description": "POI attempts made by the client", + "type": "object", + "additionalProperties": false, + "properties": { + "count": { + "description": "A number of POI attempts made by the client", + "type": "integer" + }, + "history": { + "description": "A list of POI attempts made by the client in chronological descending order", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "country_code": { + "description": "2-letter country code used to request the attempt.", + "type": "string" + }, + "document_type": { + "description": "The document type of the attempt.", + "type": "string" + }, + "id": { + "description": "The id of the attempt.", + "type": "string" + }, + "service": { + "description": "The service used to make the verification.", + "type": "string" + }, + "status": { + "description": "Status of the attempt.", + "type": "string", + "enum": [ + "verified", + "rejected", + "pending", + "expired", + "none" + ] + }, + "timestamp": { + "description": "The epoch of the attempt.", + "type": "integer" + } + } + } + }, + "latest": { + "description": "The latest POI attempt made by the client", + "type": [ + "null", + "object" + ] + } + } }, - "reported_properties": { - "description": "Shows the latest document properties detected and reported by IDVS", - "type": "object" + "document": { + "description": "The authentication status for document.", + "type": "object", + "additionalProperties": false, + "properties": { + "expiry_date": { + "description": "This is the epoch of the document expiry date.", + "type": "integer" + }, + "status": { + "description": "This represents the current status of the proof of address document submitted for authentication.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired", + "suspected" + ] + } + } }, - "status": { - "description": "This represents the status of the latest IDV check.", - "type": "string", - "enum": ["none", "pending", "rejected", "verified", "expired"] + "identity": { + "description": "The authentication status for identity.", + "type": "object", + "additionalProperties": false, + "properties": { + "expiry_date": { + "description": "This is the epoch of the document expiry date.", + "type": "integer" + }, + "services": { + "description": "This shows the information about the authentication services implemented", + "type": "object", + "additionalProperties": false, + "properties": { + "idv": { + "description": "This shows the information related to IDV supported services", + "type": "object", + "additionalProperties": false, + "properties": { + "expiry_date": { + "description": "This is the epoch of the document expiry date.", + "type": "integer" + }, + "last_rejected": { + "description": "Show the last IDV reported reasons for the rejected cases", + "type": "array", + "items": { + "type": "string" + } + }, + "reported_properties": { + "description": "Shows the latest document properties detected and reported by IDVS", + "type": "object" + }, + "status": { + "description": "This represents the status of the latest IDV check.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired" + ] + }, + "submissions_left": { + "description": "This shows the number of IDV submissions left for the client", + "type": "integer" + } + } + }, + "manual": { + "description": "This shows the information related to the manual POI checks", + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "description": "This represents the status of the current manual POI check.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired", + "suspected" + ] + } + } + }, + "onfido": { + "description": "This shows the information related to Onfido supported services", + "type": "object", + "additionalProperties": false, + "properties": { + "country_code": { + "description": "3 letter country code for Onfide SDK", + "type": "string", + "pattern": "^[A-Z]{3}$" + }, + "documents": { + "description": "This shows the list of documents types supported by Onfido", + "type": "array", + "items": { + "type": "string", + "examples": [ + "Driving Licence", + "National Identity Card", + "Passport" + ] + } + }, + "documents_supported": { + "description": "This shows the list of documents types supported.", + "type": "array", + "items": { + "type": "string" + } + }, + "is_country_supported": { + "description": "This shows the information if the country is supported by Onfido", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "last_rejected": { + "description": "Show the last Onfido reported reasons for the rejected cases", + "type": "array", + "items": { + "type": "string" + } + }, + "reported_properties": { + "description": "Shows the latest document properties detected and reported by Onfido", + "type": "object" + }, + "status": { + "description": "This represents the status of the latest Onfido check.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired", + "suspected" + ] + }, + "submissions_left": { + "description": "This shows the number of Onfido submissions left for the client", + "type": "integer" + } + } + } + } + }, + "status": { + "description": "This represent the current status for proof of identity document submitted for authentication.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired", + "suspected" + ] + } + } }, - "submissions_left": { - "description": "This shows the number of IDV submissions left for the client", - "type": "integer" - } - } - }, - "manual": { - "description": "This shows the information related to the manual POI checks", - "type": "object", - "additionalProperties": false, - "properties": { - "status": { - "description": "This represents the status of the current manual POI check.", - "type": "string", - "enum": [ - "none", - "pending", - "rejected", - "verified", - "expired", - "suspected" - ] - } - } - }, - "onfido": { - "description": "This shows the information related to Onfido supported services", - "type": "object", - "additionalProperties": false, - "properties": { - "country_code": { - "description": "3 letter country code for Onfide SDK", - "type": "string", - "pattern": "^[A-Z]{3}$" - }, - "documents": { - "description": "This shows the list of documents types supported by Onfido", - "type": "array", - "items": { - "type": "string", - "examples": ["Driving Licence", "National Identity Card", "Passport"] - } - }, - "documents_supported": { - "description": "This shows the list of documents types supported.", - "type": "array", - "items": { - "type": "string" - } - }, - "is_country_supported": { - "description": "This shows the information if the country is supported by Onfido", - "type": "integer", - "enum": [1, 0] - }, - "last_rejected": { - "description": "Show the last Onfido reported reasons for the rejected cases", - "type": "array", - "items": { - "type": "string" - } + "income": { + "description": "The authentication status for source of income document.", + "type": "object", + "additionalProperties": false, + "properties": { + "expiry_date": { + "description": "Epoch of the source of income document expiry date.", + "type": "integer" + }, + "status": { + "description": "Current status of the proof of income document submitted for authentication.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "locked" + ] + } + } }, - "reported_properties": { - "description": "Shows the latest document properties detected and reported by Onfido", - "type": "object" + "needs_verification": { + "description": "An array containing the list of required authentication.", + "type": "array", + "items": { + "description": "This represents the current type of authentication required, possible values are identity, document, income, and ownership.", + "type": "string" + } }, - "status": { - "description": "This represents the status of the latest Onfido check.", - "type": "string", - "enum": [ - "none", - "pending", - "rejected", - "verified", - "expired", - "suspected" - ] - }, - "submissions_left": { - "description": "This shows the number of Onfido submissions left for the client", - "type": "integer" + "ownership": { + "description": "The current state of the proof of ownership.", + "type": "object", + "additionalProperties": false, + "properties": { + "requests": { + "description": "The list of proof of ownership requests to fullfil", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "creation_time": { + "description": "The request timestamp of creation", + "type": "string" + }, + "documents_required": { + "description": "Number of documents required to be uploaded for proof of ownership", + "type": "number" + }, + "id": { + "description": "The identifier of the proof of ownership request", + "type": "number" + }, + "payment_method": { + "description": "The display name of the payment method being requested", + "type": "string" + } + } + } + }, + "status": { + "description": "This represents the current status of the proof of ownership", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified" + ] + } + } } - } } - } - }, - "status": { - "description": "This represent the current status for proof of identity document submitted for authentication.", - "type": "string", - "enum": ["none", "pending", "rejected", "verified", "expired", "suspected"] - } - } - }, - "income": { - "description": "The authentication status for source of income document.", - "type": "object", - "additionalProperties": false, - "properties": { - "expiry_date": { - "description": "Epoch of the source of income document expiry date.", - "type": "integer" }, - "status": { - "description": "Current status of the proof of income document submitted for authentication.", - "type": "string", - "enum": ["none", "pending", "rejected", "verified", "locked"] - } - } - }, - "needs_verification": { - "description": "An array containing the list of required authentication.", - "type": "array", - "items": { - "description": "This represents the current type of authentication required, possible values are identity, document, income, and ownership.", - "type": "string" - } - }, - "ownership": { - "description": "The current state of the proof of ownership.", - "type": "object", - "additionalProperties": false, - "properties": { - "requests": { - "description": "The list of proof of ownership requests to fullfil", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "creation_time": { - "description": "The request timestamp of creation", + "cashier_missing_fields": { + "description": "Contains missing profile fields required for cashier access.", + "type": "array", + "items": { "type": "string" - }, - "documents_required": { - "description": "Number of documents required to be uploaded for proof of ownership", - "type": "number" - }, - "id": { - "description": "The identifier of the proof of ownership request", - "type": "number" - }, - "payment_method": { - "description": "The display name of the payment method being requested", + } + }, + "cashier_validation": { + "description": "If the cashier is unavailble, this array contains one or more error codes for each reason.", + "type": "array", + "items": { "type": "string" - } } - } }, - "status": { - "description": "This represents the current status of the proof of ownership", - "type": "string", - "enum": ["none", "pending", "rejected", "verified"] - } - } - } - } - }, - "cashier_missing_fields": { - "description": "Contains missing profile fields required for cashier access.", - "type": "array", - "items": { - "type": "string" - } - }, - "cashier_validation": { - "description": "If the cashier is unavailble, this array contains one or more error codes for each reason.", - "type": "array", - "items": { - "type": "string" - } - }, - "currency_config": { - "description": "Provides cashier details for client currency.", - "type": "object", - "minProperties": 0, - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Client currency", - "type": "object", - "additionalProperties": false, - "properties": { - "is_deposit_suspended": { - "description": "Deposit is allowed for currency or not", - "type": "integer", - "enum": [0, 1] + "currency_config": { + "description": "Provides cashier details for client currency.", + "type": "object", + "minProperties": 0, + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Client currency", + "type": "object", + "additionalProperties": false, + "properties": { + "is_deposit_suspended": { + "description": "Deposit is allowed for currency or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_withdrawal_suspended": { + "description": "Withdrawal is allowed for currency or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } + } + }, + "p2p_status": { + "description": "Current P2P status of client.", + "type": "string", + "enum": [ + "none", + "active", + "temp_ban", + "perm_ban" + ] + }, + "prompt_client_to_authenticate": { + "description": "Indicates whether the client should be prompted to authenticate their account.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "risk_classification": { + "description": "Client risk classification: `low`, `standard`, `high`.", + "type": "string" + }, + "social_identity_provider": { + "description": "Social identity provider a user signed up with.", + "type": "string", + "enum": [ + "google", + "facebook", + "apple" + ] }, - "is_withdrawal_suspended": { - "description": "Withdrawal is allowed for currency or not", - "type": "integer", - "enum": [0, 1] + "status": { + "description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified. \n- `authenticated_with_idv_photoid`: the client has been fully authenticated by IDV. \n- `idv_revoked`: the client used to be fully authenticated by IDV but it was taken away due to compliance criteria. \n- `mt5_additional_kyc_required`: client tax information, place of birth and account opening reason is missing", + "type": "array", + "items": { + "type": "string" + } } - } } - } - }, - "p2p_status": { - "description": "Current P2P status of client.", - "type": "string", - "enum": ["none", "active", "temp_ban", "perm_ban"] - }, - "prompt_client_to_authenticate": { - "description": "Indicates whether the client should be prompted to authenticate their account.", - "type": "integer", - "enum": [1, 0] }, - "risk_classification": { - "description": "Client risk classification: `low`, `standard`, `high`.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "social_identity_provider": { - "description": "Social identity provider a user signed up with.", - "type": "string", - "enum": ["google", "facebook", "apple"] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "get_account_status" + ] }, - "status": { - "description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified.", - "type": "array", - "items": { - "type": "string" - } + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["get_account_status"] - }, - "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/get_account_status/send.json b/config/v3/get_account_status/send.json index 80b16843..6e7daaa4 100644 --- a/config/v3/get_account_status/send.json +++ b/config/v3/get_account_status/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_financial_assessment/example.json b/config/v3/get_financial_assessment/example.json index 9d2c4a98..0632c0f9 100644 --- a/config/v3/get_financial_assessment/example.json +++ b/config/v3/get_financial_assessment/example.json @@ -1,3 +1,3 @@ { - "get_financial_assessment": 1 + "get_financial_assessment": 1 } diff --git a/config/v3/get_financial_assessment/receive.json b/config/v3/get_financial_assessment/receive.json index 8b812f1f..3dccdd9e 100644 --- a/config/v3/get_financial_assessment/receive.json +++ b/config/v3/get_financial_assessment/receive.json @@ -1,186 +1,191 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Financial Assessment (response)", - "description": "This call gets the financial assessment details of client's account.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "get_financial_assessment": { - "title": "get_financial_assessment", - "description": "Client's financial assessment details", - "type": "object", - "additionalProperties": false, - "properties": { - "account_turnover": { - "description": "The anticipated account turnover", - "type": "string" - }, - "binary_options_trading_experience": { - "description": "Binary options trading experience", - "type": "string" - }, - "binary_options_trading_frequency": { - "description": "Binary options trading frequency", - "type": "string" - }, - "cfd_experience": { - "description": "How much experience do you have in CFD trading?", - "type": "string" - }, - "cfd_frequency": { - "description": "How many CFD trades have you placed in the past 12 months?", - "type": "string" - }, - "cfd_score": { - "description": "CFD Score", - "type": "integer" - }, - "cfd_trading_definition": { - "description": "In your understanding, CFD trading allows you to:", - "type": "string" - }, - "cfd_trading_experience": { - "description": "CFDs trading experience", - "type": "string" - }, - "cfd_trading_frequency": { - "description": "CFDs trading frequency", - "type": "string" - }, - "commodities_trading_experience": { - "description": "Commodities trading experience", - "type": "string" - }, - "commodities_trading_frequency": { - "description": "Commodities trading frequency", - "type": "string" - }, - "education_level": { - "description": "Level of Education", - "type": "string" - }, - "employment_industry": { - "description": "Industry of Employment", - "type": "string" - }, - "employment_status": { - "description": "Employment Status", - "type": "string" - }, - "estimated_worth": { - "description": "Estimated Net Worth", - "type": "string" - }, - "financial_information_score": { - "description": "Financial Information Score", - "type": "integer" - }, - "forex_trading_experience": { - "description": "Forex trading experience", - "type": "string" - }, - "forex_trading_frequency": { - "description": "Forex trading frequency", - "type": "string" - }, - "income_source": { - "description": "Income Source", - "type": "string" - }, - "indices_trading_experience": { - "description": "Indices trading experience", - "type": "string" - }, - "indices_trading_frequency": { - "description": "Indices trading frequency", - "type": "string" - }, - "leverage_impact_trading": { - "description": "How does leverage affect CFD trading?", - "type": "string" - }, - "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" - }, - "net_income": { - "description": "Net Annual Income", - "type": "string" - }, - "occupation": { - "description": "Occupation", - "type": "string" - }, - "other_derivatives_trading_experience": { - "description": "Trading experience in other financial derivatives", - "type": "string" - }, - "other_derivatives_trading_frequency": { - "description": "Trading frequency in other financial derivatives", - "type": "string" - }, - "other_instruments_trading_experience": { - "description": "Trading experience in other financial instruments", - "type": "string" - }, - "other_instruments_trading_frequency": { - "description": "Trading frequency in other financial instruments", - "type": "string" - }, - "required_initial_margin": { - "description": "When would you be required to pay an initial margin?", - "type": "string" - }, - "risk_tolerance": { - "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", - "type": "string" - }, - "source_of_experience": { - "description": "How much knowledge and experience do you have in relation to online trading?", - "type": "string" - }, - "source_of_wealth": { - "description": "Source of wealth", - "type": "string" - }, - "stocks_trading_experience": { - "description": "Stocks trading experience", - "type": "string" - }, - "stocks_trading_frequency": { - "description": "Stocks trading frequency", - "type": "string" - }, - "total_score": { - "description": "Total Score", - "type": "integer" - }, - "trading_experience_financial_instruments": { - "description": "How much experience do you have with other financial instruments?", - "type": "string" - }, - "trading_frequency_financial_instruments": { - "description": "How many trades have you placed with other financial instruments in the past 12 months?", - "type": "string" - }, - "trading_score": { - "description": "Trading Experience Score", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Financial Assessment (response)", + "description": "This call gets the financial assessment details of client's account.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "get_financial_assessment": { + "title": "get_financial_assessment", + "description": "Client's financial assessment details", + "type": "object", + "additionalProperties": false, + "properties": { + "account_turnover": { + "description": "The anticipated account turnover", + "type": "string" + }, + "binary_options_trading_experience": { + "description": "Binary options trading experience", + "type": "string" + }, + "binary_options_trading_frequency": { + "description": "Binary options trading frequency", + "type": "string" + }, + "cfd_experience": { + "description": "How much experience do you have in CFD trading?", + "type": "string" + }, + "cfd_frequency": { + "description": "How many CFD trades have you placed in the past 12 months?", + "type": "string" + }, + "cfd_score": { + "description": "CFD Score", + "type": "integer" + }, + "cfd_trading_definition": { + "description": "In your understanding, CFD trading allows you to:", + "type": "string" + }, + "cfd_trading_experience": { + "description": "CFDs trading experience", + "type": "string" + }, + "cfd_trading_frequency": { + "description": "CFDs trading frequency", + "type": "string" + }, + "commodities_trading_experience": { + "description": "Commodities trading experience", + "type": "string" + }, + "commodities_trading_frequency": { + "description": "Commodities trading frequency", + "type": "string" + }, + "education_level": { + "description": "Level of Education", + "type": "string" + }, + "employment_industry": { + "description": "Industry of Employment", + "type": "string" + }, + "employment_status": { + "description": "Employment Status", + "type": "string" + }, + "estimated_worth": { + "description": "Estimated Net Worth", + "type": "string" + }, + "financial_information_score": { + "description": "Financial Information Score", + "type": "integer" + }, + "forex_trading_experience": { + "description": "Forex trading experience", + "type": "string" + }, + "forex_trading_frequency": { + "description": "Forex trading frequency", + "type": "string" + }, + "income_source": { + "description": "Income Source", + "type": "string" + }, + "indices_trading_experience": { + "description": "Indices trading experience", + "type": "string" + }, + "indices_trading_frequency": { + "description": "Indices trading frequency", + "type": "string" + }, + "leverage_impact_trading": { + "description": "How does leverage affect CFD trading?", + "type": "string" + }, + "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" + }, + "net_income": { + "description": "Net Annual Income", + "type": "string" + }, + "occupation": { + "description": "Occupation", + "type": "string" + }, + "other_derivatives_trading_experience": { + "description": "Trading experience in other financial derivatives", + "type": "string" + }, + "other_derivatives_trading_frequency": { + "description": "Trading frequency in other financial derivatives", + "type": "string" + }, + "other_instruments_trading_experience": { + "description": "Trading experience in other financial instruments", + "type": "string" + }, + "other_instruments_trading_frequency": { + "description": "Trading frequency in other financial instruments", + "type": "string" + }, + "required_initial_margin": { + "description": "When would you be required to pay an initial margin?", + "type": "string" + }, + "risk_tolerance": { + "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", + "type": "string" + }, + "source_of_experience": { + "description": "How much knowledge and experience do you have in relation to online trading?", + "type": "string" + }, + "source_of_wealth": { + "description": "Source of wealth", + "type": "string" + }, + "stocks_trading_experience": { + "description": "Stocks trading experience", + "type": "string" + }, + "stocks_trading_frequency": { + "description": "Stocks trading frequency", + "type": "string" + }, + "total_score": { + "description": "Total Score", + "type": "integer" + }, + "trading_experience_financial_instruments": { + "description": "How much experience do you have with other financial instruments?", + "type": "string" + }, + "trading_frequency_financial_instruments": { + "description": "How many trades have you placed with other financial instruments in the past 12 months?", + "type": "string" + }, + "trading_score": { + "description": "Trading Experience Score", + "type": "integer" + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "get_financial_assessment" + ] + }, + "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": ["get_financial_assessment"] - }, - "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/get_financial_assessment/send.json b/config/v3/get_financial_assessment/send.json index 91a1191c..dd187f6c 100644 --- a/config/v3/get_financial_assessment/send.json +++ b/config/v3/get_financial_assessment/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_limits/example.json b/config/v3/get_limits/example.json index 2dddc073..a5acbd9d 100644 --- a/config/v3/get_limits/example.json +++ b/config/v3/get_limits/example.json @@ -1,3 +1,3 @@ { - "get_limits": 1 + "get_limits": 1 } diff --git a/config/v3/get_limits/receive.json b/config/v3/get_limits/receive.json index f70b6b53..4c9c0ab0 100644 --- a/config/v3/get_limits/receive.json +++ b/config/v3/get_limits/receive.json @@ -1,140 +1,158 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Account Limits (response)", - "description": "Trading and Withdrawal Limits", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "get_limits": { - "title": "get_limits", - "description": "Trading limits of real account user", - "type": "object", - "additionalProperties": false, - "properties": { - "account_balance": { - "description": "Maximum account cash balance", - "type": ["null", "number"] - }, - "daily_transfers": { - "description": "Daily transfers", - "type": "object" - }, - "daily_turnover": { - "description": "Maximum daily turnover", - "type": "number" - }, - "lifetime_limit": { - "description": "Lifetime withdrawal limit", - "type": "number" - }, - "market_specific": { - "description": "Contains limitation information for each market.", - "type": "object", - "patternProperties": { - "^(commodities|forex|indices|synthetic_index)$": { - "description": "List of limitation profiles for each market", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "level": { - "description": "The group the profile belong to.", - "type": "string" - }, - "name": { - "description": "The market or submarket display name.", - "type": "string" - }, - "payout_limit": { - "description": "The limit of payout for the submarket", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Account Limits (response)", + "description": "Trading and Withdrawal Limits", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "get_limits": { + "title": "get_limits", + "description": "Trading limits of real account user", + "type": "object", + "additionalProperties": false, + "properties": { + "account_balance": { + "description": "Maximum account cash balance", + "type": [ + "null", + "number" + ] + }, + "daily_cumulative_amount_transfers": { + "description": "Cumulative daily transfer limits", + "type": "object" + }, + "daily_transfers": { + "description": "Daily transfers", + "type": "object" + }, + "daily_turnover": { + "description": "Maximum daily turnover", "type": "number" - }, - "profile_name": { - "description": "The limitation profile name.", - "type": "string" - }, - "turnover_limit": { - "description": "The limit of turnover for the submarket", + }, + "lifetime_limit": { + "description": "Lifetime withdrawal limit", "type": "number" - } - } - } - } - } - }, - "num_of_days": { - "description": "Number of days for num_of_days_limit withdrawal limit", - "type": "integer" - }, - "num_of_days_limit": { - "description": "Withdrawal limit for num_of_days days", - "type": "number" - }, - "open_positions": { - "description": "Maximum number of open positions", - "type": "integer" - }, - "payout": { - "description": "Maximum aggregate payouts on open positions", - "type": "number" - }, - "payout_per_symbol": { - "description": "Maximum payout for each symbol based on different barrier types.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "atm": { - "description": "Maximum aggregate payouts on open positions per symbol for contracts where barrier is same as entry spot.", - "type": ["null", "number"] - }, - "non_atm": { - "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot.", - "type": "object", - "additionalProperties": false, - "properties": { - "less_than_seven_days": { - "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot and duration is less than and equal to seven days", - "type": "number" }, - "more_than_seven_days": { - "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot and duration is more to seven days", - "type": "number" + "market_specific": { + "description": "Contains limitation information for each market.", + "type": "object", + "patternProperties": { + "^(commodities|forex|indices|synthetic_index)$": { + "description": "List of limitation profiles for each market", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "level": { + "description": "The group the profile belong to.", + "type": "string" + }, + "name": { + "description": "The market or submarket display name.", + "type": "string" + }, + "payout_limit": { + "description": "The limit of payout for the submarket", + "type": "number" + }, + "profile_name": { + "description": "The limitation profile name.", + "type": "string" + }, + "turnover_limit": { + "description": "The limit of turnover for the submarket", + "type": "number" + } + } + } + } + } + }, + "num_of_days": { + "description": "Number of days for num_of_days_limit withdrawal limit", + "type": "integer" + }, + "num_of_days_limit": { + "description": "Withdrawal limit for num_of_days days", + "type": "number" + }, + "open_positions": { + "description": "Maximum number of open positions", + "type": "integer" + }, + "payout": { + "description": "Maximum aggregate payouts on open positions", + "type": "number" + }, + "payout_per_symbol": { + "description": "Maximum payout for each symbol based on different barrier types.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "atm": { + "description": "Maximum aggregate payouts on open positions per symbol for contracts where barrier is same as entry spot.", + "type": [ + "null", + "number" + ] + }, + "non_atm": { + "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot.", + "type": "object", + "additionalProperties": false, + "properties": { + "less_than_seven_days": { + "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot and duration is less than and equal to seven days", + "type": "number" + }, + "more_than_seven_days": { + "description": "Maximum aggregate payouts on open positions per symbol for contract where barrier is different from entry spot and duration is more to seven days", + "type": "number" + } + } + } + } + }, + "payout_per_symbol_and_contract_type": { + "description": "Maximum aggregate payouts on open positions per symbol and contract type. This limit can be exceeded up to the overall payout limit if there is no prior open position.", + "type": "number" + }, + "remainder": { + "description": "Amount left to reach withdrawal limit", + "type": "number" + }, + "withdrawal_for_x_days_monetary": { + "description": "Total withdrawal for num_of_days days", + "type": "number" + }, + "withdrawal_since_inception_monetary": { + "description": "Total withdrawal since inception", + "type": "number" } - } } - } - }, - "payout_per_symbol_and_contract_type": { - "description": "Maximum aggregate payouts on open positions per symbol and contract type. This limit can be exceeded up to the overall payout limit if there is no prior open position.", - "type": "number" }, - "remainder": { - "description": "Amount left to reach withdrawal limit", - "type": "number" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "withdrawal_for_x_days_monetary": { - "description": "Total withdrawal for num_of_days days", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "get_limits" + ] }, - "withdrawal_since_inception_monetary": { - "description": "Total withdrawal since inception", - "type": "number" + "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": ["get_limits"] - }, - "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/get_limits/send.json b/config/v3/get_limits/send.json index 3c4d004a..709e8436 100644 --- a/config/v3/get_limits/send.json +++ b/config/v3/get_limits/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_self_exclusion/example.json b/config/v3/get_self_exclusion/example.json index c353dce2..0f6444ea 100644 --- a/config/v3/get_self_exclusion/example.json +++ b/config/v3/get_self_exclusion/example.json @@ -1,3 +1,3 @@ { - "get_self_exclusion": 1 + "get_self_exclusion": 1 } diff --git a/config/v3/get_self_exclusion/receive.json b/config/v3/get_self_exclusion/receive.json index 10b6aef7..a23f8f86 100644 --- a/config/v3/get_self_exclusion/receive.json +++ b/config/v3/get_self_exclusion/receive.json @@ -1,86 +1,91 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Self-Exclusion (response)", - "description": "A message with User Self-Exclusion", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "get_self_exclusion": { - "title": "get_self_exclusion", - "description": "List of values set for self exclusion.", - "type": "object", - "additionalProperties": false, - "properties": { - "exclude_until": { - "description": "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": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Self-Exclusion (response)", + "description": "A message with User Self-Exclusion", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "get_self_exclusion": { + "title": "get_self_exclusion", + "description": "List of values set for self exclusion.", + "type": "object", + "additionalProperties": false, + "properties": { + "exclude_until": { + "description": "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": "string" + }, + "max_30day_deposit": { + "description": "30-day limit on deposits", + "type": "number" + }, + "max_30day_losses": { + "description": "30-day limit on losses", + "type": "number" + }, + "max_30day_turnover": { + "description": "30-day turnover limit", + "type": "number" + }, + "max_7day_deposit": { + "description": "7-day limit on deposits", + "type": "number" + }, + "max_7day_losses": { + "description": "7-day limit on losses", + "type": "number" + }, + "max_7day_turnover": { + "description": "7-day turnover limit", + "type": "number" + }, + "max_balance": { + "description": "Maximum account cash balance", + "type": "number" + }, + "max_deposit": { + "description": "Daily limit on deposits", + "type": "number" + }, + "max_losses": { + "description": "Daily limit on losses", + "type": "number" + }, + "max_open_bets": { + "description": "Maximum number of open positions", + "type": "integer" + }, + "max_turnover": { + "description": "Daily turnover limit", + "type": "number" + }, + "session_duration_limit": { + "description": "Session duration limit, in minutes", + "type": "integer" + }, + "timeout_until": { + "description": "Exclude me from the website (for up to 6 weeks). The time is in epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted automatically at the expiry of the timeout period.", + "type": "integer" + } + } }, - "max_30day_deposit": { - "description": "30-day limit on deposits", - "type": "number" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "max_30day_losses": { - "description": "30-day limit on losses", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "get_self_exclusion" + ] }, - "max_30day_turnover": { - "description": "30-day turnover limit", - "type": "number" - }, - "max_7day_deposit": { - "description": "7-day limit on deposits", - "type": "number" - }, - "max_7day_losses": { - "description": "7-day limit on losses", - "type": "number" - }, - "max_7day_turnover": { - "description": "7-day turnover limit", - "type": "number" - }, - "max_balance": { - "description": "Maximum account cash balance", - "type": "number" - }, - "max_deposit": { - "description": "Daily limit on deposits", - "type": "number" - }, - "max_losses": { - "description": "Daily limit on losses", - "type": "number" - }, - "max_open_bets": { - "description": "Maximum number of open positions", - "type": "integer" - }, - "max_turnover": { - "description": "Daily turnover limit", - "type": "number" - }, - "session_duration_limit": { - "description": "Session duration limit, in minutes", - "type": "integer" - }, - "timeout_until": { - "description": "Exclude me from the website (for up to 6 weeks). The time is in epoch format. Note: unlike `exclude_until`, this self-exclusion will be lifted automatically at the expiry of the timeout period.", - "type": "integer" + "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": ["get_self_exclusion"] - }, - "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/get_self_exclusion/send.json b/config/v3/get_self_exclusion/send.json index b64ff6f6..d25724a7 100644 --- a/config/v3/get_self_exclusion/send.json +++ b/config/v3/get_self_exclusion/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/get_settings/example.json b/config/v3/get_settings/example.json index f843b342..e7e17079 100644 --- a/config/v3/get_settings/example.json +++ b/config/v3/get_settings/example.json @@ -1,3 +1,3 @@ { - "get_settings": 1 + "get_settings": 1 } diff --git a/config/v3/get_settings/receive.json b/config/v3/get_settings/receive.json index a0e7d5be..315f1a63 100644 --- a/config/v3/get_settings/receive.json +++ b/config/v3/get_settings/receive.json @@ -1,191 +1,265 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Account Settings (response)", - "description": "A message with User Settings", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "get_settings": { - "title": "get_settings", - "description": "User information and settings.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_opening_reason": { - "description": "Purpose and reason for requesting the account opening. Only applicable for real money account.", - "type": ["null", "string"] - }, - "address_city": { - "description": "City (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_line_1": { - "description": "Address line 1 (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_line_2": { - "description": "Address line 2 (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_postcode": { - "description": "Post Code (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_state": { - "description": "State (note: Only available for users who have at least one real account)", - "type": "string" - }, - "allow_copiers": { - "description": "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": "Country of legal citizenship, 2-letter country code.", - "type": "string" - }, - "client_tnc_status": { - "description": "Latest terms and conditions version accepted by client", - "type": ["null", "string"] - }, - "cooling_off_expiration_date": { - "description": "Cooldown expiration epoch date when a client fails appropriateness tests", - "type": ["integer", "null"] - }, - "country": { - "description": "User Country (same as residence field) - deprecated", - "type": ["null", "string"] - }, - "country_code": { - "description": "2-letter country code ISO standard", - "type": ["null", "string"], - "pattern": "^[a-z]{0,2}$" - }, - "date_of_birth": { - "description": "Epoch of user's birthday (note: Only available for users who have at least one real account)", - "type": ["integer", "null"] - }, - "dxtrade_user_exception": { - "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", - "type": "integer", - "enum": [0, 1] - }, - "email": { - "description": "User Email", - "type": "string", - "sensitive": 1 - }, - "email_consent": { - "description": "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": "Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "feature_flag": { - "description": "Contains features that are enabled or disabled for this user", - "type": "object", - "additionalProperties": false, - "properties": { - "wallet": { - "description": "Boolean value 1 or 0 indicating whether his feature this enabled or not", - "type": "integer", - "enum": [0, 1] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Account Settings (response)", + "description": "A message with User Settings", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "get_settings": { + "title": "get_settings", + "description": "User information and settings.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_opening_reason": { + "description": "Purpose and reason for requesting the account opening. Only applicable for real money account.", + "type": [ + "null", + "string" + ] + }, + "address_city": { + "description": "City (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_line_1": { + "description": "Address line 1 (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_line_2": { + "description": "Address line 2 (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_postcode": { + "description": "Post Code (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_state": { + "description": "State (note: Only available for users who have at least one real account)", + "type": "string" + }, + "allow_copiers": { + "description": "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": "Country of legal citizenship, 2-letter country code.", + "type": "string" + }, + "client_tnc_status": { + "description": "Latest terms and conditions version accepted by client", + "type": [ + "null", + "string" + ] + }, + "cooling_off_expiration_date": { + "description": "Cooldown expiration epoch date when a client fails appropriateness tests", + "type": [ + "integer", + "null" + ] + }, + "country": { + "description": "User Country (same as residence field) - deprecated", + "type": [ + "null", + "string" + ] + }, + "country_code": { + "description": "2-letter country code ISO standard", + "type": [ + "null", + "string" + ], + "pattern": "^[a-z]{0,2}$" + }, + "date_of_birth": { + "description": "Epoch of user's birthday (note: Only available for users who have at least one real account)", + "type": [ + "integer", + "null" + ] + }, + "dxtrade_user_exception": { + "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "email": { + "description": "User Email", + "type": "string", + "sensitive": 1 + }, + "email_consent": { + "description": "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": "Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "feature_flag": { + "description": "Contains features that are enabled or disabled for this user", + "type": "object", + "additionalProperties": false, + "properties": { + "wallet": { + "description": "Boolean value 1 or 0 indicating whether his feature this enabled or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + }, + "first_name": { + "description": "First name (note: Only available for users who have at least one real account)", + "type": "string", + "sensitive": 1 + }, + "has_secret_answer": { + "description": "Returns 1 if the client has a secret answer, 0 otherwise.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "immutable_fields": { + "description": "A list of profile fields which are immutable (read-only unless they are not set yet) due to landing company regulations and the current status of the account.", + "type": "array", + "items": { + "type": "string" + } + }, + "is_authenticated_payment_agent": { + "description": "Boolean value 1 or 0, indicating whether is payment agent (note: not applicable for virtual money accounts)", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_name": { + "description": "Last name (note: Only available for users who have at least one real account)", + "type": "string", + "sensitive": 1 + }, + "non_pep_declaration": { + "description": "Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Note: returned for real accounts only.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "phone": { + "description": "Telephone (note: Only available for users who have at least one real account)", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "place_of_birth": { + "description": "Place of birth, 2-letter country code.", + "type": [ + "null", + "string" + ] + }, + "preferred_language": { + "description": "User's preferred language, ISO standard code of language", + "type": [ + "null", + "string" + ], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "request_professional_status": { + "description": "Boolean value 1 or 0, indicating if client has requested professional status.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "residence": { + "description": "User Country", + "type": [ + "null", + "string" + ] + }, + "salutation": { + "description": "Salutation (note: Only available for users who have at least one real account)", + "type": "string" + }, + "tax_identification_number": { + "description": "Tax identification number. Only applicable for real money account.", + "type": [ + "null", + "string" + ] + }, + "tax_residence": { + "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account.", + "type": [ + "null", + "string" + ] + }, + "trading_hub": { + "description": "Boolean value 1 or 0, indicating if client has enabled the Trading Hub dashboard", + "type": "integer" + }, + "user_hash": { + "description": "Hash generated using user details to verify whether the user is legitimate for our customer support system.", + "type": [ + "null", + "string" + ] + } } - } - }, - "first_name": { - "description": "First name (note: Only available for users who have at least one real account)", - "type": "string", - "sensitive": 1 - }, - "has_secret_answer": { - "description": "Returns 1 if the client has a secret answer, 0 otherwise.", - "type": "integer", - "enum": [0, 1] - }, - "immutable_fields": { - "description": "A list of profile fields which are immutable (read-only unless they are not set yet) due to landing company regulations and the current status of the account.", - "type": "array", - "items": { - "type": "string" - } - }, - "is_authenticated_payment_agent": { - "description": "Boolean value 1 or 0, indicating whether is payment agent (note: not applicable for virtual money accounts)", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "Last name (note: Only available for users who have at least one real account)", - "type": "string", - "sensitive": 1 - }, - "non_pep_declaration": { - "description": "Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Note: returned for real accounts only.", - "type": "integer", - "enum": [0, 1] - }, - "phone": { - "description": "Telephone (note: Only available for users who have at least one real account)", - "type": ["null", "string"], - "sensitive": 1 - }, - "place_of_birth": { - "description": "Place of birth, 2-letter country code.", - "type": ["null", "string"] - }, - "preferred_language": { - "description": "User's preferred language, ISO standard code of language", - "type": ["null", "string"], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "request_professional_status": { - "description": "Boolean value 1 or 0, indicating if client has requested professional status.", - "type": "integer", - "enum": [0, 1] - }, - "residence": { - "description": "User Country", - "type": ["null", "string"] - }, - "salutation": { - "description": "Salutation (note: Only available for users who have at least one real account)", - "type": "string" - }, - "tax_identification_number": { - "description": "Tax identification number. Only applicable for real money account.", - "type": ["null", "string"] }, - "tax_residence": { - "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account.", - "type": ["null", "string"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "trading_hub": { - "description": "Boolean value 1 or 0, indicating if client has enabled the Trading Hub dashboard", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "get_settings" + ] }, - "user_hash": { - "description": "Hash generated using user details to verify whether the user is legitimate for our customer support system.", - "type": ["null", "string"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["get_settings"] - }, - "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/get_settings/send.json b/config/v3/get_settings/send.json index 9e0c8c5e..4db572ba 100644 --- a/config/v3/get_settings/send.json +++ b/config/v3/get_settings/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/identity_verification_document_add/example.json b/config/v3/identity_verification_document_add/example.json index 90a7dd43..4b21188f 100644 --- a/config/v3/identity_verification_document_add/example.json +++ b/config/v3/identity_verification_document_add/example.json @@ -1,7 +1,7 @@ { - "identity_verification_document_add": 1, - "document_additional": "123456789ABCDEF", - "document_number": "12345678", - "document_type": "passport", - "issuing_country": "in" + "identity_verification_document_add": 1, + "document_additional": "123456789ABCDEF", + "document_number": "12345678", + "document_type": "passport", + "issuing_country": "in" } diff --git a/config/v3/identity_verification_document_add/receive.json b/config/v3/identity_verification_document_add/receive.json index 5df37326..ad3f5b13 100644 --- a/config/v3/identity_verification_document_add/receive.json +++ b/config/v3/identity_verification_document_add/receive.json @@ -1,28 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Identity Verification Add Document (response)", - "description": "Adds document information such as issuing country, id and type for identity verification processes.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "identity_verification_document_add": { - "title": "identity_verification_document_add", - "description": "1 on success", - "type": "integer", - "enum": [1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["identity_verification_document_add"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Identity Verification Add Document (response)", + "description": "Adds document information such as issuing country, id and type for identity verification processes.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "identity_verification_document_add": { + "title": "identity_verification_document_add", + "description": "1 on success", + "type": "integer", + "enum": [ + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "identity_verification_document_add" + ] + }, + "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/identity_verification_document_add/send.json b/config/v3/identity_verification_document_add/send.json index 715e6a1a..6df313cf 100644 --- a/config/v3/identity_verification_document_add/send.json +++ b/config/v3/identity_verification_document_add/send.json @@ -1,47 +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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/kyc_auth_status/example.json b/config/v3/kyc_auth_status/example.json new file mode 100644 index 00000000..86311dfc --- /dev/null +++ b/config/v3/kyc_auth_status/example.json @@ -0,0 +1,3 @@ +{ + "kyc_auth_status": 1 +} diff --git a/config/v3/kyc_auth_status/receive.json b/config/v3/kyc_auth_status/receive.json new file mode 100644 index 00000000..52326614 --- /dev/null +++ b/config/v3/kyc_auth_status/receive.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "KYC Authentication Status (response)", + "description": "A message with KYC Authentication Status.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "kyc_auth_status": { + "title": "kyc_auth_status", + "description": "Proof of Identity (POI) and Proof of Address (POA) authentication status details.", + "type": "object", + "additionalProperties": false, + "required": [ + "address", + "identity" + ], + "properties": { + "address": { + "description": "POA authentication status details.", + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "description": "Current POA status.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired" + ] + } + } + }, + "identity": { + "description": "POI authentication status details.", + "type": "object", + "additionalProperties": false, + "properties": { + "available_services": { + "description": "Available services for the next POI attempt.", + "type": "array", + "items": { + "type": "string" + } + }, + "last_rejected": { + "description": "Details on the rejected POI attempt.", + "type": "object", + "additionalProperties": false, + "properties": { + "document_type": { + "description": "Document type of the rejected POI attempt (IDV only).", + "type": [ + "null", + "string" + ] + }, + "rejected_reasons": { + "description": "Reason(s) for the rejected POI attempt.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "service": { + "description": "Service used for the current POI status.", + "type": "string", + "enum": [ + "none", + "idv", + "onfido", + "manual" + ] + }, + "status": { + "description": "Current POI status.", + "type": "string", + "enum": [ + "none", + "pending", + "rejected", + "verified", + "expired", + "suspected" + ] + } + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "kyc_auth_status" + ] + }, + "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/kyc_auth_status/send.json b/config/v3/kyc_auth_status/send.json new file mode 100644 index 00000000..3377825d --- /dev/null +++ b/config/v3/kyc_auth_status/send.json @@ -0,0 +1,32 @@ +{ + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } + } +} diff --git a/config/v3/landing_company/example.json b/config/v3/landing_company/example.json index 94b8450d..3dcbaf9f 100644 --- a/config/v3/landing_company/example.json +++ b/config/v3/landing_company/example.json @@ -1,3 +1,3 @@ { - "landing_company": "id" + "landing_company": "id" } diff --git a/config/v3/landing_company/receive.json b/config/v3/landing_company/receive.json index 5a1713a2..592b82d1 100644 --- a/config/v3/landing_company/receive.json +++ b/config/v3/landing_company/receive.json @@ -1,1223 +1,1752 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Landing Company (response)", - "description": "Returns the Landing Company for clients of a given country.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "landing_company": { - "title": "landing_company", - "description": "Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "address_parseable": { - "description": "Flag to indicate if address parseable or not", - "type": "integer", - "enum": [1, 0] - }, - "all_company": { - "description": "Config for all account types (Synthetic Indices and Financials).", - "type": "string", - "enum": ["svg", "none"] - }, - "config": { - "description": "Config structure with document types ,taxRequired ,tin format details.", - "type": "object" - }, - "derivez": { - "description": "Available DerivEZ accounts.", - "type": "object", - "additionalProperties": false, - "properties": { - "all": { - "description": "DerivEZ all account types (Synthetic Indices and Financials).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "For standard client", - "type": "string", - "enum": ["svg", "none"], - "additionalProperties": false - } - } - } - } - }, - "dxtrade_all_company": { - "description": "Available Deriv X all account types (Synthetic Indices and Financials).", - "type": "object", - "additionalProperties": false, - "properties": { - "standard": { - "description": "Landing Company details.", - "type": "object", - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Landing Company (response)", + "description": "Returns the Landing Company for clients of a given country.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "landing_company": { + "title": "landing_company", + "description": "Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "address_parseable": { + "description": "Flag to indicate if address parseable or not", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "all_company": { + "description": "Config for all account types (Synthetic Indices and Financials).", + "type": "string", + "enum": [ + "svg", + "none" + ] + }, + "config": { + "description": "Config structure with document types ,taxRequired ,tin format details.", + "type": "object" + }, + "ctrader": { + "description": "Available CTrader accounts.", + "type": "object", + "additionalProperties": false, + "properties": { + "all": { + "description": "CTrader all account types (Synthetic Indices and Financials).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "For standard client", + "type": "string", + "enum": [ + "svg", + "none" + ], + "additionalProperties": false + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "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"] - } + "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 + } + } } - } - }, - "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_gaming_company": { - "description": "Available Deriv X gaming 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"] - } + "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 + ] + } + } } - } - }, - "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] - } - } - } - } - }, - "financial_company": { - "description": "Landing Company for financial contracts (all except Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [1, 0] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowed account currencies for this Landing Company", - "type": "array", - "items": { - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - } - }, - "legal_allowed_markets": { - "description": "Allowed markets for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } } - } }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } - } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - } - } - }, - "forbidden_postcode_pattern": { - "description": "Forbidden postcode pattern", - "type": "string" - }, - "gaming_company": { - "description": "Landing Company for gaming contracts (Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { - "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" - }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object" - }, - "has_reality_check": { - "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", - "type": "integer", - "enum": [0, 1] - }, - "legal_allowed_contract_categories": { - "description": "Allowed contract types", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowable currencies", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowable markets", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } + "dxtrade_financial_company": { + "description": "Available Deriv X financial account types (all except Synthetic Indices).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "Landing Company details.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } } - } }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } - }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "dxtrade_gaming_company": { + "description": "Available Deriv X gaming account types (Synthetic Indices).", + "type": "object", + "additionalProperties": false, + "properties": { + "standard": { + "description": "Landing Company details.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } - } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - } - } - }, - "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_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"] - } + "financial_company": { + "description": "Landing Company for financial contracts (all except Synthetic Indices)", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" - }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - } - } - }, - "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": { + "forbidden_postcode_pattern": { + "description": "Forbidden postcode pattern", "type": "string" - } - }, - "legal_allowed_currencies": { - "description": "Allowed account currencies for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_allowed_markets": { - "description": "Allowed markets for this Landing Company", - "type": "array", - "items": { - "type": "string" - } - }, - "legal_default_currency": { - "description": "Default account currency", - "type": "string" - }, - "name": { - "description": "Landing Company legal name", - "type": "string" }, - "requirements": { - "description": "Legal requirements for the Landing Company", - "type": "object", - "additionalProperties": false, - "properties": { - "after_first_deposit": { - "description": "After first deposit requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "financial_assessment": { - "description": "Financial assessment requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["financial_information", "trading_experience"] - } - } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } + "gaming_company": { + "description": "Landing Company for gaming contracts (Synthetic Indices)", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } - }, - "shortcode": { - "description": "Landing Company short code", - "type": "string" }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] - } - } - } - } - }, - "mt_gaming_company": { - "description": "Landing Company for MT5 standard gaming contracts (Synthetic Indices), currently has Financial as subtype.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "financial": { - "description": "Landing Company for MT5 gaming contracts (Synthetic Indices)", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "address": { - "description": "Landing Company address", - "type": ["array", "null"], - "items": { + "id": { + "description": "Country code", "type": "string" - } - }, - "changeable_fields": { - "description": "Special conditions for changing sensitive fields", - "type": "object" }, - "country": { - "description": "Landing Company country of incorporation", - "type": "string" + "is_idv_supported": { + "description": "Flag to indicate if idv is supported or not", + "type": "integer", + "enum": [ + 1, + 0 + ] }, - "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": { + "lc_to_open_mf_account": { + "description": "Open mf account lc details.", "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"] - } + "minimum_age": { + "description": "Minimum age", + "type": "integer" + }, + "mt5_age_verification": { + "description": "Flag to indicate if mt5 age verification detail.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "mt_all_company": { + "description": "Landing Company for MT5 standard combined all Synthetic and financial, currently has Financial as subtype.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "swap_free": { + "description": "Landing Company for MT5 combined all Synthetic and financial", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowable currencies", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowable markets", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } } - } - }, - "compliance": { - "description": "Compliance requirements", - "type": "object", - "additionalProperties": false, - "properties": { - "mt5": { - "description": "Compliance MT5 requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["expiration_check", "fully_authenticated"] - } + } + }, + "mt_financial_company": { + "description": "Landing Company for MT5 financial contracts (all except Synthetic Indices), currently divided into Financial STP, Financial (standard) as subtypes.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "financial": { + "description": "Contain details for landing company for financial subtype. The Financial account is suitable for a wide range of traders, both new and experienced. It gives you mid-range leverage and variable spreads that give you a great deal of flexibility for whatever position you wish to take in the market.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } }, - "tax_information": { - "description": "Compliance tax information requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "financial_stp": { + "description": "Contain details for landing company for Financial STP subtype. The Financial STP account provides you with tight spreads, higher ticket size and offers a variety of FX pairs from majors to exotics. It is a straight through processing (STP) account with direct access to FX liquidity from various providers.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country of incorporation", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object" + }, + "has_reality_check": { + "description": "Flag to indicate whether reality check is applicable for this Landing Company. `1`: applicable, `0`: not applicable. The Reality Check is a feature that gives a summary of the client's trades and account balances on a regular basis throughout his session, and is a regulatory requirement for certain Landing Companies.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "legal_allowed_contract_categories": { + "description": "Allowed contract types for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_currencies": { + "description": "Allowed account currencies for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_allowed_markets": { + "description": "Allowed markets for this Landing Company", + "type": "array", + "items": { + "type": "string" + } + }, + "legal_default_currency": { + "description": "Default account currency", + "type": "string" + }, + "name": { + "description": "Landing Company legal name", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the Landing Company", + "type": "object", + "additionalProperties": false, + "properties": { + "after_first_deposit": { + "description": "After first deposit requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "financial_assessment": { + "description": "Financial assessment requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "financial_information", + "trading_experience" + ] + } + } + } + }, + "compliance": { + "description": "Compliance requirements", + "type": "object", + "additionalProperties": false, + "properties": { + "mt5": { + "description": "Compliance MT5 requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "expiration_check", + "fully_authenticated" + ] + } + }, + "tax_information": { + "description": "Compliance tax information requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "tax_identification_number", + "tax_residence" + ] + } + } + } + }, + "signup": { + "description": "Sign up requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "first_name", + "residence", + "salutation" + ] + } + }, + "withdrawal": { + "description": "Withdrawal requirements", + "type": "array", + "items": { + "type": "string", + "examples": [ + "address_city", + "address_line_1" + ] + } + } + } + }, + "shortcode": { + "description": "Landing Company short code", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } + } + }, + "mt_gaming_company": { + "description": "Landing Company for MT5 standard gaming contracts (Synthetic Indices), currently has Financial as subtype.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "financial": { + "description": "Landing Company for MT5 gaming 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 + ] + } + } } - } - }, - "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" + "name": { + "description": "Country name", + "type": "string" }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "type": "integer", - "enum": [0, 1] + "need_set_max_turnover_limit": { + "description": "Flag to indicate whether max turnover limit settings.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "no_province": { + "description": "Flag to indicate province settings.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_address_postcode": { + "description": "Flag to indicate whether address postcode is required or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_age_verified_for_synthetic": { + "description": "Flag to indicate whether age verification required ofr synthetic or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_poi": { + "description": "Flag to indicate whether poi is required.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "require_verification_when_not_age_verified": { + "description": "Flag to indicate whether verification required if age not verified.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "skip_deposit_verification": { + "description": "Flag to indicate whether to skip deposit verifcation or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "ukgc_funds_protection": { + "description": "Flag to indicate ukgc funds protection setting.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "virtual_company": { + "description": "Virtual Company", + "type": "string" } - } } - } - }, - "name": { - "description": "Country name", - "type": "string" - }, - "need_set_max_turnover_limit": { - "description": "Flag to indicate whether max turnover limit settings.", - "type": "integer", - "enum": [0, 1] - }, - "no_province": { - "description": "Flag to indicate province settings.", - "type": "integer", - "enum": [0, 1] - }, - "require_address_postcode": { - "description": "Flag to indicate whether address postcode is required or not.", - "type": "integer", - "enum": [0, 1] - }, - "require_age_verified_for_synthetic": { - "description": "Flag to indicate whether age verification required ofr synthetic or not.", - "type": "integer", - "enum": [0, 1] - }, - "require_poi": { - "description": "Flag to indicate whether poi is required.", - "type": "integer", - "enum": [0, 1] - }, - "require_verification_when_not_age_verified": { - "description": "Flag to indicate whether verification required if age not verified.", - "type": "integer", - "enum": [0, 1] }, - "skip_deposit_verification": { - "description": "Flag to indicate whether to skip deposit verifcation or not.", - "type": "integer", - "enum": [0, 1] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "ukgc_funds_protection": { - "description": "Flag to indicate ukgc funds protection setting.", - "type": "integer", - "enum": [0, 1] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "landing_company" + ] }, - "virtual_company": { - "description": "Virtual Company", - "type": "string" + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["landing_company"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/landing_company/send.json b/config/v3/landing_company/send.json index b5bd1562..47248985 100644 --- a/config/v3/landing_company/send.json +++ b/config/v3/landing_company/send.json @@ -1,25 +1,28 @@ { - "$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 Gaming contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["landing_company"], - "properties": { - "landing_company": { - "title": "Landing Company", - "description": "Client's 2-letter country code (obtained from `residence_list` call).", - "type": "string", - "pattern": "^\\w\\w$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 Gaming 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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/landing_company_details/example.json b/config/v3/landing_company_details/example.json index e39d9339..0ece6b02 100644 --- a/config/v3/landing_company_details/example.json +++ b/config/v3/landing_company_details/example.json @@ -1,3 +1,3 @@ { - "landing_company_details": "svg" + "landing_company_details": "svg" } diff --git a/config/v3/landing_company_details/receive.json b/config/v3/landing_company_details/receive.json index cd7741cf..7feb4bbd 100644 --- a/config/v3/landing_company_details/receive.json +++ b/config/v3/landing_company_details/receive.json @@ -1,208 +1,246 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Landing Company Details (response)", - "description": "A message with Landing Company.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "landing_company_details": { - "title": "landing_company_details", - "description": "The detailed information of the requested landing company.", - "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.", - "type": "string" - }, - "currency_config": { - "title": "Currency Config Structure", - "description": "The configuration of each currency.", - "type": "object", - "additionalProperties": false, - "properties": { - "commodities": { - "title": "Commodities", - "description": "Name of commodities.", - "type": "object" - }, - "cryptocurrency": { - "title": "Cryptocurrency", - "description": "Name of cryptocurrency.", - "type": "object" - }, - "forex": { - "title": "Forex", - "description": "Name of forex.", - "type": "object" - }, - "indices": { - "title": "Indices", - "description": "Name of indices.", - "type": "object" - }, - "market": { - "title": "Market", - "description": "Name of market.", - "type": "object", - "additionalProperties": false, - "properties": { - "currency": { - "title": "Currency", - "description": "Currency Symbol.", - "type": "object", - "additionalProperties": false, - "properties": { - "max_payout": { - "description": "Maximum payout for this currency in this market.", - "type": "integer" - }, - "min_stake": { - "description": "Minimum stake for this currency in this market.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Landing Company Details (response)", + "description": "A message with Landing Company.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "landing_company_details": { + "title": "landing_company_details", + "description": "The detailed information of the requested landing company.", + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "description": "Landing Company address.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" } - } - } - } - }, - "synthetic_index": { - "title": "Synthetic index", - "description": "Name of synthetic index.", - "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": "Allowable currencies for accounts with 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 currency of client accounts with this Landing Company.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "name": { - "description": "Landing Company name.", - "type": "string" - }, - "requirements": { - "description": "Legal requirements for the given 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": { + "changeable_fields": { + "description": "Special conditions for changing sensitive fields", + "type": "object" + }, + "country": { + "description": "Landing Company country.", + "type": "string" + }, + "currency_config": { + "title": "Currency Config Structure", + "description": "The configuration of each currency.", + "type": "object", + "additionalProperties": false, + "properties": { + "commodities": { + "title": "Commodities", + "description": "Name of commodities.", + "type": "object" + }, + "cryptocurrency": { + "title": "Cryptocurrency", + "description": "Name of cryptocurrency.", + "type": "object" + }, + "forex": { + "title": "Forex", + "description": "Name of forex.", + "type": "object" + }, + "indices": { + "title": "Indices", + "description": "Name of indices.", + "type": "object" + }, + "market": { + "title": "Market", + "description": "Name of market.", + "type": "object", + "additionalProperties": false, + "properties": { + "currency": { + "title": "Currency", + "description": "Currency Symbol.", + "type": "object", + "additionalProperties": false, + "properties": { + "max_payout": { + "description": "Maximum payout for this currency in this market.", + "type": "integer" + }, + "min_stake": { + "description": "Minimum stake for this currency in this market.", + "type": "integer" + } + } + } + } + }, + "synthetic_index": { + "title": "Synthetic index", + "description": "Name of synthetic index.", + "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": "Allowable currencies for accounts with 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 currency of client accounts with this Landing Company.", "type": "string", - "examples": ["tax_identification_number", "tax_residence"] - } + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "name": { + "description": "Landing Company name.", + "type": "string" + }, + "requirements": { + "description": "Legal requirements for the given 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 shortcode.", + "type": "string" + }, + "support_professional_client": { + "description": "Flag that indicates whether the landing company supports professional accounts or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "tin_not_mandatory": { + "description": "Flag that indicates whether tax identifier number is not mandatory for the current country and landing company.", + "type": "integer", + "enum": [ + 0, + 1 + ] } - } - }, - "signup": { - "description": "Sign up requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["first_name", "residence", "salutation"] - } - }, - "withdrawal": { - "description": "Withdrawal requirements", - "type": "array", - "items": { - "type": "string", - "examples": ["address_city", "address_line_1"] - } } - } }, - "shortcode": { - "description": "Landing Company shortcode.", - "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_details" + ] }, - "support_professional_client": { - "description": "Flag that indicates whether the landing company supports professional accounts or not", - "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" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["landing_company_details"] - }, - "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_details/send.json b/config/v3/landing_company_details/send.json index 49de61cb..676b53b4 100644 --- a/config/v3/landing_company_details/send.json +++ b/config/v3/landing_company_details/send.json @@ -1,36 +1,45 @@ { - "$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" - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/login_history/example.json b/config/v3/login_history/example.json index 9c5deecd..84011541 100644 --- a/config/v3/login_history/example.json +++ b/config/v3/login_history/example.json @@ -1,4 +1,4 @@ { - "login_history": 1, - "limit": 25 + "login_history": 1, + "limit": 25 } diff --git a/config/v3/login_history/receive.json b/config/v3/login_history/receive.json index f31694aa..59845fea 100644 --- a/config/v3/login_history/receive.json +++ b/config/v3/login_history/receive.json @@ -1,53 +1,69 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Login History (response)", - "description": "Recent login/logout history records", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "login_history": { - "title": "login_history", - "description": "Array of records of client login/logout activities", - "type": "array", - "items": { - "description": "User login history", - "type": "object", - "additionalProperties": false, - "required": ["action", "environment", "status", "time"], - "properties": { - "action": { - "description": "Type of action.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Login History (response)", + "description": "Recent login/logout history records", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "login_history": { + "title": "login_history", + "description": "Array of records of client login/logout activities", + "type": "array", + "items": { + "description": "User login history", + "type": "object", + "additionalProperties": false, + "required": [ + "action", + "environment", + "status", + "time" + ], + "properties": { + "action": { + "description": "Type of action.", + "type": "string", + "examples": [ + "login", + "logout" + ] + }, + "environment": { + "description": "Provides details about browser, device used during login or logout", + "type": "string" + }, + "status": { + "description": "Status of activity: 1 - success, 0 - failure", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "time": { + "description": "Epoch time of the activity", + "type": "integer" + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", "type": "string", - "examples": ["login", "logout"] - }, - "environment": { - "description": "Provides details about browser, device used during login or logout", - "type": "string" - }, - "status": { - "description": "Status of activity: 1 - success, 0 - failure", - "type": "integer", - "enum": [0, 1] - }, - "time": { - "description": "Epoch time of the activity", + "enum": [ + "login_history" + ] + }, + "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": ["login_history"] - }, - "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/login_history/send.json b/config/v3/login_history/send.json index 4ba42a63..c97ab482 100644 --- a/config/v3/login_history/send.json +++ b/config/v3/login_history/send.json @@ -1,32 +1,39 @@ { - "$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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/logout/example.json b/config/v3/logout/example.json index c723874e..c37d647a 100644 --- a/config/v3/logout/example.json +++ b/config/v3/logout/example.json @@ -1,3 +1,3 @@ { - "logout": 1 + "logout": 1 } diff --git a/config/v3/logout/receive.json b/config/v3/logout/receive.json index f0f1beae..dd5f1a81 100644 --- a/config/v3/logout/receive.json +++ b/config/v3/logout/receive.json @@ -1,28 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Log Out (response)", - "description": "The response of logout request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "logout": { - "title": "logout", - "description": "The result of logout request which is 1", - "type": "integer", - "enum": [1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["logout"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Log Out (response)", + "description": "The response of logout request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "logout": { + "title": "logout", + "description": "The result of logout request which is 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "logout" + ] + }, + "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/logout/send.json b/config/v3/logout/send.json index 81508f76..c5a67af9 100644 --- a/config/v3/logout/send.json +++ b/config/v3/logout/send.json @@ -1,24 +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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_deposit/example.json b/config/v3/mt5_deposit/example.json index c7396f3e..e2e1be03 100644 --- a/config/v3/mt5_deposit/example.json +++ b/config/v3/mt5_deposit/example.json @@ -1,6 +1,6 @@ { - "mt5_deposit": 1, - "amount": 1000, - "from_binary": "CR100001", - "to_mt5": "MTR1000" + "mt5_deposit": 1, + "amount": 1000, + "from_binary": "CR100001", + "to_mt5": "MTR1000" } diff --git a/config/v3/mt5_deposit/receive.json b/config/v3/mt5_deposit/receive.json index 129c340f..b497647b 100644 --- a/config/v3/mt5_deposit/receive.json +++ b/config/v3/mt5_deposit/receive.json @@ -1,31 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Deposit (response)", - "description": "The result of MT5 deposit request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_deposit": { - "title": "mt5_deposit", - "description": "1 on success", - "type": "integer" - }, - "binary_transaction_id": { - "description": "Withdrawal reference ID of Binary account", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["mt5_deposit"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Deposit (response)", + "description": "The result of MT5 deposit request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_deposit": { + "title": "mt5_deposit", + "description": "1 on success", + "type": "integer" + }, + "binary_transaction_id": { + "description": "Withdrawal reference ID of Binary account", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_deposit" + ] + }, + "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/mt5_deposit/send.json b/config/v3/mt5_deposit/send.json index b709e4b4..7c55abfb 100644 --- a/config/v3/mt5_deposit/send.json +++ b/config/v3/mt5_deposit/send.json @@ -1,39 +1,47 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_get_settings/example.json b/config/v3/mt5_get_settings/example.json index f3ba3eb0..d8c2b0d4 100644 --- a/config/v3/mt5_get_settings/example.json +++ b/config/v3/mt5_get_settings/example.json @@ -1,4 +1,4 @@ { - "mt5_get_settings": 1, - "login": "MTR1000" + "mt5_get_settings": 1, + "login": "MTR1000" } diff --git a/config/v3/mt5_get_settings/receive.json b/config/v3/mt5_get_settings/receive.json index 16fcb791..95b3d248 100644 --- a/config/v3/mt5_get_settings/receive.json +++ b/config/v3/mt5_get_settings/receive.json @@ -1,114 +1,202 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Get Setting (response)", - "description": "Get MT5 user settings", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_get_settings": { - "title": "mt5_get_settings", - "description": "MT5 user account details", - "type": "object", - "additionalProperties": false, - "properties": { - "account_type": { - "description": "Account type.", - "type": "string", - "enum": ["demo", "real"] - }, - "address": { - "description": "The address of the user. The maximum length of the address is 128 characters.", - "type": "string" - }, - "balance": { - "description": "Account balance.", - "type": "string" - }, - "city": { - "description": "User's city of residence.", - "type": "string" - }, - "company": { - "description": "Name of the client's company. The maximum length of the company name is 64 characters.", - "type": "string" - }, - "country": { - "description": "2-letter country code.", - "type": "string" - }, - "currency": { - "description": "MT5 account currency (`USD` or `EUR`) that depends on the MT5 company (`vanuatu`, `svg`, `malta`).", - "type": "string" - }, - "email": { - "description": "Email address.", - "type": "string", - "sensitive": 1 - }, - "group": { - "description": "The group where account belongs to.", - "type": "string" - }, - "landing_company_short": { - "description": "Landing company shortcode of the MT5 account.", - "type": "string", - "enum": ["bvi", "labuan", "malta", "maltainvest", "svg", "vanuatu"] - }, - "leverage": { - "description": "Client leverage (from 1 to 1000).", - "type": "number" - }, - "login": { - "description": "Login ID of the user's MT5 account.", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "market_type": { - "description": "Market type", - "type": "string", - "enum": ["financial", "synthetic"] - }, - "name": { - "description": "Client's name. The maximum length of a client's symbol name is 128 characters.", - "type": "string" - }, - "phone": { - "description": "User's phone number.", - "type": "string", - "sensitive": 1 - }, - "phonePassword": { - "description": "The user's phone password.", - "type": "string", - "sensitive": 1 - }, - "state": { - "description": "User's state (region) of residence.", - "type": "string" - }, - "sub_account_type": { - "description": "Sub account type", - "type": "string", - "enum": ["financial", "financial_stp"] - }, - "zipCode": { - "description": "User's zip code.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Get Setting (response)", + "description": "Get MT5 user settings", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_get_settings": { + "title": "mt5_get_settings", + "description": "MT5 user account details", + "type": "object", + "additionalProperties": false, + "properties": { + "account_type": { + "description": "Account type.", + "type": "string", + "enum": [ + "demo", + "real" + ] + }, + "address": { + "description": "The address of the user. The maximum length of the address is 128 characters.", + "type": "string" + }, + "balance": { + "description": "Balance of the Trading account.", + "type": "number" + }, + "city": { + "description": "User's city of residence.", + "type": "string" + }, + "company": { + "description": "Name of the client's company. The maximum length of the company name is 64 characters.", + "type": "string" + }, + "country": { + "description": "2-letter country code.", + "type": "string" + }, + "currency": { + "description": "MT5 account currency (`USD` or `EUR`) that depends on the MT5 company (`vanuatu`, `svg`, `malta`).", + "type": "string" + }, + "display_balance": { + "description": "Account balance, formatted to appropriate decimal places.", + "type": "string" + }, + "email": { + "description": "Email address.", + "type": "string", + "sensitive": 1 + }, + "group": { + "description": "The group where account belongs to.", + "type": "string" + }, + "landing_company_short": { + "description": "Landing company shortcode of the MT5 account.", + "type": "string", + "enum": [ + "bvi", + "labuan", + "malta", + "maltainvest", + "seychelles", + "svg", + "vanuatu" + ] + }, + "leverage": { + "description": "Client leverage (from 1 to 1000).", + "type": "number" + }, + "login": { + "description": "Login ID of the user's MT5 account.", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "market_type": { + "description": "Market type", + "type": "string", + "enum": [ + "all", + "financial", + "synthetic" + ] + }, + "name": { + "description": "Client's name. The maximum length of a client's symbol name is 128 characters.", + "type": "string" + }, + "phone": { + "description": "User's phone number.", + "type": "string", + "sensitive": 1 + }, + "phonePassword": { + "description": "The user's phone password.", + "type": "string", + "sensitive": 1 + }, + "server": { + "description": "Trade server name of the MT5 account.", + "type": "string" + }, + "server_info": { + "description": "Trade server information.", + "type": "object", + "additionalProperties": false, + "properties": { + "environment": { + "description": "The environment. E.g. Deriv-Server.", + "type": "string", + "enum": [ + "Deriv-Demo", + "Deriv-Server", + "Deriv-Server-02" + ] + }, + "geolocation": { + "description": "Geographical location of the server.", + "type": "object", + "additionalProperties": false, + "properties": { + "group": { + "description": "Internal server grouping.", + "type": "string" + }, + "location": { + "description": "Server location.", + "type": "string" + }, + "region": { + "description": "Server region.", + "type": "string" + }, + "sequence": { + "description": "Server sequence.", + "type": "integer" + } + } + }, + "id": { + "description": "Server id.", + "type": "string" + } + } + }, + "state": { + "description": "User's state (region) of residence.", + "type": "string" + }, + "sub_account_category": { + "description": "Sub account category.", + "type": "string", + "enum": [ + "", + "ibt", + "lim", + "stp", + "swap_free", + "swap_free_high_risk" + ] + }, + "sub_account_type": { + "description": "Sub account type", + "type": "string", + "enum": [ + "derivez", + "financial", + "financial_stp", + "standard" + ] + }, + "zipCode": { + "description": "User's zip code.", + "type": "string" + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_get_settings" + ] + }, + "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": ["mt5_get_settings"] - }, - "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/mt5_get_settings/send.json b/config/v3/mt5_get_settings/send.json index 44c511dd..f9498f2a 100644 --- a/config/v3/mt5_get_settings/send.json +++ b/config/v3/mt5_get_settings/send.json @@ -1,30 +1,38 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_login_list/example.json b/config/v3/mt5_login_list/example.json index a65b41c4..9ade685c 100644 --- a/config/v3/mt5_login_list/example.json +++ b/config/v3/mt5_login_list/example.json @@ -1,3 +1,3 @@ { - "mt5_login_list": 1 + "mt5_login_list": 1 } diff --git a/config/v3/mt5_login_list/receive.json b/config/v3/mt5_login_list/receive.json index 8c0a9046..2e30703e 100644 --- a/config/v3/mt5_login_list/receive.json +++ b/config/v3/mt5_login_list/receive.json @@ -1,211 +1,258 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Accounts List (response)", - "description": "Get list of MT5 accounts for client.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_login_list": { - "title": "mt5_login_list", - "description": "Array containing MT5 account objects.", - "type": "array", - "items": { - "title": "Details of each MT5 loginid.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_type": { - "description": "Account type.", - "type": "string", - "enum": ["demo", "real"] - }, - "balance": { - "description": "Balance of the MT5 account.", - "type": "number" - }, - "country": { - "description": "Residence of the MT5 account.", - "type": "string" - }, - "currency": { - "description": "Currency of the MT5 account.", - "type": "string" - }, - "display_balance": { - "description": "Account balance, formatted to appropriate decimal places.", - "type": "string" - }, - "email": { - "description": "Email address of the MT5 account.", - "type": "string" - }, - "error": { - "description": "Error in MT5 account details.", - "type": "object", - "additionalProperties": false, - "properties": { - "code": { - "description": "Error code string.", - "type": "string" - }, - "details": { - "description": "Extra information about the error.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Accounts List (response)", + "description": "Get list of MT5 accounts for client.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_login_list": { + "title": "mt5_login_list", + "description": "Array containing MT5 account objects.", + "type": "array", + "items": { + "title": "Details of each MT5 loginid.", "type": "object", "additionalProperties": false, "properties": { - "account_type": { - "description": "MT5 account type.", - "type": "string" - }, - "login": { - "description": "MT5 account login ID.", - "type": "string" - }, - "server": { - "description": "Trade server name of the MT5 account.", - "type": "string" - }, - "server_info": { - "description": "Trade server information.", - "type": "object", - "additionalProperties": false, - "properties": { - "environment": { - "description": "The environment. E.g. Deriv-Server.", + "account_type": { + "description": "Account type.", "type": "string", - "enum": ["Deriv-Demo", "Deriv-Server", "Deriv-Server-02"] - }, - "geolocation": { - "description": "Geographical location of the server.", + "enum": [ + "demo", + "real" + ] + }, + "balance": { + "description": "Balance of the MT5 account.", + "type": "number" + }, + "country": { + "description": "Residence of the MT5 account.", + "type": "string" + }, + "currency": { + "description": "Currency of the MT5 account.", + "type": "string" + }, + "display_balance": { + "description": "Account balance, formatted to appropriate decimal places.", + "type": "string" + }, + "email": { + "description": "Email address of the MT5 account.", + "type": "string" + }, + "error": { + "description": "Error in MT5 account details.", "type": "object", "additionalProperties": false, "properties": { - "group": { - "description": "Internal server grouping.", - "type": "string" - }, - "location": { - "description": "Sever location.", - "type": "string" - }, - "region": { - "description": "Sever region.", - "type": "string" - }, - "sequence": { - "description": "Sever sequence.", - "type": "integer" - } + "code": { + "description": "Error code string.", + "type": "string" + }, + "details": { + "description": "Extra information about the error.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_type": { + "description": "MT5 account type.", + "type": "string" + }, + "login": { + "description": "MT5 account login ID.", + "type": "string" + }, + "server": { + "description": "Trade server name of the MT5 account.", + "type": "string" + }, + "server_info": { + "description": "Trade server information.", + "type": "object", + "additionalProperties": false, + "properties": { + "environment": { + "description": "The environment. E.g. Deriv-Server.", + "type": "string", + "enum": [ + "Deriv-Demo", + "Deriv-Server", + "Deriv-Server-02" + ] + }, + "geolocation": { + "description": "Geographical location of the server.", + "type": "object", + "additionalProperties": false, + "properties": { + "group": { + "description": "Internal server grouping.", + "type": "string" + }, + "location": { + "description": "Server location.", + "type": "string" + }, + "region": { + "description": "Server region.", + "type": "string" + }, + "sequence": { + "description": "Server sequence.", + "type": "integer" + } + } + }, + "id": { + "description": "Server id.", + "type": "string" + } + } + } + } + }, + "message_to_client": { + "description": "Error message.", + "type": "string" + } } - }, - "id": { - "description": "Server id.", + }, + "group": { + "description": "Group type of the MT5 account, e.g. `demo\\svg_financial`", + "type": "string" + }, + "landing_company_short": { + "description": "Landing company shortcode of the MT5 account.", + "type": "string", + "enum": [ + "bvi", + "labuan", + "malta", + "maltainvest", + "svg", + "vanuatu", + "seychelles" + ] + }, + "leverage": { + "description": "Leverage of the MT5 account (1 to 1000).", + "type": "number" + }, + "login": { + "description": "Login of MT5 account.", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "market_type": { + "description": "Market type", + "type": "string", + "enum": [ + "financial", + "synthetic", + "all" + ] + }, + "name": { + "description": "Name of the owner of the MT5 account.", "type": "string" - } + }, + "server": { + "description": "Trade server name of the MT5 account.", + "type": "string" + }, + "server_info": { + "description": "Trade server information.", + "type": "object", + "additionalProperties": false, + "properties": { + "environment": { + "description": "The environment. E.g. Deriv-Server.", + "type": "string", + "enum": [ + "Deriv-Demo", + "Deriv-Server", + "Deriv-Server-02" + ] + }, + "geolocation": { + "description": "Geographical location of the server.", + "type": "object", + "additionalProperties": false, + "properties": { + "group": { + "description": "Internal server grouping.", + "type": "string" + }, + "location": { + "description": "Server location.", + "type": "string" + }, + "region": { + "description": "Server region.", + "type": "string" + }, + "sequence": { + "description": "Server sequence.", + "type": "integer" + } + } + }, + "id": { + "description": "Server id.", + "type": "string" + } + } + }, + "status": { + "description": "MT5 account status.", + "type": [ + "null", + "string" + ] + }, + "sub_account_category": { + "description": "Sub account category", + "type": "string", + "enum": [ + "", + "swap_free", + "swap_free_high_risk", + "ibt", + "stp" + ] + }, + "sub_account_type": { + "description": "Sub account type refer to classic MT5 account", + "type": "string", + "enum": [ + "standard", + "financial", + "financial_stp", + "swap_free" + ] } - } - } - }, - "message_to_client": { - "description": "Error message.", - "type": "string" - } - } - }, - "group": { - "description": "Group type of the MT5 account, e.g. `demo\\svg_financial`", - "type": "string" - }, - "landing_company_short": { - "description": "Landing company shortcode of the MT5 account.", - "type": "string", - "enum": ["bvi", "labuan", "malta", "maltainvest", "svg", "vanuatu", "seychelles"] - }, - "leverage": { - "description": "Leverage of the MT5 account (1 to 1000).", - "type": "number" - }, - "login": { - "description": "Login of MT5 account.", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "market_type": { - "description": "Market type", - "type": "string", - "enum": ["financial", "synthetic"] - }, - "name": { - "description": "Name of the owner of the MT5 account.", - "type": "string" - }, - "server": { - "description": "Trade server name of the MT5 account.", - "type": "string" - }, - "server_info": { - "description": "Trade server information.", - "type": "object", - "additionalProperties": false, - "properties": { - "environment": { - "description": "The environment. E.g. Deriv-Server.", - "type": "string", - "enum": ["Deriv-Demo", "Deriv-Server", "Deriv-Server-02"] - }, - "geolocation": { - "description": "Geographical location of the server.", - "type": "object", - "additionalProperties": false, - "properties": { - "group": { - "description": "Internal server grouping.", - "type": "string" - }, - "location": { - "description": "Sever location.", - "type": "string" - }, - "region": { - "description": "Sever region.", - "type": "string" - }, - "sequence": { - "description": "Sever sequence.", - "type": "integer" - } } - }, - "id": { - "description": "Server id.", - "type": "string" - } } - }, - "status": { - "description": "MT5 account status.", - "type": ["null", "string"] - }, - "sub_account_type": { - "description": "Sub account type", + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", "type": "string", - "enum": ["financial", "financial_stp"] - } + "enum": [ + "mt5_login_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": ["mt5_login_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/mt5_login_list/send.json b/config/v3/mt5_login_list/send.json index 62fa6a92..e5fed890 100644 --- a/config/v3/mt5_login_list/send.json +++ b/config/v3/mt5_login_list/send.json @@ -1,25 +1,32 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_new_account/example.json b/config/v3/mt5_new_account/example.json index 624a65cf..55d422e3 100644 --- a/config/v3/mt5_new_account/example.json +++ b/config/v3/mt5_new_account/example.json @@ -1,19 +1,19 @@ { - "mt5_new_account": 1, - "account_type": "demo", - "address": "Dummy address", - "city": "Valletta", - "company": "Deriv Limited", - "country": "mt", - "email": "test@mailinator.com", - "investPassword": "Anoth3r_p4ssword", - "leverage": 100, - "mainPassword": "C0rrect_p4ssword", - "mt5_account_category": "conventional", - "mt5_account_type": "financial", - "name": "Peter Pan", - "phone": "+6123456789", - "phonePassword": "AbcDv1234", - "state": "Valleta", - "zipCode": "VLT 1117" + "mt5_new_account": 1, + "account_type": "demo", + "address": "Dummy address", + "city": "Valletta", + "company": "Deriv Limited", + "country": "mt", + "email": "test@mailinator.com", + "investPassword": "Anoth3r_p4ssword", + "leverage": 100, + "mainPassword": "C0rrect_p4ssword", + "mt5_account_category": "conventional", + "mt5_account_type": "financial", + "name": "Peter Pan", + "phone": "+6123456789", + "phonePassword": "AbcDv1234", + "state": "Valleta", + "zipCode": "VLT 1117" } diff --git a/config/v3/mt5_new_account/receive.json b/config/v3/mt5_new_account/receive.json index 7c8e0946..c204e42e 100644 --- a/config/v3/mt5_new_account/receive.json +++ b/config/v3/mt5_new_account/receive.json @@ -1,66 +1,86 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: New Account (response)", - "description": "Create MT5 account Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_new_account": { - "title": "mt5_new_account", - "description": "New MT5 account details", - "type": "object", - "additionalProperties": false, - "properties": { - "account_type": { - "description": "Account type.", - "type": "string", - "enum": ["demo", "gaming", "financial"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: New Account (response)", + "description": "Create MT5 account Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_new_account": { + "title": "mt5_new_account", + "description": "New MT5 account details", + "type": "object", + "additionalProperties": false, + "properties": { + "account_type": { + "description": "Account type.", + "type": "string", + "enum": [ + "demo", + "gaming", + "financial", + "all" + ] + }, + "agent": { + "description": "Agent Details.", + "type": [ + "null", + "string" + ] + }, + "balance": { + "description": "Account balance.", + "type": "number" + }, + "currency": { + "description": "MT5 account currency (`USD` or `EUR`) that depends on the MT5 company (`vanuatu`, `svg`, `malta`).", + "type": "string" + }, + "display_balance": { + "description": "Account balance, formatted to appropriate decimal places.", + "type": "string" + }, + "login": { + "description": "Login ID of the user's new MT5 account. Login could have 2 types of prefixes: MTD, MTR. MTD - for demo accounts and MTR for real money accounts.", + "type": "string", + "pattern": "^MT[DR]?[0-9]+$" + }, + "mt5_account_category": { + "description": "With default value of conventional, unavailable for `financial_stp` sub account type.", + "type": "string", + "enum": [ + "conventional", + "swap_free" + ] + }, + "mt5_account_type": { + "description": "Sub account type for classic MT5 account.", + "type": "string", + "enum": [ + "financial", + "financial_stp", + "standard" + ] + } + } }, - "agent": { - "description": "Agent Details.", - "type": ["null", "string"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "balance": { - "description": "Account balance.", - "type": "number" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_new_account" + ] }, - "currency": { - "description": "MT5 account currency (`USD` or `EUR`) that depends on the MT5 company (`vanuatu`, `svg`, `malta`).", - "type": "string" - }, - "display_balance": { - "description": "Account balance, formatted to appropriate decimal places.", - "type": "string" - }, - "login": { - "description": "Login ID of the user's new MT5 account. Login could have 2 types of prefixes: MTD, MTR. MTD - for demo accounts and MTR for real money accounts.", - "type": "string", - "pattern": "^MT[DR]?[0-9]+$" - }, - "mt5_account_category": { - "description": "With default value of conventional, unavailable for `financial_stp` sub account type.", - "type": "string", - "enum": ["conventional"] - }, - "mt5_account_type": { - "description": "Sub account type, present only when account type is either `demo` or `financial`.", - "type": "string", - "enum": ["financial", "financial_stp"] + "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": ["mt5_new_account"] - }, - "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/mt5_new_account/send.json b/config/v3/mt5_new_account/send.json index c3337d28..049f53b2 100644 --- a/config/v3/mt5_new_account/send.json +++ b/config/v3/mt5_new_account/send.json @@ -1,124 +1,171 @@ { - "$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"] - }, - "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 - }, - "mt5_account_category": { - "description": "[Optional] To choose whether account is conventional or not. Unavailable for financial_stp MT5_account_type", - "type": "string", - "enum": ["conventional"] - }, - "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", - "pattern": "^.{1,101}$" - }, - "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}$" - }, - "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.", - "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 + }, + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_change/example.json b/config/v3/mt5_password_change/example.json index a4fd0be2..545ea2d5 100644 --- a/config/v3/mt5_password_change/example.json +++ b/config/v3/mt5_password_change/example.json @@ -1,7 +1,7 @@ { - "mt5_password_change": 1, - "login": "MTR1000", - "new_password": "C0rrect_p4ssword", - "old_password": "Abc1234", - "password_type": "main" + "mt5_password_change": 1, + "login": "MTR1000", + "new_password": "C0rrect_p4ssword", + "old_password": "Abc1234", + "password_type": "main" } diff --git a/config/v3/mt5_password_change/receive.json b/config/v3/mt5_password_change/receive.json index a6fa1081..6342a8fd 100644 --- a/config/v3/mt5_password_change/receive.json +++ b/config/v3/mt5_password_change/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Change (response)", - "description": "MT5 user password change receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_password_change": { - "title": "mt5_password_change", - "description": "`1` on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["mt5_password_change"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Change (response)", + "description": "MT5 user password change receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_password_change": { + "title": "mt5_password_change", + "description": "`1` on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_password_change" + ] + }, + "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/mt5_password_change/send.json b/config/v3/mt5_password_change/send.json index 493eb05b..e56dd6a9 100644 --- a/config/v3/mt5_password_change/send.json +++ b/config/v3/mt5_password_change/send.json @@ -1,48 +1,61 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_check/example.json b/config/v3/mt5_password_check/example.json index 431445af..79bc61b3 100644 --- a/config/v3/mt5_password_check/example.json +++ b/config/v3/mt5_password_check/example.json @@ -1,6 +1,6 @@ { - "mt5_password_check": 1, - "login": "MTR1000", - "password": "abc1234", - "password_type": "main" + "mt5_password_check": 1, + "login": "MTR1000", + "password": "abc1234", + "password_type": "main" } diff --git a/config/v3/mt5_password_check/receive.json b/config/v3/mt5_password_check/receive.json index b354b057..d7016bb0 100644 --- a/config/v3/mt5_password_check/receive.json +++ b/config/v3/mt5_password_check/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Check (response)", - "description": "MT5 user password check receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_password_check": { - "title": "mt5_password_check", - "description": "`1` on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["mt5_password_check"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Check (response)", + "description": "MT5 user password check receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_password_check": { + "title": "mt5_password_check", + "description": "`1` on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_password_check" + ] + }, + "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/mt5_password_check/send.json b/config/v3/mt5_password_check/send.json index ba974b54..2649c0f9 100644 --- a/config/v3/mt5_password_check/send.json +++ b/config/v3/mt5_password_check/send.json @@ -1,42 +1,54 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_password_reset/example.json b/config/v3/mt5_password_reset/example.json index 4aafc355..f93e647d 100644 --- a/config/v3/mt5_password_reset/example.json +++ b/config/v3/mt5_password_reset/example.json @@ -1,7 +1,7 @@ { - "mt5_password_reset": 1, - "login": "MTD1000", - "new_password": "C0rrect_p4ssword", - "password_type": "main", - "verification_code": "O8eZ2xMq" + "mt5_password_reset": 1, + "login": "MTD1000", + "new_password": "C0rrect_p4ssword", + "password_type": "main", + "verification_code": "O8eZ2xMq" } diff --git a/config/v3/mt5_password_reset/receive.json b/config/v3/mt5_password_reset/receive.json index 1c3eac47..46c4e2cb 100644 --- a/config/v3/mt5_password_reset/receive.json +++ b/config/v3/mt5_password_reset/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Password Reset (response)", - "description": "MT5 user password reset receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_password_reset": { - "title": "mt5_password_reset", - "description": "`1` on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["mt5_password_reset"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Password Reset (response)", + "description": "MT5 user password reset receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_password_reset": { + "title": "mt5_password_reset", + "description": "`1` on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_password_reset" + ] + }, + "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/mt5_password_reset/send.json b/config/v3/mt5_password_reset/send.json index 27bffd49..3053fb53 100644 --- a/config/v3/mt5_password_reset/send.json +++ b/config/v3/mt5_password_reset/send.json @@ -1,47 +1,60 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/mt5_withdrawal/example.json b/config/v3/mt5_withdrawal/example.json index d1a20d07..bf00c422 100644 --- a/config/v3/mt5_withdrawal/example.json +++ b/config/v3/mt5_withdrawal/example.json @@ -1,6 +1,6 @@ { - "mt5_withdrawal": 1, - "amount": 1000, - "from_mt5": "MTR1000", - "to_binary": "CR100001" + "mt5_withdrawal": 1, + "amount": 1000, + "from_mt5": "MTR1000", + "to_binary": "CR100001" } diff --git a/config/v3/mt5_withdrawal/receive.json b/config/v3/mt5_withdrawal/receive.json index f232b0ed..9586a2af 100644 --- a/config/v3/mt5_withdrawal/receive.json +++ b/config/v3/mt5_withdrawal/receive.json @@ -1,31 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "MT5: Withdrawal (response)", - "description": "The result of MT5 withdrawal request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "mt5_withdrawal": { - "title": "mt5_withdrawal", - "description": "`1` on success", - "type": "integer" - }, - "binary_transaction_id": { - "description": "Deposit reference ID of Binary account.", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["mt5_withdrawal"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "MT5: Withdrawal (response)", + "description": "The result of MT5 withdrawal request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "mt5_withdrawal": { + "title": "mt5_withdrawal", + "description": "`1` on success", + "type": "integer" + }, + "binary_transaction_id": { + "description": "Deposit reference ID of Binary account.", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "mt5_withdrawal" + ] + }, + "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/mt5_withdrawal/send.json b/config/v3/mt5_withdrawal/send.json index dbf61948..4ef180e1 100644 --- a/config/v3/mt5_withdrawal/send.json +++ b/config/v3/mt5_withdrawal/send.json @@ -1,39 +1,49 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_maltainvest/example.json b/config/v3/new_account_maltainvest/example.json index b6c709b1..65a5a1d7 100644 --- a/config/v3/new_account_maltainvest/example.json +++ b/config/v3/new_account_maltainvest/example.json @@ -1,42 +1,42 @@ { - "new_account_maltainvest": 1, - "accept_risk": 1, - "account_opening_reason": "Speculative", - "account_turnover": "Less than $25,000", - "address_city": "Melbourne", - "address_line_1": "20 Broadway Av", - "address_line_2": "East Melbourne VIC", - "address_postcode": "3002", - "address_state": "berlin", - "cfd_experience": "Less than a year", - "cfd_frequency": "1 - 5 transactions in the past 12 months", - "cfd_trading_definition": "Speculate on the price movement.", - "citizen": "de", - "date_of_birth": "1980-01-31", - "education_level": "Secondary", - "employment_industry": "Finance", - "employment_status": "Self-Employed", - "estimated_worth": "$100,000 - $250,000", - "first_name": "Peter", - "income_source": "Self-Employed", - "last_name": "Pan", - "leverage_impact_trading": "Leverage lets you open larger positions for a fraction of the trade's value.", - "leverage_trading_high_risk_stop_loss": "Close your trade automatically when the loss is more than or equal to a specific amount.", - "net_income": "$25,000 - $50,000", - "non_pep_declaration": 1, - "occupation": "Managers", - "phone": "+6123456789", - "place_of_birth": "nl", - "required_initial_margin": "When opening a Leveraged CFD trade.", - "residence": "de", - "risk_tolerance": "Yes", - "salutation": "Mr", - "secret_answer": "Jones", - "secret_question": "Mother's maiden name", - "source_of_experience": "I trade forex CFDs and other complex financial instruments.", - "source_of_wealth": "Company Ownership", - "tax_identification_number": "111-222-333", - "tax_residence": "de,nl", - "trading_experience_financial_instruments": "Less than a year", - "trading_frequency_financial_instruments": "1 - 5 transactions in the past 12 months" + "new_account_maltainvest": 1, + "accept_risk": 1, + "account_opening_reason": "Speculative", + "account_turnover": "Less than $25,000", + "address_city": "Melbourne", + "address_line_1": "20 Broadway Av", + "address_line_2": "East Melbourne VIC", + "address_postcode": "3002", + "address_state": "berlin", + "cfd_experience": "Less than a year", + "cfd_frequency": "1 - 5 transactions in the past 12 months", + "cfd_trading_definition": "Speculate on the price movement.", + "citizen": "de", + "date_of_birth": "1980-01-31", + "education_level": "Secondary", + "employment_industry": "Finance", + "employment_status": "Self-Employed", + "estimated_worth": "$100,000 - $250,000", + "first_name": "Peter", + "income_source": "Self-Employed", + "last_name": "Pan", + "leverage_impact_trading": "Leverage lets you open larger positions for a fraction of the trade's value.", + "leverage_trading_high_risk_stop_loss": "Close your trade automatically when the loss is more than or equal to a specific amount.", + "net_income": "$25,000 - $50,000", + "non_pep_declaration": 1, + "occupation": "Managers", + "phone": "+6123456789", + "place_of_birth": "nl", + "required_initial_margin": "When opening a Leveraged CFD trade.", + "residence": "de", + "risk_tolerance": "Yes", + "salutation": "Mr", + "secret_answer": "Jones", + "secret_question": "Mother's maiden name", + "source_of_experience": "I trade forex CFDs and other complex financial instruments.", + "source_of_wealth": "Company Ownership", + "tax_identification_number": "111-222-333", + "tax_residence": "de,nl", + "trading_experience_financial_instruments": "Less than a year", + "trading_frequency_financial_instruments": "1 - 5 transactions in the past 12 months" } diff --git a/config/v3/new_account_maltainvest/receive.json b/config/v3/new_account_maltainvest/receive.json index 4764077c..54c88cf2 100644 --- a/config/v3/new_account_maltainvest/receive.json +++ b/config/v3/new_account_maltainvest/receive.json @@ -1,51 +1,60 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Real-Money Account: Deriv Investment (Europe) Ltd (response)", - "description": "Create maltainvest account Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "new_account_maltainvest": { - "title": "new_account_maltainvest", - "description": "New `maltainvest` account details", - "type": "object", - "additionalProperties": false, - "required": ["client_id", "landing_company", "oauth_token"], - "properties": { - "client_id": { - "description": "Client ID of new `maltainvest` account", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Real-Money Account: Deriv Investment (Europe) Ltd (response)", + "description": "Create maltainvest account Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "new_account_maltainvest": { + "title": "new_account_maltainvest", + "description": "New `maltainvest` account details", + "type": "object", + "additionalProperties": false, + "required": [ + "client_id", + "landing_company", + "oauth_token" + ], + "properties": { + "client_id": { + "description": "Client ID of new `maltainvest` account", + "type": "string" + }, + "landing_company": { + "description": "Landing company full name", + "type": "string" + }, + "landing_company_short": { + "description": "Landing company shortcode", + "type": "string" + }, + "landing_company_shortcode": { + "description": "Landing company shortcode", + "type": "string" + }, + "oauth_token": { + "description": "OAuth token for client's login session", + "type": "string" + } + } }, - "landing_company": { - "description": "Landing company full name", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "landing_company_short": { - "description": "Landing company shortcode", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "new_account_maltainvest" + ] }, - "landing_company_shortcode": { - "description": "Landing company shortcode", - "type": "string" - }, - "oauth_token": { - "description": "OAuth token for client's login session", - "type": "string" + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["new_account_maltainvest"] - }, - "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/new_account_maltainvest/send.json b/config/v3/new_account_maltainvest/send.json index 7e4ce15e..618620a1 100644 --- a/config/v3/new_account_maltainvest/send.json +++ b/config/v3/new_account_maltainvest/send.json @@ -1,364 +1,410 @@ { - "$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"] - }, - "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" - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_real/example.json b/config/v3/new_account_real/example.json index b5849e57..98a49ba6 100644 --- a/config/v3/new_account_real/example.json +++ b/config/v3/new_account_real/example.json @@ -1,22 +1,22 @@ { - "new_account_real": 1, - "account_opening_reason": "Speculative", - "account_turnover": "Less than $25,000", - "address_city": "Melbourne", - "address_line_1": "20 Broadway Av", - "address_line_2": "East Melbourne VIC", - "address_postcode": "3002", - "address_state": "Victoria", - "date_of_birth": "1980-01-31", - "first_name": "Peter", - "last_name": "Pan", - "non_pep_declaration": 1, - "phone": "+6123456789", - "place_of_birth": "id", - "residence": "au", - "salutation": "Mr", - "secret_answer": "Jones", - "secret_question": "Mother's maiden name", - "tax_identification_number": "012142545", - "tax_residence": "ar,sg" + "new_account_real": 1, + "account_opening_reason": "Speculative", + "account_turnover": "Less than $25,000", + "address_city": "Melbourne", + "address_line_1": "20 Broadway Av", + "address_line_2": "East Melbourne VIC", + "address_postcode": "3002", + "address_state": "Victoria", + "date_of_birth": "1980-01-31", + "first_name": "Peter", + "last_name": "Pan", + "non_pep_declaration": 1, + "phone": "+6123456789", + "place_of_birth": "id", + "residence": "au", + "salutation": "Mr", + "secret_answer": "Jones", + "secret_question": "Mother's maiden name", + "tax_identification_number": "012142545", + "tax_residence": "ar,sg" } diff --git a/config/v3/new_account_real/receive.json b/config/v3/new_account_real/receive.json index bea77fb3..32a7ea98 100644 --- a/config/v3/new_account_real/receive.json +++ b/config/v3/new_account_real/receive.json @@ -1,55 +1,64 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Real-Money Account: Default Landing Company (response)", - "description": "Create real account Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "new_account_real": { - "title": "new_account_real", - "description": "New real money account details", - "type": "object", - "additionalProperties": false, - "required": ["client_id", "landing_company", "oauth_token"], - "properties": { - "client_id": { - "description": "Client ID of new real money account", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Real-Money Account: Default Landing Company (response)", + "description": "Create real account Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "new_account_real": { + "title": "new_account_real", + "description": "New real money account details", + "type": "object", + "additionalProperties": false, + "required": [ + "client_id", + "landing_company", + "oauth_token" + ], + "properties": { + "client_id": { + "description": "Client ID of new real money account", + "type": "string" + }, + "currency": { + "description": "Currency of an account", + "type": "string" + }, + "landing_company": { + "description": "Landing company full name", + "type": "string" + }, + "landing_company_short": { + "description": "Landing company shortcode", + "type": "string" + }, + "landing_company_shortcode": { + "description": "Landing company shortcode", + "type": "string" + }, + "oauth_token": { + "description": "OAuth token for client's login session", + "type": "string" + } + } }, - "currency": { - "description": "Currency of an account", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "landing_company": { - "description": "Landing company full name", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "new_account_real" + ] }, - "landing_company_short": { - "description": "Landing company shortcode", - "type": "string" - }, - "landing_company_shortcode": { - "description": "Landing company shortcode", - "type": "string" - }, - "oauth_token": { - "description": "OAuth token for client's login session", - "type": "string" + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["new_account_real"] - }, - "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/new_account_real/send.json b/config/v3/new_account_real/send.json index 796e2fa3..cc9077f0 100644 --- a/config/v3/new_account_real/send.json +++ b/config/v3/new_account_real/send.json @@ -1,162 +1,188 @@ { - "$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"] - }, - "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})*$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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})*$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/new_account_virtual/example.json b/config/v3/new_account_virtual/example.json index 1b9b8aeb..d5818c7a 100644 --- a/config/v3/new_account_virtual/example.json +++ b/config/v3/new_account_virtual/example.json @@ -1,7 +1,7 @@ { - "new_account_virtual": 1, - "type": "trading", - "client_password": "C0rrect_p4ssword", - "residence": "id", - "verification_code": "uoJvVuQ6" + "new_account_virtual": 1, + "type": "trading", + "client_password": "C0rrect_p4ssword", + "residence": "id", + "verification_code": "uoJvVuQ6" } diff --git a/config/v3/new_account_virtual/receive.json b/config/v3/new_account_virtual/receive.json index 64588fe8..8d610beb 100644 --- a/config/v3/new_account_virtual/receive.json +++ b/config/v3/new_account_virtual/receive.json @@ -1,60 +1,74 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Virtual-Money Account (response)", - "description": "Create virtual-money account", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "new_account_virtual": { - "title": "new_account_virtual", - "description": "New virtual-money account details", - "type": "object", - "additionalProperties": false, - "required": ["balance", "client_id", "currency", "email", "oauth_token"], - "properties": { - "balance": { - "description": "Account balance", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Virtual-Money Account (response)", + "description": "Create virtual-money account", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "new_account_virtual": { + "title": "new_account_virtual", + "description": "New virtual-money account details", + "type": "object", + "additionalProperties": false, + "required": [ + "balance", + "client_id", + "currency", + "email", + "oauth_token" + ], + "properties": { + "balance": { + "description": "Account balance", + "type": "number" + }, + "client_id": { + "description": "ID of the new virtual-money account", + "type": "string" + }, + "currency": { + "description": "Account currency", + "type": "string" + }, + "email": { + "description": "Email of the new virtual-money account", + "type": "string" + }, + "oauth_token": { + "description": "Oauth token for the client's login session (so that the user may be logged in immediately)", + "type": "string" + }, + "refresh_token": { + "description": "Refresh token to perform PTA, only for the first ever created account", + "type": "string" + }, + "type": { + "description": "Account type", + "type": "string", + "enum": [ + "trading", + "wallet" + ] + } + } }, - "client_id": { - "description": "ID of the new virtual-money account", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "currency": { - "description": "Account currency", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "new_account_virtual" + ] }, - "email": { - "description": "Email of the new virtual-money account", - "type": "string" - }, - "oauth_token": { - "description": "Oauth token for the client's login session (so that the user may be logged in immediately)", - "type": "string" - }, - "refresh_token": { - "description": "Refresh token to perform PTA, only for the first ever created account", - "type": "string" - }, - "type": { - "description": "Account type", - "type": "string", - "enum": ["trading", "wallet"] + "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": ["new_account_virtual"] - }, - "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/new_account_virtual/send.json b/config/v3/new_account_virtual/send.json index d7e495f7..094c1525 100644 --- a/config/v3/new_account_virtual/send.json +++ b/config/v3/new_account_virtual/send.json @@ -1,215 +1,229 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "New Virtual-Money Account (request)", - "description": "Create a new virtual-money account.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["new_account_virtual"], - "properties": { - "new_account_virtual": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "affiliate_token": { - "description": "[Optional] Affiliate token, within 32 characters.", - "type": "string", - "pattern": "^[\\w-]{0,32}$" - }, - "client_password": { - "description": "Password (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).", - "type": "string", - "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", - "sensitive": 1 - }, - "date_first_contact": { - "description": "[Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" - }, - "email_consent": { - "description": "[Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.", - "type": "integer", - "enum": [1, 0] - }, - "gclid_url": { - "description": "[Optional] Google Click Identifier to track source.", - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - "residence": { - "description": "2-letter country code (obtained from `residence_list` call).", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "signup_device": { - "description": "[Optional] Show whether user has used mobile or desktop.", - "type": "string", - "enum": ["desktop", "mobile"] - }, - "type": { - "description": "Account type", - "type": "string", - "default": "trading", - "enum": ["trading", "wallet"] - }, - "utm_ad_id": { - "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adgroup_id": { - "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_adrollclk_id": { - "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign": { - "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign_id": { - "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_content": { - "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_fbcl_id": { - "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_gl_client_id": { - "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "New Virtual-Money Account (request)", + "description": "Create a new virtual-money account.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "new_account_virtual" + ], + "properties": { + "new_account_virtual": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "client_password": { + "description": "Password (Accepts any printable ASCII character. Must be within 8-25 characters, and include numbers, lowercase and uppercase letters. Must not be the same as the user's email address).", + "type": "string", + "pattern": "^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{8,25}$", + "sensitive": 1 + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: `yyyy-mm-dd` in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "email_consent": { + "description": "[Optional] Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "residence": { + "description": "2-letter country code (obtained from `residence_list` call).", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "type": { + "description": "Account type", + "type": "string", + "default": "trading", + "enum": [ + "trading", + "wallet" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "verification_code": { + "description": "Email verification code (received from a `verify_email` call, which must be done first).", + "type": "string", + "pattern": "^\\w{8,128}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "verification_code": { - "description": "Email verification code (received from a `verify_email` call, which must be done first).", - "type": "string", - "pattern": "^\\w{8,128}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/oauth_apps/example.json b/config/v3/oauth_apps/example.json index d3bf0247..fb1dd63f 100644 --- a/config/v3/oauth_apps/example.json +++ b/config/v3/oauth_apps/example.json @@ -1,3 +1,3 @@ { - "oauth_apps": 1 + "oauth_apps": 1 } diff --git a/config/v3/oauth_apps/receive.json b/config/v3/oauth_apps/receive.json index 421b365d..e5a0e0b4 100644 --- a/config/v3/oauth_apps/receive.json +++ b/config/v3/oauth_apps/receive.json @@ -1,58 +1,81 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "OAuth Applications (response)", - "description": "A message with used applications", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "oauth_apps": { - "title": "oauth_apps", - "description": "List of OAuth applications that used for the authorized account.", - "type": "array", - "items": { - "title": "Application object", - "type": "object", - "additionalProperties": false, - "required": ["app_id", "app_markup_percentage", "last_used", "name", "scopes"], - "properties": { - "app_id": { - "description": "Application ID.", - "type": "integer" - }, - "app_markup_percentage": { - "description": "Markup added to contract prices (as a percentage of contract payout)", - "type": "number" - }, - "last_used": { - "description": "The last date which the application has been used.", - "type": ["null", "string"] - }, - "name": { - "description": "Application name", - "type": "string" - }, - "scopes": { - "description": "The list of permission scopes grant for each app.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "OAuth Applications (response)", + "description": "A message with used applications", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "oauth_apps": { + "title": "oauth_apps", + "description": "List of 3rd party OAuth applications that used for the authorized account.", "type": "array", "items": { - "type": "string" + "title": "Application object", + "type": "object", + "additionalProperties": false, + "required": [ + "app_id", + "app_markup_percentage", + "last_used", + "name", + "official", + "scopes" + ], + "properties": { + "app_id": { + "description": "Application ID.", + "type": "integer" + }, + "app_markup_percentage": { + "description": "Markup added to contract prices (as a percentage of contract payout)", + "type": "number" + }, + "last_used": { + "description": "The last date which the application has been used.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "Application name", + "type": "string" + }, + "official": { + "description": "Boolean value: 1 or 0, indicating 1 if app is an official app and 0 incase of unofficial app", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "scopes": { + "description": "The list of permission scopes grant for each app.", + "type": "array", + "items": { + "type": "string" + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "oauth_apps" + ] + }, + "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": ["oauth_apps"] - }, - "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/oauth_apps/send.json b/config/v3/oauth_apps/send.json index 813c7be7..56ba2b1f 100644 --- a/config/v3/oauth_apps/send.json +++ b/config/v3/oauth_apps/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_create/example.json b/config/v3/p2p_advert_create/example.json index 900bf65f..3700b13b 100644 --- a/config/v3/p2p_advert_create/example.json +++ b/config/v3/p2p_advert_create/example.json @@ -1,10 +1,10 @@ { - "p2p_advert_create": 1, - "description": "Please transfer to account number 1234", - "type": "buy", - "amount": 100, - "max_order_amount": 50, - "min_order_amount": 20, - "payment_method": "bank_transfer", - "rate": 4.25 + "p2p_advert_create": 1, + "description": "Please transfer to account number 1234", + "type": "buy", + "amount": 100, + "max_order_amount": 50, + "min_order_amount": 20, + "payment_method": "bank_transfer", + "rate": 4.25 } diff --git a/config/v3/p2p_advert_create/receive.json b/config/v3/p2p_advert_create/receive.json index 3fe4aff2..deec48a9 100644 --- a/config/v3/p2p_advert_create/receive.json +++ b/config/v3/p2p_advert_create/receive.json @@ -1,397 +1,485 @@ { - "$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", - "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", - "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" - }, - "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" - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Create (response)", + "description": "Returns the information of the created P2P (Peer to Peer) advert.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_create": { + "title": "p2p_advert_create", + "description": "The information of the created P2P advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "active_orders", + "advertiser_details", + "amount", + "amount_display", + "block_trade", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount", + "max_order_amount_display", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount", + "min_order_amount_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "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" + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`.", + "type": "number" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", + "type": "string" + }, + "is_active": { + "description": "The activation status of the advert.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_visible": { + "description": "Indicates that this advert will appear on the main advert list.", + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + }, + "local_currency": { + "description": "Local currency for this advert. This is the form of payment to be arranged directly between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "max_order_amount": { + "description": "Maximum order amount specified in advert, in `account_currency`.", + "type": "number" + }, + "max_order_amount_display": { + "description": "Maximum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "max_order_amount_limit": { + "description": "Maximum order amount at this time, in `account_currency`.", + "type": "number" + }, + "max_order_amount_limit_display": { + "description": "Maximum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount specified in advert, in `account_currency`.", + "type": "number" + }, + "min_order_amount_display": { + "description": "Minimum order amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "min_order_amount_limit": { + "description": "Minimum order amount at this time, in `account_currency`.", + "type": "number" + }, + "min_order_amount_limit_display": { + "description": "Minimum order amount at this time, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", "type": "string" - } + }, + "type": { + "description": "The type of advertisement in relation to the advertiser's Deriv account.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "type": { - "description": "The type of advertisement in relation to the advertiser's Deriv account.", - "type": "string", - "enum": ["buy", "sell"] - }, - "visibility_status": { - "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_create" ] - } + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_create"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_create/send.json b/config/v3/p2p_advert_create/send.json index a695bc9a..6b198259 100644 --- a/config/v3/p2p_advert_create/send.json +++ b/config/v3/p2p_advert_create/send.json @@ -1,110 +1,132 @@ { - "$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 - }, - "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 - }, - "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.", - "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 + }, + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_info/example.json b/config/v3/p2p_advert_info/example.json index 5ba4aaf1..8a7612af 100644 --- a/config/v3/p2p_advert_info/example.json +++ b/config/v3/p2p_advert_info/example.json @@ -1,4 +1,4 @@ { - "p2p_advert_info": 1, - "id": "1234" + "p2p_advert_info": 1, + "id": "1234" } diff --git a/config/v3/p2p_advert_info/receive.json b/config/v3/p2p_advert_info/receive.json index 423fcd44..e4571e0c 100644 --- a/config/v3/p2p_advert_info/receive.json +++ b/config/v3/p2p_advert_info/receive.json @@ -1,401 +1,507 @@ { - "$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" - }, - "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" - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Information (response)", + "description": "Returns information about the given advert ID.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_info": { + "title": "p2p_advert_info", + "description": "P2P advert information.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_blocked": { + "description": "Indicates that the advertiser is blocked by the current user.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_favourite": { + "description": "Indicates that the advertiser is a favourite of the current user.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "last_name": { + "description": "The advertiser's last name.", + "type": "string", + "sensitive": 1 }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 + }, + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'. ", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "days_until_archive": { + "description": "Days until automatic inactivation of this ad, if no activity occurs.", + "type": "integer" + }, + "deleted": { + "description": "Indicates that the advert has been deleted.", + "type": "integer", + "enum": [ + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "effective_rate": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable.", + "type": [ + "null", + "number" + ] + }, + "effective_rate_display": { + "description": "Conversion rate from account currency to local currency, using current market rate if applicable, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "id": { + "description": "The unique identifier for this advert.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "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" + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates whether method is enabled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`. It is only visible for advertisers.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`. It is only visible for advertisers.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + } + } }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "visibility_status": { - "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_info" ] - } - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_info"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_info/send.json b/config/v3/p2p_advert_info/send.json index 3f9aa919..1788f142 100644 --- a/config/v3/p2p_advert_info/send.json +++ b/config/v3/p2p_advert_info/send.json @@ -1,41 +1,53 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_list/example.json b/config/v3/p2p_advert_list/example.json index 5b8c2b90..9df69c47 100644 --- a/config/v3/p2p_advert_list/example.json +++ b/config/v3/p2p_advert_list/example.json @@ -1,4 +1,4 @@ { - "p2p_advert_list": 1, - "counterparty_type": "buy" + "p2p_advert_list": 1, + "counterparty_type": "buy" } diff --git a/config/v3/p2p_advert_list/receive.json b/config/v3/p2p_advert_list/receive.json index 44515bd0..fa82bdb4 100644 --- a/config/v3/p2p_advert_list/receive.json +++ b/config/v3/p2p_advert_list/receive.json @@ -1,331 +1,412 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advert List (response)", - "description": "Available adverts matching the requested criteria.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advert_list": { - "title": "p2p_advert_list", - "description": "P2P adverts list.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of adverts.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert List (response)", + "description": "Available adverts matching the requested criteria.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_list": { + "title": "p2p_advert_list", + "description": "P2P adverts list.", "type": "object", "additionalProperties": false, "required": [ - "account_currency", - "advertiser_details", - "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", - "payment_method", - "price", - "price_display", - "rate", - "rate_display", - "rate_type", - "type" + "list" ], "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_blocked": { - "description": "Indicates that the advertiser is blocked by the current user.", - "type": "integer", - "enum": [0] - }, - "is_favourite": { - "description": "Indicates that the advertiser is a favourite.", - "type": "integer", - "enum": [0, 1] - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates that the advertiser was recommended in the most recent review by the current user.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["null", "number"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } + "list": { + "description": "List of adverts.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advertiser_details", + "block_trade", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "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" + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`. It is only visible to the advert owner.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", + "type": "string" + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible, only visible to the advert owner. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } + } + } + } } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`. It is only visible to the advert owner.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places. It is only visible to the advert owner.", - "type": "string" - }, - "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" - }, - "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_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_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 7fc11915..1dc5b84f 100644 --- a/config/v3/p2p_advert_list/send.json +++ b/config/v3/p2p_advert_list/send.json @@ -1,84 +1,115 @@ { - "$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" - }, - "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 - }, - "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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advert_update/example.json b/config/v3/p2p_advert_update/example.json index 4b66fdad..52365b19 100644 --- a/config/v3/p2p_advert_update/example.json +++ b/config/v3/p2p_advert_update/example.json @@ -1,5 +1,5 @@ { - "p2p_advert_update": 1, - "id": 1234, - "is_active": 0 + "p2p_advert_update": 1, + "id": 1234, + "is_active": 0 } diff --git a/config/v3/p2p_advert_update/receive.json b/config/v3/p2p_advert_update/receive.json index 4d79933a..fd916ca8 100644 --- a/config/v3/p2p_advert_update/receive.json +++ b/config/v3/p2p_advert_update/receive.json @@ -1,373 +1,464 @@ { - "$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" - }, - "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" - }, - "payment_info": { - "description": "Payment instructions. Only applicable for 'sell adverts'.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Payment method name (deprecated).", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods (sell adverts only).", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": [ - "fields", - "is_enabled", - "method", - "type", - "used_by_adverts", - "used_by_orders" - ], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method fields.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type", "value"], - "properties": { - "display_name": { - "description": "Display name of payment method field.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advert Update (response)", + "description": "Returns information about the updated advert.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advert_update": { + "title": "p2p_advert_update", + "description": "P2P updated advert information.", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "account_currency": { + "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "active_orders": { + "description": "The number of active orders against this advert.", + "type": "integer" + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this advert.", + "type": "object", + "additionalProperties": false, + "required": [ + "completed_orders_count", + "id", + "is_online", + "last_online_time", + "name", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "total_completion_rate" + ], + "properties": { + "completed_orders_count": { + "description": "The total number of orders completed in the past 30 days.", + "type": "integer" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "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" + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 }, - "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "rating_average": { + "description": "Average rating of the advertiser, range is 1-5.", + "type": [ + "null", + "number" + ], + "maximum": 5, + "minimum": 1 }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 1 + "rating_count": { + "description": "Number of ratings given to the advertiser.", + "type": "integer" + }, + "recommended_average": { + "description": "Percentage of users who have recommended the advertiser.", + "type": [ + "null", + "number" + ] + }, + "recommended_count": { + "description": "Number of times the advertiser has been recommended.", + "type": [ + "integer", + "null" + ] + }, + "total_completion_rate": { + "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", + "type": [ + "null", + "number" + ] } - } } - } }, - "is_enabled": { - "description": "Indicates if this method is available on adverts.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The total amount specified in advert, in `account_currency`.", + "type": "number" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "amount_display": { + "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] - }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "contact_info": { + "description": "Advertiser contact information. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "counterparty_type": { + "description": "Type of transaction from the opposite party's perspective.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "country": { + "description": "The target country code of the advert.", + "type": "string", + "pattern": "^[a-z]{0,2}$" + }, + "created_time": { + "description": "The advert creation time in epoch.", + "type": "integer" + }, + "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" + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods (sell adverts only).", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type", + "used_by_adverts", + "used_by_orders" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method fields.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type", + "value" + ], + "properties": { + "display_name": { + "description": "Display name of payment method field.", + "type": "string" + }, + "required": { + "description": "Is field required or optional.", + "type": "integer" + }, + "type": { + "description": "Field type.", + "type": "string", + "enum": [ + "text", + "memo" + ] + }, + "value": { + "description": "Current value of payment method field.", + "type": "string", + "sensitive": 1 + } + } + } + } + }, + "is_enabled": { + "description": "Indicates if this method is available on adverts.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "method": { + "description": "Payment method identifier.", + "type": "string" + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + }, + "used_by_adverts": { + "description": "IDs of adverts that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "used_by_orders": { + "description": "IDs of orders that use this payment method.", + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + } + } + } + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", "type": "string" - } + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost of the advert in local currency.", - "type": ["null", "number"] - }, - "price_display": { - "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", - "type": ["null", "string"] - }, - "rate": { - "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", - "type": "number" }, - "rate_display": { - "description": "Conversion rate formatted to appropriate decimal places.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "rate_type": { - "description": "Type of rate, fixed or floating.", - "type": "string", - "enum": ["fixed", "float"] - }, - "remaining_amount": { - "description": "Amount currently available for orders, in `account_currency`.", - "type": "number" - }, - "remaining_amount_display": { - "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "type": { - "description": "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_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", - "type": "array", - "items": { + "msg_type": { + "description": "Action name of the request made.", "type": "string", "enum": [ - "advert_inactive", - "advert_max_limit", - "advert_min_limit", - "advert_remaining", - "advertiser_ads_paused", - "advertiser_approval", - "advertiser_balance", - "advertiser_daily_limit", - "advertiser_temp_ban" + "p2p_advert_update" ] - } + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advert_update"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advert_update/send.json b/config/v3/p2p_advert_update/send.json index 9bc92027..dc8ef038 100644 --- a/config/v3/p2p_advert_update/send.json +++ b/config/v3/p2p_advert_update/send.json @@ -1,107 +1,126 @@ { - "$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 - }, - "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.", - "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 + }, + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_adverts/example.json b/config/v3/p2p_advertiser_adverts/example.json index 306888b0..af2e8ad8 100644 --- a/config/v3/p2p_advertiser_adverts/example.json +++ b/config/v3/p2p_advertiser_adverts/example.json @@ -1,3 +1,3 @@ { - "p2p_advertiser_adverts": 1 + "p2p_advertiser_adverts": 1 } diff --git a/config/v3/p2p_advertiser_adverts/receive.json b/config/v3/p2p_advertiser_adverts/receive.json index 63dfe760..45c55bba 100644 --- a/config/v3/p2p_advertiser_adverts/receive.json +++ b/config/v3/p2p_advertiser_adverts/receive.json @@ -1,326 +1,395 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Adverts (response)", - "description": "All adverts belonging to the current advertiser.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_adverts": { - "title": "p2p_advertiser_adverts", - "description": "List of the P2P advertiser adverts.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of advertiser adverts.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Adverts (response)", + "description": "All adverts belonging to the current advertiser.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_adverts": { + "title": "p2p_advertiser_adverts", + "description": "List of the P2P advertiser adverts.", "type": "object", "additionalProperties": false, "required": [ - "account_currency", - "active_orders", - "advertiser_details", - "amount", - "amount_display", - "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", - "payment_info", - "payment_method", - "price", - "price_display", - "rate", - "rate_display", - "rate_type", - "remaining_amount", - "remaining_amount_display", - "type" + "list" ], "properties": { - "account_currency": { - "description": "Currency for this advert. This is the system currency to be transferred between advertiser and client.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "active_orders": { - "description": "The number of active orders against this advert.", - "type": "integer" - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this advert.", - "type": "object", - "additionalProperties": false, - "required": [ - "completed_orders_count", - "id", - "is_online", - "last_online_time", - "name", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "total_completion_rate" - ], - "properties": { - "completed_orders_count": { - "description": "The total number of orders completed in the past 30 days.", - "type": "integer" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The advertiser's unique identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The advertiser's last name.", - "type": "string", - "sensitive": 1 - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "rating_average": { - "description": "Average rating of the advertiser, range is 1-5.", - "type": ["null", "number"], - "maximum": 5, - "minimum": 1 - }, - "rating_count": { - "description": "Number of ratings given to the advertiser.", - "type": "integer" - }, - "recommended_average": { - "description": "Percentage of users who have recommended the advertiser.", - "type": ["null", "number"] - }, - "recommended_count": { - "description": "Number of times the advertiser has been recommended.", - "type": ["integer", "null"] - }, - "total_completion_rate": { - "description": "The percentage of successfully completed orders made by or placed against the advertiser within the past 30 days.", - "type": ["null", "number"] - } + "list": { + "description": "List of advertiser adverts.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "active_orders", + "advertiser_details", + "amount", + "amount_display", + "block_trade", + "contact_info", + "counterparty_type", + "country", + "created_time", + "description", + "effective_rate", + "effective_rate_display", + "id", + "is_active", + "is_visible", + "local_currency", + "max_order_amount", + "max_order_amount_display", + "max_order_amount_limit", + "max_order_amount_limit_display", + "min_order_amount", + "min_order_amount_display", + "min_order_amount_limit", + "min_order_amount_limit_display", + "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" + }, + "payment_info": { + "description": "Payment instructions. Only applicable for 'sell adverts'.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Payment method name (deprecated).", + "type": [ + "null", + "string" + ] + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost of the advert in local currency.", + "type": [ + "null", + "number" + ] + }, + "price_display": { + "description": "Cost of the advert in local currency, formatted to appropriate decimal places.", + "type": [ + "null", + "string" + ] + }, + "rate": { + "description": "Conversion rate from advertiser's account currency to `local_currency`. An absolute rate value (fixed), or percentage offset from current market rate (floating).", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate formatted to appropriate decimal places.", + "type": "string" + }, + "rate_type": { + "description": "Type of rate, fixed or floating.", + "type": "string", + "enum": [ + "fixed", + "float" + ] + }, + "remaining_amount": { + "description": "Amount currently available for orders, in `account_currency`.", + "type": "number" + }, + "remaining_amount_display": { + "description": "Amount currently available for orders, in `account_currency`, formatted to appropriate decimal places.", + "type": "string" + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "visibility_status": { + "description": "Reasons why an advert is not visible. Possible values: \n- `advert_inactive`: the advert is set inactive. \n- `advert_max_limit`: the minimum order amount exceeds the system maximum order. \n- `advert_min_limit`: the maximum order amount is too small to be shown on the advert list. \n- `advert_remaining`: the remaining amount of the advert is below the minimum order. \n- `advertiser_ads_paused`: the advertiser has paused all adverts. \n- `advertiser_approval`: the advertiser's proof of identity is not verified. \n- `advertiser_balance`: the advertiser's P2P balance is less than the minimum order. \n- `advertiser_block_trade_ineligible`: the advertiser is not currently eligible for block trading. \n- `advertiser_daily_limit`: the advertiser's remaining daily limit is less than the minimum order. \n- `advertiser_temp_ban`: the advertiser is temporarily banned from P2P.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "advert_inactive", + "advert_max_limit", + "advert_min_limit", + "advert_remaining", + "advertiser_ads_paused", + "advertiser_approval", + "advertiser_balance", + "advertiser_block_trade_ineligible", + "advertiser_daily_limit", + "advertiser_temp_ban" + ] + } + } + } + } } - }, - "amount": { - "description": "The total amount specified in advert, in `account_currency`.", - "type": "number" - }, - "amount_display": { - "description": "The total amount specified in advert, in `account_currency`, formatted to appropriate decimal places.", - "type": "string" - }, - "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" - }, - "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_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_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 787ab47a..e26b0f79 100644 --- a/config/v3/p2p_advertiser_adverts/send.json +++ b/config/v3/p2p_advertiser_adverts/send.json @@ -1,35 +1,43 @@ { - "$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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_create/example.json b/config/v3/p2p_advertiser_create/example.json index c4c4507b..6e1a0381 100644 --- a/config/v3/p2p_advertiser_create/example.json +++ b/config/v3/p2p_advertiser_create/example.json @@ -1,4 +1,4 @@ { - "p2p_advertiser_create": 1, - "name": "your_name" + "p2p_advertiser_create": 1, + "name": "your_name" } diff --git a/config/v3/p2p_advertiser_create/receive.json b/config/v3/p2p_advertiser_create/receive.json index 975b49b0..4ff88123 100644 --- a/config/v3/p2p_advertiser_create/receive.json +++ b/config/v3/p2p_advertiser_create/receive.json @@ -1,271 +1,340 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Create (response)", - "description": "Returns information of the created advertiser.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_create": { - "title": "p2p_advertiser_create", - "description": "P2P advertiser information.", - "type": "object", - "additionalProperties": false, - "required": [ - "advert_rates", - "balance_available", - "basic_verification", - "blocked_by_count", - "buy_completion_rate", - "buy_orders_amount", - "buy_orders_count", - "buy_time_avg", - "cancel_time_avg", - "cancels_remaining", - "chat_token", - "chat_user_id", - "contact_info", - "created_time", - "default_advert_description", - "full_verification", - "id", - "is_approved", - "is_listed", - "is_online", - "last_online_time", - "name", - "partner_count", - "payment_info", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "release_time_avg", - "sell_completion_rate", - "sell_orders_amount", - "sell_orders_count", - "show_name", - "total_completion_rate", - "total_orders_count", - "total_turnover" - ], - "properties": { - "advert_rates": { - "description": "Average difference of advert rate compared to the market rate over the past 30 days.", - "type": ["null", "number"] - }, - "balance_available": { - "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", - "type": "number" - }, - "basic_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "blocked_by_count": { - "description": "The number of P2P users who have blocked this advertiser.", - "type": "integer" - }, - "buy_completion_rate": { - "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", - "type": ["null", "number"] - }, - "buy_orders_amount": { - "description": "Buy order volume in the past 30 days.", - "type": "string" - }, - "buy_orders_count": { - "description": "The number of buy order completed within the past 30 days.", - "type": "integer" - }, - "buy_time_avg": { - "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancel_time_avg": { - "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancels_remaining": { - "description": "The number of times the user may cancel orders before being temporarily blocked.", - "type": "integer" - }, - "chat_token": { - "description": "The token to be used for authenticating the client for chat.", - "type": ["null", "string"], - "sensitive": 1 - }, - "chat_user_id": { - "description": "The unique identifier for the chat user.", - "type": ["null", "string"] - }, - "contact_info": { - "description": "Advertiser's contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time that the client became an advertiser.", - "type": "integer" - }, - "daily_buy": { - "description": "Total value of P2P buy transactions in the past 24 hours.", - "type": "string" - }, - "daily_buy_limit": { - "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", - "type": "string" - }, - "daily_sell": { - "description": "Total value of P2P sell transactions in the past 24 hours.", - "type": "string" - }, - "daily_sell_limit": { - "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", - "type": "string" - }, - "default_advert_description": { - "description": "Default description that can be used every time an advert is created.", - "type": "string", - "sensitive": 1 - }, - "full_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "id": { - "description": "The advertiser's identification number.", - "type": "string" - }, - "is_approved": { - "description": "The approval status of the advertiser.", - "type": "integer", - "enum": [0, 1] - }, - "is_listed": { - "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_online_time": { - "description": "Epoch of the latest time the advertiser was online, up to 6 months.", - "type": ["integer", "null"] - }, - "max_order_amount": { - "description": "Maximum order amount for adverts.", - "type": "string" - }, - "min_balance": { - "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount for adverts.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "partner_count": { - "description": "Number of different users the advertiser has traded with since registration.", - "type": "integer" - }, - "payment_info": { - "description": "Advertiser's payment information.", - "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"] - }, - "release_time_avg": { - "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", - "type": ["integer", "null"] - }, - "sell_completion_rate": { - "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", - "type": ["null", "number"] - }, - "sell_orders_amount": { - "description": "Sell order volume in the past 30 days.", - "type": "string" - }, - "sell_orders_count": { - "description": "The number of sell order orders completed within the past 30 days.", - "type": "integer" - }, - "show_name": { - "description": "When `1`, the advertiser's real name will be displayed to other users on adverts and orders.", - "type": "integer", - "enum": [0, 1] - }, - "total_completion_rate": { - "description": "The percentage of completed orders out of all orders within the past 30 days.", - "type": ["null", "number"] - }, - "total_orders_count": { - "description": "The total number of orders completed since advertiser registration.", - "type": "integer" - }, - "total_turnover": { - "description": "Total order volume since advertiser registration.", - "type": "string" - }, - "withdrawal_limit": { - "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", - "type": ["null", "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"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Create (response)", + "description": "Returns information of the created advertiser.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_create": { + "title": "p2p_advertiser_create", + "description": "P2P advertiser information.", + "type": "object", + "additionalProperties": false, + "required": [ + "advert_rates", + "balance_available", + "basic_verification", + "blocked_by_count", + "buy_completion_rate", + "buy_orders_amount", + "buy_orders_count", + "buy_time_avg", + "cancel_time_avg", + "cancels_remaining", + "chat_token", + "chat_user_id", + "contact_info", + "created_time", + "default_advert_description", + "full_verification", + "id", + "is_approved", + "is_listed", + "is_online", + "last_online_time", + "name", + "partner_count", + "payment_info", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "release_time_avg", + "sell_completion_rate", + "sell_orders_amount", + "sell_orders_count", + "show_name", + "total_completion_rate", + "total_orders_count", + "total_turnover" + ], + "properties": { + "advert_rates": { + "description": "Average difference of advert rate compared to the market rate over the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "balance_available": { + "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", + "type": "number" + }, + "basic_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "blocked_by_count": { + "description": "The number of P2P users who have blocked this advertiser.", + "type": "integer" + }, + "buy_completion_rate": { + "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "buy_orders_amount": { + "description": "Buy order volume in the past 30 days.", + "type": "string" + }, + "buy_orders_count": { + "description": "The number of buy order completed within the past 30 days.", + "type": "integer" + }, + "buy_time_avg": { + "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancel_time_avg": { + "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancels_remaining": { + "description": "The number of times the user may cancel orders before being temporarily blocked.", + "type": "integer" + }, + "chat_token": { + "description": "The token to be used for authenticating the client for chat.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "chat_user_id": { + "description": "The unique identifier for the chat user.", + "type": [ + "null", + "string" + ] + }, + "contact_info": { + "description": "Advertiser's contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time that the client became an advertiser.", + "type": "integer" + }, + "daily_buy": { + "description": "Total value of P2P buy transactions in the past 24 hours.", + "type": "string" + }, + "daily_buy_limit": { + "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", + "type": "string" + }, + "daily_sell": { + "description": "Total value of P2P sell transactions in the past 24 hours.", + "type": "string" + }, + "daily_sell_limit": { + "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", + "type": "string" + }, + "default_advert_description": { + "description": "Default description that can be used every time an advert is created.", + "type": "string", + "sensitive": 1 + }, + "full_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "id": { + "description": "The advertiser's identification number.", + "type": "string" + }, + "is_approved": { + "description": "The approval status of the advertiser.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_listed": { + "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_online_time": { + "description": "Epoch of the latest time the advertiser was online, up to 6 months.", + "type": [ + "integer", + "null" + ] + }, + "max_order_amount": { + "description": "Maximum order amount for adverts.", + "type": "string" + }, + "min_balance": { + "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount for adverts.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "partner_count": { + "description": "Number of different users the advertiser has traded with since registration.", + "type": "integer" + }, + "payment_info": { + "description": "Advertiser's payment information.", + "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" + ] + }, + "release_time_avg": { + "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "sell_completion_rate": { + "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "sell_orders_amount": { + "description": "Sell order volume in the past 30 days.", + "type": "string" + }, + "sell_orders_count": { + "description": "The number of sell order orders completed within the past 30 days.", + "type": "integer" + }, + "show_name": { + "description": "When `1`, the advertiser's real name will be displayed to other users on adverts and orders.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "total_completion_rate": { + "description": "The percentage of completed orders out of all orders within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "total_orders_count": { + "description": "The total number of orders completed since advertiser registration.", + "type": "integer" + }, + "total_turnover": { + "description": "Total order volume since advertiser registration.", + "type": "string" + }, + "withdrawal_limit": { + "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", + "type": [ + "null", + "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": [ + "p2p_advertiser_create" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advertiser_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_advertiser_create/send.json b/config/v3/p2p_advertiser_create/send.json index 5a61c996..f8f85bb5 100644 --- a/config/v3/p2p_advertiser_create/send.json +++ b/config/v3/p2p_advertiser_create/send.json @@ -1,54 +1,64 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_info/example.json b/config/v3/p2p_advertiser_info/example.json index 5357cad1..d6e6cc8e 100644 --- a/config/v3/p2p_advertiser_info/example.json +++ b/config/v3/p2p_advertiser_info/example.json @@ -1,3 +1,3 @@ { - "p2p_advertiser_info": 1 + "p2p_advertiser_info": 1 } diff --git a/config/v3/p2p_advertiser_info/receive.json b/config/v3/p2p_advertiser_info/receive.json index 9ecdfb8c..c1d39992 100644 --- a/config/v3/p2p_advertiser_info/receive.json +++ b/config/v3/p2p_advertiser_info/receive.json @@ -1,316 +1,428 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Information (response)", - "description": "Returns information about the given advertiser ID.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_info": { - "title": "p2p_advertiser_info", - "description": "P2P advertiser information.", - "type": "object", - "additionalProperties": false, - "required": [ - "advert_rates", - "basic_verification", - "buy_completion_rate", - "buy_orders_amount", - "buy_orders_count", - "buy_time_avg", - "cancel_time_avg", - "created_time", - "default_advert_description", - "full_verification", - "id", - "is_approved", - "is_listed", - "is_online", - "last_online_time", - "name", - "partner_count", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "release_time_avg", - "sell_completion_rate", - "sell_orders_amount", - "sell_orders_count", - "total_completion_rate", - "total_orders_count", - "total_turnover" - ], - "properties": { - "active_fixed_ads": { - "description": "Number of active fixed rate adverts belonging to the advertiser.", - "type": "integer" - }, - "active_float_ads": { - "description": "Number of active floating rate adverts belonging to the advertiser.", - "type": "integer" - }, - "advert_rates": { - "description": "Average difference of advert rate compared to the market rate over the past 30 days.", - "type": ["null", "number"] - }, - "balance_available": { - "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", - "type": "number" - }, - "basic_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "blocked_by_count": { - "description": "The number of P2P users who have blocked this advertiser.", - "type": "integer" - }, - "blocked_until": { - "description": "If a temporary bar was placed, this is the epoch time at which it will end.", - "type": "integer" - }, - "buy_completion_rate": { - "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", - "type": ["null", "number"] - }, - "buy_orders_amount": { - "description": "Buy order volume in the past 30 days.", - "type": "string" - }, - "buy_orders_count": { - "description": "The number of buy order completed within the past 30 days.", - "type": "integer" - }, - "buy_time_avg": { - "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancel_time_avg": { - "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancels_remaining": { - "description": "The number of times the user may cancel orders before being temporarily blocked.", - "type": "integer" - }, - "chat_token": { - "description": "The token to be used for authenticating the client for chat.", - "type": ["null", "string"], - "sensitive": 1 - }, - "chat_user_id": { - "description": "The unique identifier for the chat user.", - "type": ["null", "string"] - }, - "contact_info": { - "description": "Advertiser's contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time that the client became an advertiser.", - "type": "integer" - }, - "daily_buy": { - "description": "Total value of P2P buy transactions in the past 24 hours.", - "type": "string" - }, - "daily_buy_limit": { - "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", - "type": "string" - }, - "daily_sell": { - "description": "Total value of P2P sell transactions in the past 24 hours.", - "type": "string" - }, - "daily_sell_limit": { - "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", - "type": "string" - }, - "default_advert_description": { - "description": "Default description that can be used every time an advert is created.", - "type": "string", - "sensitive": 1 - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "full_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "id": { - "description": "The advertiser's identification number.", - "type": "string" - }, - "is_approved": { - "description": "The approval status of the advertiser.", - "type": "integer", - "enum": [0, 1] - }, - "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_listed": { - "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", - "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"] - }, - "max_order_amount": { - "description": "Maximum order amount for adverts.", - "type": "string" - }, - "min_balance": { - "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount for adverts.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "partner_count": { - "description": "Number of different users the advertiser has traded with since registration.", - "type": "integer" - }, - "payment_info": { - "description": "Advertiser's payment information.", - "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"] - }, - "release_time_avg": { - "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", - "type": ["integer", "null"] - }, - "sell_completion_rate": { - "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", - "type": ["null", "number"] - }, - "sell_orders_amount": { - "description": "Sell order volume in the past 30 days.", - "type": "string" - }, - "sell_orders_count": { - "description": "The number of sell order orders completed within the past 30 days.", - "type": "integer" - }, - "show_name": { - "description": "When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", - "type": "integer", - "enum": [0, 1] - }, - "total_completion_rate": { - "description": "The percentage of completed orders out of all orders within the past 30 days.", - "type": ["null", "number"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Information (response)", + "description": "Returns information about the given advertiser ID.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_info": { + "title": "p2p_advertiser_info", + "description": "P2P advertiser information.", + "type": "object", + "additionalProperties": false, + "required": [ + "advert_rates", + "basic_verification", + "buy_completion_rate", + "buy_orders_amount", + "buy_orders_count", + "buy_time_avg", + "cancel_time_avg", + "created_time", + "default_advert_description", + "full_verification", + "id", + "is_approved", + "is_listed", + "is_online", + "last_online_time", + "name", + "partner_count", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "release_time_avg", + "sell_completion_rate", + "sell_orders_amount", + "sell_orders_count", + "total_completion_rate", + "total_orders_count", + "total_turnover" + ], + "properties": { + "active_fixed_ads": { + "description": "Number of active fixed rate adverts belonging to the advertiser.", + "type": "integer" + }, + "active_float_ads": { + "description": "Number of active floating rate adverts belonging to the advertiser.", + "type": "integer" + }, + "advert_rates": { + "description": "Average difference of advert rate compared to the market rate over the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "balance_available": { + "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", + "type": "number" + }, + "basic_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "block_trade": { + "description": "Block trading limits, if block trading is allowed.", + "type": "object", + "additionalProperties": false, + "required": [ + "max_order_amount", + "min_order_amount" + ], + "properties": { + "max_order_amount": { + "description": "Maximum order amount for block trade adverts.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount for block trade adverts.", + "type": "string" + } + } + }, + "blocked_by_count": { + "description": "The number of P2P users who have blocked this advertiser.", + "type": "integer" + }, + "blocked_until": { + "description": "If a temporary bar was placed, this is the epoch time at which it will end.", + "type": "integer" + }, + "buy_completion_rate": { + "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "buy_orders_amount": { + "description": "Buy order volume in the past 30 days.", + "type": "string" + }, + "buy_orders_count": { + "description": "The number of buy order completed within the past 30 days.", + "type": "integer" + }, + "buy_time_avg": { + "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancel_time_avg": { + "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancels_remaining": { + "description": "The number of times the user may cancel orders before being temporarily blocked.", + "type": "integer" + }, + "chat_token": { + "description": "The token to be used for authenticating the client for chat.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "chat_user_id": { + "description": "The unique identifier for the chat user.", + "type": [ + "null", + "string" + ] + }, + "contact_info": { + "description": "Advertiser's contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time that the client became an advertiser.", + "type": "integer" + }, + "daily_buy": { + "description": "Total value of P2P buy transactions in the past 24 hours.", + "type": "string" + }, + "daily_buy_limit": { + "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", + "type": "string" + }, + "daily_sell": { + "description": "Total value of P2P sell transactions in the past 24 hours.", + "type": "string" + }, + "daily_sell_limit": { + "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", + "type": "string" + }, + "default_advert_description": { + "description": "Default description that can be used every time an advert is created.", + "type": "string", + "sensitive": 1 + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "full_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "id": { + "description": "The advertiser's identification number.", + "type": "string" + }, + "is_approved": { + "description": "The approval status of the advertiser.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "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_listed": { + "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", + "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" + ] + }, + "max_order_amount": { + "description": "Maximum order amount for adverts.", + "type": "string" + }, + "min_balance": { + "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount for adverts.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "partner_count": { + "description": "Number of different users the advertiser has traded with since registration.", + "type": "integer" + }, + "payment_info": { + "description": "Advertiser's payment information.", + "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" + ] + }, + "release_time_avg": { + "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "sell_completion_rate": { + "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "sell_orders_amount": { + "description": "Sell order volume in the past 30 days.", + "type": "string" + }, + "sell_orders_count": { + "description": "The number of sell order orders completed within the past 30 days.", + "type": "integer" + }, + "show_name": { + "description": "When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "total_completion_rate": { + "description": "The percentage of completed orders out of all orders within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "total_orders_count": { + "description": "The total number of orders completed since advertiser registration.", + "type": "integer" + }, + "total_turnover": { + "description": "Total order volume since advertiser registration.", + "type": "string" + }, + "upgradable_daily_limits": { + "description": "New daily limits available.", + "type": "object", + "additionalProperties": false, + "required": [ + "max_daily_buy", + "max_daily_sell" + ], + "properties": { + "block_trade": { + "description": "When `1`, upgrade will provide block trading.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "max_daily_buy": { + "description": "Upgradable daily buy limit.", + "type": "string" + }, + "max_daily_sell": { + "description": "Upgradable daily sell limit.", + "type": "string" + } + } + }, + "withdrawal_limit": { + "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", + "type": [ + "null", + "string" + ] + } + } }, - "total_orders_count": { - "description": "The total number of orders completed since advertiser registration.", - "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" + ] + } + } }, - "total_turnover": { - "description": "Total order volume since advertiser registration.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "upgradable_daily_limits": { - "description": "New daily limits available.", - "type": "object", - "additionalProperties": false, - "required": ["max_daily_buy", "max_daily_sell"], - "properties": { - "max_daily_buy": { - "description": "Upgradable daily buy limit.", - "type": "string" - }, - "max_daily_sell": { - "description": "Upgradable daily sell limit.", - "type": "string" - } - } + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_info" + ] }, - "withdrawal_limit": { - "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", - "type": ["null", "string"] - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advertiser_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_advertiser_info/send.json b/config/v3/p2p_advertiser_info/send.json index 4c350909..778fa269 100644 --- a/config/v3/p2p_advertiser_info/send.json +++ b/config/v3/p2p_advertiser_info/send.json @@ -1,35 +1,44 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_list/example.json b/config/v3/p2p_advertiser_list/example.json index e8474b76..9d0fd92f 100644 --- a/config/v3/p2p_advertiser_list/example.json +++ b/config/v3/p2p_advertiser_list/example.json @@ -1,4 +1,4 @@ { - "p2p_advertiser_list": 1, - "trade_partners": 1 + "p2p_advertiser_list": 1, + "trade_partners": 1 } diff --git a/config/v3/p2p_advertiser_list/receive.json b/config/v3/p2p_advertiser_list/receive.json index 7cf871d1..ebb55488 100644 --- a/config/v3/p2p_advertiser_list/receive.json +++ b/config/v3/p2p_advertiser_list/receive.json @@ -1,217 +1,281 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser List (response)", - "description": "Retrieve advertisers has/had trade with the current advertiser.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_list": { - "title": "p2p_advertiser_list", - "description": "P2P advertiser list.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of advertisers.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser List (response)", + "description": "Retrieve advertisers has/had trade with the current advertiser.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_list": { + "title": "p2p_advertiser_list", + "description": "P2P advertiser list.", "type": "object", "additionalProperties": false, "required": [ - "advert_rates", - "basic_verification", - "buy_completion_rate", - "buy_orders_amount", - "buy_orders_count", - "buy_time_avg", - "cancel_time_avg", - "created_time", - "default_advert_description", - "full_verification", - "id", - "is_approved", - "is_blocked", - "is_listed", - "is_online", - "last_online_time", - "name", - "partner_count", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "release_time_avg", - "sell_completion_rate", - "sell_orders_amount", - "sell_orders_count", - "total_completion_rate", - "total_orders_count", - "total_turnover" + "list" ], "properties": { - "advert_rates": { - "description": "Average difference of advert rate compared to the market rate over the past 30 days.", - "type": ["null", "number"] - }, - "basic_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "buy_completion_rate": { - "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", - "type": ["null", "number"] - }, - "buy_orders_amount": { - "description": "Buy order volume in the past 30 days.", - "type": "string" - }, - "buy_orders_count": { - "description": "The number of buy order completed within the past 30 days.", - "type": "integer" - }, - "buy_time_avg": { - "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancel_time_avg": { - "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "created_time": { - "description": "The epoch time that the trade partner became an advertiser.", - "type": "integer" - }, - "default_advert_description": { - "description": "Default description that can be used every time an advert is created.", - "type": "string" - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "full_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "id": { - "description": "The advertiser's identification number.", - "type": "string" - }, - "is_approved": { - "description": "The approval status of the advertiser.", - "type": "integer", - "enum": [0, 1] - }, - "is_blocked": { - "description": "Indicates that the advertiser is blocked by the current user.", - "type": "integer", - "enum": [0, 1] - }, - "is_favourite": { - "description": "Indicates if the trade partner is favourited by requester.", - "type": "integer", - "enum": [0, 1] - }, - "is_listed": { - "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates if the trade partner is recommended by requester.", - "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 - }, - "partner_count": { - "description": "Number of different users the advertiser has traded with since registration.", - "type": "integer" - }, - "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"] - }, - "release_time_avg": { - "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", - "type": ["integer", "null"] - }, - "sell_completion_rate": { - "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", - "type": ["null", "number"] - }, - "sell_orders_amount": { - "description": "Sell order volume in the past 30 days.", - "type": "string" - }, - "sell_orders_count": { - "description": "The number of sell order orders completed within the past 30 days.", - "type": "integer" - }, - "total_completion_rate": { - "description": "The percentage of completed orders out of all orders within the past 30 days.", - "type": ["null", "number"] - }, - "total_orders_count": { - "description": "The total number of orders completed since advertiser registration.", - "type": "integer" - }, - "total_turnover": { - "description": "Total order volume since advertiser registration.", - "type": "string" - } + "list": { + "description": "List of advertisers.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "advert_rates", + "basic_verification", + "buy_completion_rate", + "buy_orders_amount", + "buy_orders_count", + "buy_time_avg", + "cancel_time_avg", + "created_time", + "default_advert_description", + "full_verification", + "id", + "is_approved", + "is_blocked", + "is_listed", + "is_online", + "last_online_time", + "name", + "partner_count", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "release_time_avg", + "sell_completion_rate", + "sell_orders_amount", + "sell_orders_count", + "total_completion_rate", + "total_orders_count", + "total_turnover" + ], + "properties": { + "advert_rates": { + "description": "Average difference of advert rate compared to the market rate over the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "basic_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "buy_completion_rate": { + "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "buy_orders_amount": { + "description": "Buy order volume in the past 30 days.", + "type": "string" + }, + "buy_orders_count": { + "description": "The number of buy order completed within the past 30 days.", + "type": "integer" + }, + "buy_time_avg": { + "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancel_time_avg": { + "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "created_time": { + "description": "The epoch time that the trade partner became an advertiser.", + "type": "integer" + }, + "default_advert_description": { + "description": "Default description that can be used every time an advert is created.", + "type": "string" + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "full_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "id": { + "description": "The advertiser's identification number.", + "type": "string" + }, + "is_approved": { + "description": "The approval status of the advertiser.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_blocked": { + "description": "Indicates that the advertiser is blocked by the current user.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_favourite": { + "description": "Indicates if the trade partner is favourited by requester.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_listed": { + "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates if the trade partner is recommended by requester.", + "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 + }, + "partner_count": { + "description": "Number of different users the advertiser has traded with since registration.", + "type": "integer" + }, + "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" + ] + }, + "release_time_avg": { + "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "sell_completion_rate": { + "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "sell_orders_amount": { + "description": "Sell order volume in the past 30 days.", + "type": "string" + }, + "sell_orders_count": { + "description": "The number of sell order orders completed within the past 30 days.", + "type": "integer" + }, + "total_completion_rate": { + "description": "The percentage of completed orders out of all orders within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "total_orders_count": { + "description": "The total number of orders completed since advertiser registration.", + "type": "integer" + }, + "total_turnover": { + "description": "Total order volume since advertiser registration.", + "type": "string" + } + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_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_advertiser_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_advertiser_list/send.json b/config/v3/p2p_advertiser_list/send.json index 0370c0bd..52e8cd6d 100644 --- a/config/v3/p2p_advertiser_list/send.json +++ b/config/v3/p2p_advertiser_list/send.json @@ -1,55 +1,73 @@ { - "$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 - }, - "sort_by": { - "description": "[Optional] How the results are sorted.", - "type": "string", - "default": "created_time", - "enum": ["name", "id"] - }, - "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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_payment_methods/example.json b/config/v3/p2p_advertiser_payment_methods/example.json index 6880df39..b46a55f4 100644 --- a/config/v3/p2p_advertiser_payment_methods/example.json +++ b/config/v3/p2p_advertiser_payment_methods/example.json @@ -1,16 +1,19 @@ { - "p2p_advertiser_payment_methods": 1, - "create": [ - { - "account": "1234", - "bank_name": "some_bank", - "method": "bank_transfer" + "p2p_advertiser_payment_methods": 1, + "create": [ + { + "account": "1234", + "bank_name": "some_bank", + "method": "bank_transfer" + } + ], + "delete": [ + 101, + 102 + ], + "update": { + "103": { + "instructions": "phone first" + } } - ], - "delete": [101, 102], - "update": { - "103": { - "instructions": "phone first" - } - } } diff --git a/config/v3/p2p_advertiser_payment_methods/receive.json b/config/v3/p2p_advertiser_payment_methods/receive.json index 7211ce1e..41316939 100644 --- a/config/v3/p2p_advertiser_payment_methods/receive.json +++ b/config/v3/p2p_advertiser_payment_methods/receive.json @@ -1,110 +1,136 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Payment Methods (response)", - "description": "List P2P advertiser payment methods.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_payment_methods": { - "description": "List of current methods.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Advertiser payment method ID, to be used for updates.", - "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 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Payment Methods (response)", + "description": "List P2P advertiser payment methods.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_payment_methods": { + "description": "List of current methods.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Advertiser payment method ID, to be used for updates.", + "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 and orders.", + "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" + } + } } - } } - } - }, - "is_enabled": { - "description": "Indicates if this method is available on adverts and orders.", - "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" - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_payment_methods" + ] + }, + "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_payment_methods"] - }, - "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_payment_methods/send.json b/config/v3/p2p_advertiser_payment_methods/send.json index 1db383ee..d30826d0 100644 --- a/config/v3/p2p_advertiser_payment_methods/send.json +++ b/config/v3/p2p_advertiser_payment_methods/send.json @@ -1,86 +1,95 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Payment Methods (request)", - "description": "Manage or list P2P advertiser payment methods.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["payments"], - "additionalProperties": false, - "required": ["p2p_advertiser_payment_methods"], - "properties": { - "p2p_advertiser_payment_methods": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "create": { - "description": "Contains new payment method entries.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "minProperties": 2, - "required": ["method"], - "properties": { - "method": { - "description": "Payment method identifer.", - "type": "string", - "pattern": "^[a-z0-9_]{1,30}$" - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Payment Methods (request)", + "description": "Manage or list P2P advertiser payment methods.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "payments" + ], + "additionalProperties": false, + "required": [ + "p2p_advertiser_payment_methods" + ], + "properties": { + "p2p_advertiser_payment_methods": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] }, - "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}$" - } - } + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - }, - "sensitive": 1 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/p2p_advertiser_relations/example.json b/config/v3/p2p_advertiser_relations/example.json index 2d9c224a..d1661861 100644 --- a/config/v3/p2p_advertiser_relations/example.json +++ b/config/v3/p2p_advertiser_relations/example.json @@ -1,3 +1,3 @@ { - "p2p_advertiser_relations": 1 + "p2p_advertiser_relations": 1 } diff --git a/config/v3/p2p_advertiser_relations/receive.json b/config/v3/p2p_advertiser_relations/receive.json index 3e96fb94..a944dbfe 100644 --- a/config/v3/p2p_advertiser_relations/receive.json +++ b/config/v3/p2p_advertiser_relations/receive.json @@ -1,79 +1,87 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Relations (response)", - "description": "Returns information about favourite and blocked advertisers.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_relations": { - "title": "p2p_advertiser_relations", - "description": "P2P advertiser relations information.", - "type": "object", - "additionalProperties": false, - "required": ["blocked_advertisers", "favourite_advertisers"], - "properties": { - "blocked_advertisers": { - "description": "List of advertisers blocked by the current user.", - "type": "array", - "items": { - "description": "Advertiser details.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Relations (response)", + "description": "Returns information about favourite and blocked advertisers.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_relations": { + "title": "p2p_advertiser_relations", + "description": "P2P advertiser relations information.", "type": "object", "additionalProperties": false, + "required": [ + "blocked_advertisers", + "favourite_advertisers" + ], "properties": { - "created_time": { - "description": "The epoch time that the advertiser was blocked.", - "type": "integer" - }, - "id": { - "description": "Advertiser unique identifer.", - "type": "string" - }, - "name": { - "description": "Advertiser displayed name.", - "type": "string", - "sensitive": 1 - } + "blocked_advertisers": { + "description": "List of advertisers blocked by the current user.", + "type": "array", + "items": { + "description": "Advertiser details.", + "type": "object", + "additionalProperties": false, + "properties": { + "created_time": { + "description": "The epoch time that the advertiser was blocked.", + "type": "integer" + }, + "id": { + "description": "Advertiser unique identifer.", + "type": "string" + }, + "name": { + "description": "Advertiser displayed name.", + "type": "string", + "sensitive": 1 + } + } + } + }, + "favourite_advertisers": { + "description": "Favourite advertisers of the current user.", + "type": "array", + "items": { + "description": "Advertiser details.", + "type": "object", + "additionalProperties": false, + "properties": { + "created_time": { + "description": "The epoch time that the advertiser was set as favourite.", + "type": "integer" + }, + "id": { + "description": "Advertiser unique identifer.", + "type": "string" + }, + "name": { + "description": "Advertiser displayed name.", + "type": "string", + "sensitive": 1 + } + } + } + } } - } }, - "favourite_advertisers": { - "description": "Favourite advertisers of the current user.", - "type": "array", - "items": { - "description": "Advertiser details.", - "type": "object", - "additionalProperties": false, - "properties": { - "created_time": { - "description": "The epoch time that the advertiser was set as favourite.", - "type": "integer" - }, - "id": { - "description": "Advertiser unique identifer.", - "type": "string" - }, - "name": { - "description": "Advertiser displayed name.", - "type": "string", - "sensitive": 1 - } - } - } + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_relations" + ] + }, + "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_relations"] - }, - "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_relations/send.json b/config/v3/p2p_advertiser_relations/send.json index d8d7bd25..3c160df6 100644 --- a/config/v3/p2p_advertiser_relations/send.json +++ b/config/v3/p2p_advertiser_relations/send.json @@ -1,61 +1,68 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_advertiser_update/example.json b/config/v3/p2p_advertiser_update/example.json index ecb8b911..a77ff70f 100644 --- a/config/v3/p2p_advertiser_update/example.json +++ b/config/v3/p2p_advertiser_update/example.json @@ -1,4 +1,4 @@ { - "p2p_advertiser_update": 1, - "is_listed": 0 + "p2p_advertiser_update": 1, + "is_listed": 0 } diff --git a/config/v3/p2p_advertiser_update/receive.json b/config/v3/p2p_advertiser_update/receive.json index 1ebb609a..49fc330e 100644 --- a/config/v3/p2p_advertiser_update/receive.json +++ b/config/v3/p2p_advertiser_update/receive.json @@ -1,295 +1,390 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Advertiser Update (response)", - "description": "Returns latest information of the advertiser.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_advertiser_update": { - "title": "p2p_advertiser_update", - "description": "P2P advertiser information.", - "type": "object", - "additionalProperties": false, - "required": [ - "advert_rates", - "balance_available", - "basic_verification", - "blocked_by_count", - "buy_completion_rate", - "buy_orders_amount", - "buy_orders_count", - "buy_time_avg", - "cancel_time_avg", - "cancels_remaining", - "chat_token", - "chat_user_id", - "contact_info", - "created_time", - "default_advert_description", - "full_verification", - "id", - "is_approved", - "is_listed", - "is_online", - "last_online_time", - "name", - "partner_count", - "payment_info", - "rating_average", - "rating_count", - "recommended_average", - "recommended_count", - "release_time_avg", - "sell_completion_rate", - "sell_orders_amount", - "sell_orders_count", - "show_name", - "total_completion_rate", - "total_orders_count", - "total_turnover" - ], - "properties": { - "active_fixed_ads": { - "description": "Number of active fixed rate adverts belonging to the advertiser.", - "type": "integer" - }, - "active_float_ads": { - "description": "Number of active floating rate adverts belonging to the advertiser.", - "type": "integer" - }, - "advert_rates": { - "description": "Average difference of advert rate compared to the market rate over the past 30 days.", - "type": ["null", "number"] - }, - "balance_available": { - "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", - "type": "number" - }, - "basic_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "blocked_by_count": { - "description": "The number of P2P users who have blocked this advertiser.", - "type": "integer" - }, - "blocked_until": { - "description": "If a temporary bar was placed, this is the epoch time at which it will end.", - "type": "integer" - }, - "buy_completion_rate": { - "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", - "type": ["null", "number"] - }, - "buy_orders_amount": { - "description": "Buy order volume in the past 30 days.", - "type": "string" - }, - "buy_orders_count": { - "description": "The number of buy order completed within the past 30 days.", - "type": "integer" - }, - "buy_time_avg": { - "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancel_time_avg": { - "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", - "type": ["integer", "null"] - }, - "cancels_remaining": { - "description": "The number of times the user may cancel orders before being temporarily blocked.", - "type": "integer" - }, - "chat_token": { - "description": "The token to be used for authenticating the client for chat.", - "type": ["null", "string"], - "sensitive": 1 - }, - "chat_user_id": { - "description": "The unique identifier for the chat user.", - "type": ["null", "string"] - }, - "contact_info": { - "description": "Advertiser's contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time that the client became an advertiser.", - "type": "integer" - }, - "daily_buy": { - "description": "Total value of P2P buy transactions in the past 24 hours.", - "type": "string" - }, - "daily_buy_limit": { - "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", - "type": "string" - }, - "daily_sell": { - "description": "Total value of P2P sell transactions in the past 24 hours.", - "type": "string" - }, - "daily_sell_limit": { - "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", - "type": "string" - }, - "default_advert_description": { - "description": "Default description that can be used every time an advert is created.", - "type": "string", - "sensitive": 1 - }, - "first_name": { - "description": "The advertiser's first name.", - "type": "string", - "sensitive": 1 - }, - "full_verification": { - "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", - "type": "integer", - "enum": [1, 0] - }, - "id": { - "description": "The advertiser's identification number.", - "type": "string" - }, - "is_approved": { - "description": "The approval status of the advertiser.", - "type": "integer", - "enum": [0, 1] - }, - "is_listed": { - "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", - "type": "integer", - "enum": [0, 1] - }, - "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"] - }, - "max_order_amount": { - "description": "Maximum order amount for adverts.", - "type": "string" - }, - "min_balance": { - "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", - "type": "string" - }, - "min_order_amount": { - "description": "Minimum order amount for adverts.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - }, - "partner_count": { - "description": "Number of different users the advertiser has traded with since registration.", - "type": "integer" - }, - "payment_info": { - "description": "Advertiser's payment information.", - "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"] - }, - "release_time_avg": { - "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", - "type": ["integer", "null"] - }, - "sell_completion_rate": { - "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", - "type": ["null", "number"] - }, - "sell_orders_amount": { - "description": "Sell order volume in the past 30 days.", - "type": "string" - }, - "sell_orders_count": { - "description": "The number of sell order orders completed within the past 30 days.", - "type": "integer" - }, - "show_name": { - "description": "When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", - "type": "integer", - "enum": [0, 1] - }, - "total_completion_rate": { - "description": "The percentage of completed orders out of all orders within the past 30 days.", - "type": ["null", "number"] - }, - "total_orders_count": { - "description": "The total number of orders completed since advertiser registration.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Advertiser Update (response)", + "description": "Returns latest information of the advertiser.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_advertiser_update": { + "title": "p2p_advertiser_update", + "description": "P2P advertiser information.", + "type": "object", + "additionalProperties": false, + "required": [ + "advert_rates", + "balance_available", + "basic_verification", + "blocked_by_count", + "buy_completion_rate", + "buy_orders_amount", + "buy_orders_count", + "buy_time_avg", + "cancel_time_avg", + "cancels_remaining", + "chat_token", + "chat_user_id", + "contact_info", + "created_time", + "default_advert_description", + "full_verification", + "id", + "is_approved", + "is_listed", + "is_online", + "last_online_time", + "name", + "partner_count", + "payment_info", + "rating_average", + "rating_count", + "recommended_average", + "recommended_count", + "release_time_avg", + "sell_completion_rate", + "sell_orders_amount", + "sell_orders_count", + "show_name", + "total_completion_rate", + "total_orders_count", + "total_turnover" + ], + "properties": { + "active_fixed_ads": { + "description": "Number of active fixed rate adverts belonging to the advertiser.", + "type": "integer" + }, + "active_float_ads": { + "description": "Number of active floating rate adverts belonging to the advertiser.", + "type": "integer" + }, + "advert_rates": { + "description": "Average difference of advert rate compared to the market rate over the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "balance_available": { + "description": "Amount of funds available to sell on P2P. May be less than account balance according to deposit methods used.", + "type": "number" + }, + "basic_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's identify has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "block_trade": { + "description": "Block trading limits, if block trading is allowed.", + "type": "object", + "additionalProperties": false, + "required": [ + "max_order_amount", + "min_order_amount" + ], + "properties": { + "max_order_amount": { + "description": "Maximum order amount for block trade adverts.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount for block trade adverts.", + "type": "string" + } + } + }, + "blocked_by_count": { + "description": "The number of P2P users who have blocked this advertiser.", + "type": "integer" + }, + "blocked_until": { + "description": "If a temporary bar was placed, this is the epoch time at which it will end.", + "type": "integer" + }, + "buy_completion_rate": { + "description": "The percentage of completed orders out of total orders as a buyer within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "buy_orders_amount": { + "description": "Buy order volume in the past 30 days.", + "type": "string" + }, + "buy_orders_count": { + "description": "The number of buy order completed within the past 30 days.", + "type": "integer" + }, + "buy_time_avg": { + "description": "The average time in seconds taken to make payment as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancel_time_avg": { + "description": "The average time in seconds taken to cancel orders as a buyer within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "cancels_remaining": { + "description": "The number of times the user may cancel orders before being temporarily blocked.", + "type": "integer" + }, + "chat_token": { + "description": "The token to be used for authenticating the client for chat.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "chat_user_id": { + "description": "The unique identifier for the chat user.", + "type": [ + "null", + "string" + ] + }, + "contact_info": { + "description": "Advertiser's contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time that the client became an advertiser.", + "type": "integer" + }, + "daily_buy": { + "description": "Total value of P2P buy transactions in the past 24 hours.", + "type": "string" + }, + "daily_buy_limit": { + "description": "Maximum allowed value of P2P buy transactions in a 24 hour period.", + "type": "string" + }, + "daily_sell": { + "description": "Total value of P2P sell transactions in the past 24 hours.", + "type": "string" + }, + "daily_sell_limit": { + "description": "Maximum allowed value of P2P sell transactions in a 24 hour period.", + "type": "string" + }, + "default_advert_description": { + "description": "Default description that can be used every time an advert is created.", + "type": "string", + "sensitive": 1 + }, + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "full_verification": { + "description": "Boolean value: 1 or 0, indicating whether the advertiser's address has been verified.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "id": { + "description": "The advertiser's identification number.", + "type": "string" + }, + "is_approved": { + "description": "The approval status of the advertiser.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_listed": { + "description": "Indicates if the advertiser's active adverts are listed. When `0`, adverts won't be listed regardless if they are active or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "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" + ] + }, + "max_order_amount": { + "description": "Maximum order amount for adverts.", + "type": "string" + }, + "min_balance": { + "description": "Sell ads will be hidden when your available balance or remaining daily sell limit falls beneath this value.", + "type": "string" + }, + "min_order_amount": { + "description": "Minimum order amount for adverts.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + }, + "partner_count": { + "description": "Number of different users the advertiser has traded with since registration.", + "type": "integer" + }, + "payment_info": { + "description": "Advertiser's payment information.", + "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" + ] + }, + "release_time_avg": { + "description": "The average time in seconds taken to release funds as a seller within the past 30 days.", + "type": [ + "integer", + "null" + ] + }, + "sell_completion_rate": { + "description": "The percentage of completed orders out of total orders as a seller within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "sell_orders_amount": { + "description": "Sell order volume in the past 30 days.", + "type": "string" + }, + "sell_orders_count": { + "description": "The number of sell order orders completed within the past 30 days.", + "type": "integer" + }, + "show_name": { + "description": "When `1`, the advertiser's real name will be displayed on to other users on adverts and orders.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "total_completion_rate": { + "description": "The percentage of completed orders out of all orders within the past 30 days.", + "type": [ + "null", + "number" + ] + }, + "total_orders_count": { + "description": "The total number of orders completed since advertiser registration.", + "type": "integer" + }, + "total_turnover": { + "description": "Total order volume since advertiser registration.", + "type": "string" + }, + "upgradable_daily_limits": { + "description": "New daily limits available.", + "type": "object", + "additionalProperties": false, + "required": [ + "max_daily_buy", + "max_daily_sell" + ], + "properties": { + "block_trade": { + "description": "When `1`, upgrade will provide block trading.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "max_daily_buy": { + "description": "Upgradable daily buy limit.", + "type": "string" + }, + "max_daily_sell": { + "description": "Upgradable daily sell limit.", + "type": "string" + } + } + }, + "withdrawal_limit": { + "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", + "type": [ + "null", + "string" + ] + } + } }, - "total_turnover": { - "description": "Total order volume since advertiser registration.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "upgradable_daily_limits": { - "description": "New daily limits available.", - "type": "object", - "additionalProperties": false, - "required": ["max_daily_buy", "max_daily_sell"], - "properties": { - "max_daily_buy": { - "description": "Upgradable daily buy limit.", - "type": "string" - }, - "max_daily_sell": { - "description": "Upgradable daily sell limit.", - "type": "string" - } - } + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_advertiser_update" + ] }, - "withdrawal_limit": { - "description": "Remaining withdrawal_limit of a non-fully authenticated advertiser.", - "type": ["null", "string"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_advertiser_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_advertiser_update/send.json b/config/v3/p2p_advertiser_update/send.json index b892eab2..a57dbcbd 100644 --- a/config/v3/p2p_advertiser_update/send.json +++ b/config/v3/p2p_advertiser_update/send.json @@ -1,58 +1,73 @@ { - "$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 advertiser if advertiser is eligible", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_chat_create/example.json b/config/v3/p2p_chat_create/example.json index ebe7eb4a..ea5ab84d 100644 --- a/config/v3/p2p_chat_create/example.json +++ b/config/v3/p2p_chat_create/example.json @@ -1,4 +1,4 @@ { - "p2p_chat_create": 1, - "order_id": "1234" + "p2p_chat_create": 1, + "order_id": "1234" } diff --git a/config/v3/p2p_chat_create/receive.json b/config/v3/p2p_chat_create/receive.json index 0219f10d..b44bdb21 100644 --- a/config/v3/p2p_chat_create/receive.json +++ b/config/v3/p2p_chat_create/receive.json @@ -1,39 +1,47 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Chat Create (response)", - "description": "Information of the created P2P chat.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_chat_create": { - "title": "p2p_chat_create", - "description": "Information of the P2P chat.", - "type": "object", - "additionalProperties": false, - "required": ["channel_url", "order_id"], - "properties": { - "channel_url": { - "description": "The URL to be used to initialise the chat for the requested order.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Chat Create (response)", + "description": "Information of the created P2P chat.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_chat_create": { + "title": "p2p_chat_create", + "description": "Information of the P2P chat.", + "type": "object", + "additionalProperties": false, + "required": [ + "channel_url", + "order_id" + ], + "properties": { + "channel_url": { + "description": "The URL to be used to initialise the chat for the requested order.", + "type": "string" + }, + "order_id": { + "description": "The unique identifier for the order that the chat belongs to.", + "type": "string" + } + } }, - "order_id": { - "description": "The unique identifier for the order that the chat belongs to.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_chat_create" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_chat_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_chat_create/send.json b/config/v3/p2p_chat_create/send.json index 4a314784..f4bdd0a5 100644 --- a/config/v3/p2p_chat_create/send.json +++ b/config/v3/p2p_chat_create/send.json @@ -1,30 +1,38 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_cancel/example.json b/config/v3/p2p_order_cancel/example.json index c531e92c..8d93a3ae 100644 --- a/config/v3/p2p_order_cancel/example.json +++ b/config/v3/p2p_order_cancel/example.json @@ -1,4 +1,4 @@ { - "p2p_order_cancel": 1, - "id": "1234" + "p2p_order_cancel": 1, + "id": "1234" } diff --git a/config/v3/p2p_order_cancel/receive.json b/config/v3/p2p_order_cancel/receive.json index 236788bc..d61a9546 100644 --- a/config/v3/p2p_order_cancel/receive.json +++ b/config/v3/p2p_order_cancel/receive.json @@ -1,39 +1,49 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Cancel (response)", - "description": "Result of the P2P order cancellation.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_cancel": { - "description": "Cancellation details", - "type": "object", - "additionalProperties": false, - "required": ["id", "status"], - "properties": { - "id": { - "description": "The unique identifier for the order.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Cancel (response)", + "description": "Result of the P2P order cancellation.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_cancel": { + "description": "Cancellation details", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "status" + ], + "properties": { + "id": { + "description": "The unique identifier for the order.", + "type": "string" + }, + "status": { + "description": "The new status of the order.", + "type": "string", + "enum": [ + "cancelled" + ] + } + } }, - "status": { - "description": "The new status of the order.", - "type": "string", - "enum": ["cancelled"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_cancel" + ] + }, + "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_order_cancel"] - }, - "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_order_cancel/send.json b/config/v3/p2p_order_cancel/send.json index efa863e0..c8f9838f 100644 --- a/config/v3/p2p_order_cancel/send.json +++ b/config/v3/p2p_order_cancel/send.json @@ -1,30 +1,38 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_confirm/example.json b/config/v3/p2p_order_confirm/example.json index 6fac05a3..7b379725 100644 --- a/config/v3/p2p_order_confirm/example.json +++ b/config/v3/p2p_order_confirm/example.json @@ -1,4 +1,4 @@ { - "p2p_order_confirm": 1, - "id": "1234" + "p2p_order_confirm": 1, + "id": "1234" } diff --git a/config/v3/p2p_order_confirm/receive.json b/config/v3/p2p_order_confirm/receive.json index 6d861d77..6a6819bc 100644 --- a/config/v3/p2p_order_confirm/receive.json +++ b/config/v3/p2p_order_confirm/receive.json @@ -1,44 +1,56 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Confirm (response)", - "description": "Result of the P2P order confirmation.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_confirm": { - "description": "Confirmation details", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "dry_run": { - "description": "The `dry_run` was successful.", - "type": "integer", - "enum": [1] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Confirm (response)", + "description": "Result of the P2P order confirmation.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_confirm": { + "description": "Confirmation details", + "type": "object", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "dry_run": { + "description": "The `dry_run` was successful.", + "type": "integer", + "enum": [ + 1 + ] + }, + "id": { + "description": "The unique identifier for the order.", + "type": "string" + }, + "status": { + "description": "The new status of the order.", + "type": "string", + "enum": [ + "buyer-confirmed", + "completed" + ] + } + } }, - "id": { - "description": "The unique identifier for the order.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "status": { - "description": "The new status of the order.", - "type": "string", - "enum": ["buyer-confirmed", "completed"] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_confirm" + ] + }, + "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_order_confirm"] - }, - "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_order_confirm/send.json b/config/v3/p2p_order_confirm/send.json index 44455b39..17f542de 100644 --- a/config/v3/p2p_order_confirm/send.json +++ b/config/v3/p2p_order_confirm/send.json @@ -1,40 +1,51 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_create/example.json b/config/v3/p2p_order_create/example.json index 7801533d..76edae91 100644 --- a/config/v3/p2p_order_create/example.json +++ b/config/v3/p2p_order_create/example.json @@ -1,5 +1,5 @@ { - "p2p_order_create": 1, - "advert_id": "1234", - "amount": 100 + "p2p_order_create": 1, + "advert_id": "1234", + "amount": 100 } diff --git a/config/v3/p2p_order_create/receive.json b/config/v3/p2p_order_create/receive.json index 22df9e29..93b21275 100644 --- a/config/v3/p2p_order_create/receive.json +++ b/config/v3/p2p_order_create/receive.json @@ -1,367 +1,476 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Create (response)", - "description": "The information about the created P2P order.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_create": { - "title": "p2p_order_create", - "description": "Information of the creates P2P order.", - "type": "object", - "additionalProperties": false, - "required": [ - "account_currency", - "advert_details", - "advertiser_details", - "amount", - "amount_display", - "chat_channel_url", - "client_details", - "contact_info", - "created_time", - "dispute_details", - "expiry_time", - "id", - "is_incoming", - "is_reviewable", - "is_seen", - "local_currency", - "payment_info", - "price", - "price_display", - "rate", - "rate_display", - "status", - "type" - ], - "properties": { - "account_currency": { - "description": "The currency of order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "advert_details": { - "title": "Advert Details", - "description": "Details of the advert for this order.", - "type": "object", - "additionalProperties": false, - "required": ["description", "id", "payment_method", "type"], - "properties": { - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The unique identifier for the advert.", - "type": "string" - }, - "payment_method": { - "description": "The payment method.", - "type": ["null", "string"] - }, - "type": { - "description": "Type of the advert.", - "type": "string", - "enum": ["buy", "sell"] - } - } - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "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"] - }, - "loginid": { - "description": "The advertiser's account identifier.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "amount": { - "description": "The amount of the order.", - "type": "number" - }, - "amount_display": { - "description": "The amount of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "chat_channel_url": { - "description": "The URL to be used to initialise the chat for this order.", - "type": "string" - }, - "client_details": { - "title": "Client Details", - "description": "Details of the client who created the order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "first_name": { - "description": "The client's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The client's unique P2P identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The client'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"] - }, - "loginid": { - "description": "The client's account identifier.", - "type": "string" - }, - "name": { - "description": "The client's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "contact_info": { - "description": "Seller contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time of the order creation.", - "type": "integer" - }, - "dispute_details": { - "title": "Dispute Details", - "description": "Details of the order dispute.", - "type": "object", - "additionalProperties": false, - "required": ["dispute_reason", "disputer_loginid"], - "properties": { - "dispute_reason": { - "description": "The dispute reason", - "type": ["null", "string"] - }, - "disputer_loginid": { - "description": "The loginid of the client who's raising the dispute", - "type": ["null", "string"] - } - } - }, - "expiry_time": { - "description": "The epoch time in which the order will be expired.", - "type": "integer" - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string" - }, - "is_incoming": { - "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_reviewable": { - "description": "`1` if a review can be given, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_seen": { - "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", - "type": "integer", - "enum": [1, 0] - }, - "local_currency": { - "description": "Local currency for this order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "payment_info": { - "description": "Payment instructions.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Supported payment methods. Comma separated list.", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": ["fields", "is_enabled", "method", "type"], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Create (response)", + "description": "The information about the created P2P order.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_create": { + "title": "p2p_order_create", + "description": "Information of the creates P2P order.", + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advert_details", + "advertiser_details", + "amount", + "amount_display", + "chat_channel_url", + "client_details", + "contact_info", + "created_time", + "dispute_details", + "expiry_time", + "id", + "is_incoming", + "is_reviewable", + "is_seen", + "local_currency", + "payment_info", + "price", + "price_display", + "rate", + "rate_display", + "status", + "type" + ], + "properties": { + "account_currency": { + "description": "The currency of order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] }, - "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" + "advert_details": { + "title": "Advert Details", + "description": "Details of the advert for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "block_trade", + "description", + "id", + "payment_method", + "type" + ], + "properties": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "id": { + "description": "The unique identifier for the advert.", + "type": "string" + }, + "payment_method": { + "description": "The payment method.", + "type": [ + "null", + "string" + ] }, "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "description": "Type of the advert.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + } + } + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 }, - "value": { - "description": "Current value of payment method field.", - "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" + ] + }, + "loginid": { + "description": "The advertiser's account identifier.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The amount of the order.", + "type": "number" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "amount_display": { + "description": "The amount of the order, formatted to appropriate decimal places.", + "type": "string" }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] + "chat_channel_url": { + "description": "The URL to be used to initialise the chat for this order.", + "type": "string" + }, + "client_details": { + "title": "Client Details", + "description": "Details of the client who created the order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The client's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The client's unique P2P identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_name": { + "description": "The client'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" + ] + }, + "loginid": { + "description": "The client's account identifier.", + "type": "string" + }, + "name": { + "description": "The client's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "contact_info": { + "description": "Seller contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time of the order creation.", + "type": "integer" + }, + "dispute_details": { + "title": "Dispute Details", + "description": "Details of the order dispute.", + "type": "object", + "additionalProperties": false, + "required": [ + "dispute_reason", + "disputer_loginid" + ], + "properties": { + "dispute_reason": { + "description": "The dispute reason", + "type": [ + "null", + "string" + ] + }, + "disputer_loginid": { + "description": "The loginid of the client who's raising the dispute", + "type": [ + "null", + "string" + ] + } + } + }, + "expiry_time": { + "description": "The epoch time in which the order will be expired.", + "type": "integer" + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string" + }, + "is_incoming": { + "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "is_reviewable": { + "description": "`1` if a review can be given, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_seen": { + "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "local_currency": { + "description": "Local currency for this order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "payment_info": { + "description": "Payment instructions.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Supported payment methods. Comma separated list.", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type" + ], + "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" + } + } + } + } + } + }, + "price": { + "description": "Cost in local currency.", + "type": "number" + }, + "price_display": { + "description": "Cost in local currency, formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate": { + "description": "Conversion rate of the order.", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate of the order, formatted to appropriate decimal places.", "type": "string" - } + }, + "status": { + "description": "The status of the created order.", + "type": "string", + "enum": [ + "pending" + ] + }, + "type": { + "description": "Type of the order.", + "type": "string", + "enum": [ + "buy", + "sell" + ] } - } } - } - }, - "price": { - "description": "Cost in local currency.", - "type": "number" }, - "price_display": { - "description": "Cost in local currency, formatted to appropriate decimal places.", - "type": "string" - }, - "rate": { - "description": "Conversion rate of the order.", - "type": "number" + "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" + ] + } + } }, - "rate_display": { - "description": "Conversion rate of the order, formatted to appropriate decimal places.", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "status": { - "description": "The status of the created order.", - "type": "string", - "enum": ["pending"] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_create" + ] }, - "type": { - "description": "Type of the order.", - "type": "string", - "enum": ["buy", "sell"] - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_order_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_order_create/send.json b/config/v3/p2p_order_create/send.json index 46fb807c..4b334f7b 100644 --- a/config/v3/p2p_order_create/send.json +++ b/config/v3/p2p_order_create/send.json @@ -1,63 +1,74 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_dispute/example.json b/config/v3/p2p_order_dispute/example.json index 74b3a68f..0cde35f0 100644 --- a/config/v3/p2p_order_dispute/example.json +++ b/config/v3/p2p_order_dispute/example.json @@ -1,5 +1,5 @@ { - "p2p_order_dispute": 1, - "dispute_reason": "seller_not_released", - "id": "1234" + "p2p_order_dispute": 1, + "dispute_reason": "seller_not_released", + "id": "1234" } diff --git a/config/v3/p2p_order_dispute/receive.json b/config/v3/p2p_order_dispute/receive.json index 184e77df..a736a9d2 100644 --- a/config/v3/p2p_order_dispute/receive.json +++ b/config/v3/p2p_order_dispute/receive.json @@ -1,296 +1,367 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Dispute (response)", - "description": "Result of the P2P order disputing.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_dispute": { - "title": "p2p_order_dispute", - "description": "Details of the disputed order.", - "type": "object", - "additionalProperties": false, - "required": [ - "account_currency", - "advert_details", - "advertiser_details", - "amount", - "amount_display", - "chat_channel_url", - "client_details", - "contact_info", - "created_time", - "dispute_details", - "expiry_time", - "id", - "is_incoming", - "is_reviewable", - "is_seen", - "local_currency", - "payment_info", - "price", - "price_display", - "rate", - "rate_display", - "status", - "type" - ], - "properties": { - "account_currency": { - "description": "The currency of order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "advert_details": { - "title": "Advert Details", - "description": "Details of the advert for this order.", - "type": "object", - "additionalProperties": false, - "required": ["description", "id", "payment_method", "type"], - "properties": { - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The unique identifier for the advert.", - "type": "string" - }, - "payment_method": { - "description": "The payment method.", - "type": ["null", "string"] - }, - "type": { - "description": "Type of the advert.", - "type": "string", - "enum": ["buy", "sell"] - } - } - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "first_name": { - "description": "The client'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"] - }, - "loginid": { - "description": "The advertiser's account identifier.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Dispute (response)", + "description": "Result of the P2P order disputing.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_dispute": { + "title": "p2p_order_dispute", + "description": "Details of the disputed order.", + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advert_details", + "advertiser_details", + "amount", + "amount_display", + "chat_channel_url", + "client_details", + "contact_info", + "created_time", + "dispute_details", + "expiry_time", + "id", + "is_incoming", + "is_reviewable", + "is_seen", + "local_currency", + "payment_info", + "price", + "price_display", + "rate", + "rate_display", + "status", + "type" + ], + "properties": { + "account_currency": { + "description": "The currency of order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "advert_details": { + "title": "Advert Details", + "description": "Details of the advert for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "block_trade", + "description", + "id", + "payment_method", + "type" + ], + "properties": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The unique identifier for the advert.", + "type": "string" + }, + "payment_method": { + "description": "The payment method.", + "type": [ + "null", + "string" + ] + }, + "type": { + "description": "Type of the advert.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + } + } + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The client'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" + ] + }, + "loginid": { + "description": "The advertiser's account identifier.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "amount": { + "description": "The amount of the order.", + "type": "number" + }, + "amount_display": { + "description": "The amount of the order, formatted to appropriate decimal places.", + "type": "string" + }, + "chat_channel_url": { + "description": "The URL to be used to initialise the chat for this order.", + "type": "string" + }, + "client_details": { + "title": "Client Details", + "description": "Details of the client who created the order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The client's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The client's unique P2P identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "last_name": { + "description": "The client'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" + ] + }, + "loginid": { + "description": "The client's account identifier.", + "type": "string" + }, + "name": { + "description": "The client's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "contact_info": { + "description": "Seller contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time of the order creation.", + "type": "integer" + }, + "dispute_details": { + "title": "Dispute Details", + "description": "Details of the order dispute.", + "type": "object", + "additionalProperties": false, + "required": [ + "dispute_reason", + "disputer_loginid" + ], + "properties": { + "dispute_reason": { + "description": "The dispute reason", + "type": "string" + }, + "disputer_loginid": { + "description": "The loginid of the client who's raising the dispute", + "type": "string" + } + } + }, + "expiry_time": { + "description": "The epoch time in which the order will be expired.", + "type": "integer" + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string" + }, + "is_incoming": { + "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_reviewable": { + "description": "`1` if a review can be given, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_seen": { + "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "local_currency": { + "description": "Local currency for this order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "payment_info": { + "description": "Payment instructions.", + "type": "string", + "sensitive": 1 + }, + "price": { + "description": "Cost in local currency.", + "type": "number" + }, + "price_display": { + "description": "Cost in local currency, formatted to appropriate decimal places.", + "type": "string" + }, + "rate": { + "description": "Conversion rate of the order.", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate of the order, formatted to appropriate decimal places.", + "type": "string" + }, + "status": { + "description": "Current order status.", + "type": "string", + "enum": [ + "pending", + "buyer-confirmed", + "cancelled", + "timed-out", + "blocked", + "refunded", + "completed", + "disputed", + "dispute-refunded", + "dispute-completed" + ] + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "verification_lockout_until": { + "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", + "type": "integer" + }, + "verification_next_request": { + "description": "If a verification request has already been made, the epoch time that another verification request can be made.", + "type": "integer" + }, + "verification_pending": { + "description": "Indicates that the seller in the process of confirming the order.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "verification_token_expiry": { + "description": "Epoch time that the current verification token will expire.", + "type": "integer" + } } - } - }, - "amount": { - "description": "The amount of the order.", - "type": "number" - }, - "amount_display": { - "description": "The amount of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "chat_channel_url": { - "description": "The URL to be used to initialise the chat for this order.", - "type": "string" - }, - "client_details": { - "title": "Client Details", - "description": "Details of the client who created the order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "first_name": { - "description": "The client's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The client's unique P2P identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "last_name": { - "description": "The client'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"] - }, - "loginid": { - "description": "The client's account identifier.", - "type": "string" - }, - "name": { - "description": "The client's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "contact_info": { - "description": "Seller contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time of the order creation.", - "type": "integer" - }, - "dispute_details": { - "title": "Dispute Details", - "description": "Details of the order dispute.", - "type": "object", - "additionalProperties": false, - "required": ["dispute_reason", "disputer_loginid"], - "properties": { - "dispute_reason": { - "description": "The dispute reason", - "type": "string" - }, - "disputer_loginid": { - "description": "The loginid of the client who's raising the dispute", - "type": "string" - } - } - }, - "expiry_time": { - "description": "The epoch time in which the order will be expired.", - "type": "integer" - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string" - }, - "is_incoming": { - "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_reviewable": { - "description": "`1` if a review can be given, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_seen": { - "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", - "type": "integer", - "enum": [1, 0] - }, - "local_currency": { - "description": "Local currency for this order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "payment_info": { - "description": "Payment instructions.", - "type": "string", - "sensitive": 1 - }, - "price": { - "description": "Cost in local currency.", - "type": "number" - }, - "price_display": { - "description": "Cost in local currency, formatted to appropriate decimal places.", - "type": "string" - }, - "rate": { - "description": "Conversion rate of the order.", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "status": { - "description": "Current order status.", - "type": "string", - "enum": [ - "pending", - "buyer-confirmed", - "cancelled", - "timed-out", - "blocked", - "refunded", - "completed", - "disputed", - "dispute-refunded", - "dispute-completed" - ] - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] - }, - "verification_lockout_until": { - "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", - "type": "integer" }, - "verification_next_request": { - "description": "If a verification request has already been made, the epoch time that another verification request can be made.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "verification_pending": { - "description": "Indicates that the seller in the process of confirming the order.", - "type": "integer", - "enum": [0, 1] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_dispute" + ] }, - "verification_token_expiry": { - "description": "Epoch time that the current verification token will expire.", - "type": "integer" + "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_order_dispute"] - }, - "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_order_dispute/send.json b/config/v3/p2p_order_dispute/send.json index 4da6d976..d08ace1b 100644 --- a/config/v3/p2p_order_dispute/send.json +++ b/config/v3/p2p_order_dispute/send.json @@ -1,35 +1,50 @@ { - "$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"] - }, - "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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_info/example.json b/config/v3/p2p_order_info/example.json index 4d2d737d..ac45f0a1 100644 --- a/config/v3/p2p_order_info/example.json +++ b/config/v3/p2p_order_info/example.json @@ -1,4 +1,4 @@ { - "p2p_order_info": 1, - "id": "1234" + "p2p_order_info": 1, + "id": "1234" } diff --git a/config/v3/p2p_order_info/receive.json b/config/v3/p2p_order_info/receive.json index fc7b4839..d774c13d 100644 --- a/config/v3/p2p_order_info/receive.json +++ b/config/v3/p2p_order_info/receive.json @@ -1,439 +1,572 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Information (response)", - "description": "Information of the P2P order.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_info": { - "title": "p2p_order_info", - "description": "The information of P2P order.", - "type": "object", - "additionalProperties": false, - "required": [ - "account_currency", - "advert_details", - "advertiser_details", - "amount", - "amount_display", - "chat_channel_url", - "client_details", - "contact_info", - "created_time", - "dispute_details", - "expiry_time", - "id", - "is_incoming", - "is_reviewable", - "local_currency", - "payment_info", - "price", - "price_display", - "rate", - "rate_display", - "status", - "type" - ], - "properties": { - "account_currency": { - "description": "The currency of order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "advert_details": { - "title": "Advert Details", - "description": "Details of the advert for this order.", - "type": "object", - "additionalProperties": false, - "required": ["description", "id", "payment_method", "type"], - "properties": { - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The unique identifier for the advert.", - "type": "string" - }, - "payment_method": { - "description": "The payment method.", - "type": ["null", "string"] - }, - "type": { - "description": "Type of the advert.", - "type": "string", - "enum": ["buy", "sell"] - } - } - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "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] - }, - "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"] - }, - "loginid": { - "description": "The advertiser's account identifier.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "amount": { - "description": "The amount of the order.", - "type": "number" - }, - "amount_display": { - "description": "The amount of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "chat_channel_url": { - "description": "The URL to be used to initialise the chat for this order.", - "type": "string" - }, - "client_details": { - "title": "Client Details", - "description": "Details of the client who created the order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "loginid", "name"], - "properties": { - "first_name": { - "description": "The client's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The client's unique P2P identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates that the client was recommended in the most recent review by the current user.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "last_name": { - "description": "The client'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"] - }, - "loginid": { - "description": "The client's account identifier.", - "type": "string" - }, - "name": { - "description": "The client's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "completion_time": { - "description": "The epoch time of the order completion.", - "type": "integer" - }, - "contact_info": { - "description": "Seller contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time of the order creation.", - "type": "integer" - }, - "dispute_details": { - "title": "Dispute Details", - "description": "Details of the order dispute.", - "type": "object", - "additionalProperties": false, - "required": ["dispute_reason", "disputer_loginid"], - "properties": { - "dispute_reason": { - "description": "The dispute reason", - "type": ["null", "string"] - }, - "disputer_loginid": { - "description": "The loginid of the client who's raising the dispute", - "type": ["null", "string"] - } - } - }, - "expiry_time": { - "description": "The epoch time in which the order will be expired.", - "type": "integer" - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string" - }, - "is_incoming": { - "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_reviewable": { - "description": "`1` if a review can be given, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_seen": { - "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", - "type": "integer", - "enum": [1, 0] - }, - "local_currency": { - "description": "Local currency for this order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "payment_info": { - "description": "Payment instructions.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Supported payment methods. Comma separated list.", - "type": ["null", "string"] - }, - "payment_method_details": { - "description": "Details of available payment methods.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]{1,8}$": { - "description": "Unique identifier.", - "type": "object", - "additionalProperties": false, - "required": ["fields", "is_enabled", "method", "type"], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Information (response)", + "description": "Information of the P2P order.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_info": { + "title": "p2p_order_info", + "description": "The information of P2P order.", + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advert_details", + "advertiser_details", + "amount", + "amount_display", + "chat_channel_url", + "client_details", + "contact_info", + "created_time", + "dispute_details", + "expiry_time", + "id", + "is_incoming", + "is_reviewable", + "local_currency", + "payment_info", + "price", + "price_display", + "rate", + "rate_display", + "status", + "type" + ], + "properties": { + "account_currency": { + "description": "The currency of order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] }, - "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" + "advert_details": { + "title": "Advert Details", + "description": "Details of the advert for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "block_trade", + "description", + "id", + "payment_method", + "type" + ], + "properties": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] }, - "required": { - "description": "Is field required or optional.", - "type": "integer" + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The unique identifier for the advert.", + "type": "string" + }, + "payment_method": { + "description": "The payment method.", + "type": [ + "null", + "string" + ] }, "type": { - "description": "Field type.", - "type": "string", - "enum": ["text", "memo"] + "description": "Type of the advert.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + } + } + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The advertiser's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The advertiser's unique identifier.", + "type": "string" }, - "value": { - "description": "Current value of payment method field.", - "type": "string", - "sensitive": 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" + ] + }, + "loginid": { + "description": "The advertiser's account identifier.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 } - } } - } }, - "is_enabled": { - "description": "Indicates whether method is enabled.", - "type": "integer", - "enum": [0, 1] + "amount": { + "description": "The amount of the order.", + "type": "number" }, - "method": { - "description": "Payment method identifier.", - "type": "string" + "amount_display": { + "description": "The amount of the order, formatted to appropriate decimal places.", + "type": "string" }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] + "chat_channel_url": { + "description": "The URL to be used to initialise the chat for this order.", + "type": "string" + }, + "client_details": { + "title": "Client Details", + "description": "Details of the client who created the order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The client's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The client's unique P2P identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates that the client was recommended in the most recent review by the current user.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + }, + "last_name": { + "description": "The client'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" + ] + }, + "loginid": { + "description": "The client's account identifier.", + "type": "string" + }, + "name": { + "description": "The client's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "completion_time": { + "description": "The epoch time of the order completion.", + "type": "integer" + }, + "contact_info": { + "description": "Seller contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time of the order creation.", + "type": "integer" + }, + "dispute_details": { + "title": "Dispute Details", + "description": "Details of the order dispute.", + "type": "object", + "additionalProperties": false, + "required": [ + "dispute_reason", + "disputer_loginid" + ], + "properties": { + "dispute_reason": { + "description": "The dispute reason", + "type": [ + "null", + "string" + ] + }, + "disputer_loginid": { + "description": "The loginid of the client who's raising the dispute", + "type": [ + "null", + "string" + ] + } + } + }, + "expiry_time": { + "description": "The epoch time in which the order will be expired.", + "type": "integer" + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string" + }, + "is_incoming": { + "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_reviewable": { + "description": "`1` if a review can be given, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_seen": { + "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "local_currency": { + "description": "Local currency for this order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "payment_info": { + "description": "Payment instructions.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Supported payment methods. Comma separated list.", + "type": [ + "null", + "string" + ] + }, + "payment_method_details": { + "description": "Details of available payment methods.", + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]{1,8}$": { + "description": "Unique identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "fields", + "is_enabled", + "method", + "type" + ], + "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 in local currency.", + "type": "number" }, - "used_by_adverts": { - "description": "IDs of adverts that use this payment method.", - "type": ["array", "null"], - "items": { + "price_display": { + "description": "Cost in local currency, formatted to appropriate decimal places.", "type": "string" - } }, - "used_by_orders": { - "description": "IDs of orders that use this payment method.", - "type": ["array", "null"], - "items": { + "rate": { + "description": "Conversion rate of the order.", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate of the order, formatted to appropriate decimal places.", "type": "string" - } + }, + "review_details": { + "title": "Review Details", + "description": "Details of the review you gave for this order, if any.", + "type": "object", + "additionalProperties": false, + "required": [ + "created_time", + "rating", + "recommended" + ], + "properties": { + "created_time": { + "description": "The epoch time of the review.", + "type": "integer" + }, + "rating": { + "description": "Rating for the transaction, 1 to 5.", + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "recommended": { + "description": "`1` if the advertiser is recommended, `0` if not recommended.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + } + } + }, + "status": { + "description": "Current order status.", + "type": "string", + "enum": [ + "pending", + "buyer-confirmed", + "cancelled", + "timed-out", + "blocked", + "refunded", + "completed", + "disputed", + "dispute-refunded", + "dispute-completed" + ] + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "verification_lockout_until": { + "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", + "type": "integer" + }, + "verification_next_request": { + "description": "If a verification request has already been made, the epoch time that another verification request can be made.", + "type": "integer" + }, + "verification_pending": { + "description": "Indicates that the seller in the process of confirming the order.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "verification_token_expiry": { + "description": "Epoch time that the current verification token will expire.", + "type": "integer" } - } } - } - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost in local currency.", - "type": "number" - }, - "price_display": { - "description": "Cost in local currency, formatted to appropriate decimal places.", - "type": "string" - }, - "rate": { - "description": "Conversion rate of the order.", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate of the order, formatted to appropriate decimal places.", - "type": "string" }, - "review_details": { - "title": "Review Details", - "description": "Details of the review you gave for this order, if any.", - "type": "object", - "additionalProperties": false, - "required": ["created_time", "rating", "recommended"], - "properties": { - "created_time": { - "description": "The epoch time of the review.", - "type": "integer" - }, - "rating": { - "description": "Rating for the transaction, 1 to 5.", - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "recommended": { - "description": "`1` if the advertiser is recommended, `0` if not recommended.", - "type": ["integer", "null"], - "enum": [null, 0, 1] + "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" + ] + } } - } - }, - "status": { - "description": "Current order status.", - "type": "string", - "enum": [ - "pending", - "buyer-confirmed", - "cancelled", - "timed-out", - "blocked", - "refunded", - "completed", - "disputed", - "dispute-refunded", - "dispute-completed" - ] - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] }, - "verification_lockout_until": { - "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "verification_next_request": { - "description": "If a verification request has already been made, the epoch time that another verification request can be made.", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_info" + ] }, - "verification_pending": { - "description": "Indicates that the seller in the process of confirming the order.", - "type": "integer", - "enum": [0, 1] - }, - "verification_token_expiry": { - "description": "Epoch time that the current verification token will expire.", - "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"] + "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_order_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_order_info/send.json b/config/v3/p2p_order_info/send.json index 4123d6c3..1caf3eaf 100644 --- a/config/v3/p2p_order_info/send.json +++ b/config/v3/p2p_order_info/send.json @@ -1,35 +1,45 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_list/example.json b/config/v3/p2p_order_list/example.json index c1d1b6cd..d7b75877 100644 --- a/config/v3/p2p_order_list/example.json +++ b/config/v3/p2p_order_list/example.json @@ -1,4 +1,4 @@ { - "p2p_order_list": 1, - "advert_id": "1234" + "p2p_order_list": 1, + "advert_id": "1234" } diff --git a/config/v3/p2p_order_list/receive.json b/config/v3/p2p_order_list/receive.json index 0b7cd26a..3197cb41 100644 --- a/config/v3/p2p_order_list/receive.json +++ b/config/v3/p2p_order_list/receive.json @@ -1,368 +1,479 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order List (response)", - "description": "All orders matching the requested criteria.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_list": { - "title": "p2p_order_list", - "description": "List of P2P orders.", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "list": { - "description": "List of orders.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order List (response)", + "description": "All orders matching the requested criteria.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_list": { + "title": "p2p_order_list", + "description": "List of P2P orders.", "type": "object", "additionalProperties": false, "required": [ - "account_currency", - "advert_details", - "advertiser_details", - "amount", - "amount_display", - "chat_channel_url", - "contact_info", - "created_time", - "dispute_details", - "expiry_time", - "id", - "is_incoming", - "is_reviewable", - "local_currency", - "payment_info", - "price", - "price_display", - "rate", - "rate_display", - "status", - "type" + "list" ], "properties": { - "account_currency": { - "description": "The currency to be bought or sold.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "advert_details": { - "title": "Advert Details", - "description": "Details of the advert for this order.", - "type": "object", - "additionalProperties": false, - "required": ["description", "id", "payment_method", "type"], - "properties": { - "description": { - "description": "General information about the advert.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The unique identifier for the advert.", - "type": "string" - }, - "payment_method": { - "description": "The payment method.", - "type": ["null", "string"] - }, - "type": { - "description": "Type of the advert.", - "type": "string", - "enum": ["buy", "sell"] - } + "list": { + "description": "List of orders.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "account_currency", + "advert_details", + "advertiser_details", + "amount", + "amount_display", + "chat_channel_url", + "contact_info", + "created_time", + "dispute_details", + "expiry_time", + "id", + "is_incoming", + "is_reviewable", + "local_currency", + "payment_info", + "price", + "price_display", + "rate", + "rate_display", + "status", + "type" + ], + "properties": { + "account_currency": { + "description": "The currency to be bought or sold.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "advert_details": { + "title": "Advert Details", + "description": "Details of the advert for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "block_trade", + "description", + "id", + "payment_method", + "type" + ], + "properties": { + "block_trade": { + "description": "Indicates if this is block trade advert or not.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "description": { + "description": "General information about the advert.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The unique identifier for the advert.", + "type": "string" + }, + "payment_method": { + "description": "The payment method.", + "type": [ + "null", + "string" + ] + }, + "type": { + "description": "Type of the advert.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + } + } + }, + "advertiser_details": { + "title": "Advertiser Details", + "description": "Details of the advertiser for this order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "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 + ] + }, + "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" + ] + }, + "loginid": { + "description": "The advertiser's account identifier.", + "type": "string" + }, + "name": { + "description": "The advertiser's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "amount": { + "description": "The amount of the order.", + "type": "number" + }, + "amount_display": { + "description": "The amount of the order, formatted to appropriate decimal places.", + "type": "string" + }, + "chat_channel_url": { + "description": "The URL to be used to initialise the chat for this order.", + "type": "string" + }, + "client_details": { + "title": "Client Details", + "description": "Details of the client who created the order.", + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "is_online", + "last_online_time", + "loginid", + "name" + ], + "properties": { + "first_name": { + "description": "The client's first name.", + "type": "string", + "sensitive": 1 + }, + "id": { + "description": "The client's unique P2P identifier.", + "type": "string" + }, + "is_online": { + "description": "Indicates if the advertiser is currently online.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_recommended": { + "description": "Indicates that the client was recommended in the most recent review by the current user.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + }, + "last_name": { + "description": "The client'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" + ] + }, + "loginid": { + "description": "The client's account identifier.", + "type": "string" + }, + "name": { + "description": "The client's displayed name.", + "type": "string", + "sensitive": 1 + } + } + }, + "completion_time": { + "description": "The epoch time of the order completion.", + "type": "integer" + }, + "contact_info": { + "description": "Seller contact information.", + "type": "string", + "sensitive": 1 + }, + "created_time": { + "description": "The epoch time of the order creation.", + "type": "integer" + }, + "dispute_details": { + "title": "Dispute Details", + "description": "Details of the order dispute.", + "type": "object", + "additionalProperties": false, + "required": [ + "dispute_reason", + "disputer_loginid" + ], + "properties": { + "dispute_reason": { + "description": "The dispute reason", + "type": [ + "null", + "string" + ] + }, + "disputer_loginid": { + "description": "The loginid of the client who's raising the dispute", + "type": [ + "null", + "string" + ] + } + } + }, + "expiry_time": { + "description": "The epoch time in which the order will be expired.", + "type": "integer" + }, + "id": { + "description": "The unique identifier for this order.", + "type": "string" + }, + "is_incoming": { + "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_reviewable": { + "description": "`1` if a review can be given, otherwise `0`.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_seen": { + "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", + "type": "integer", + "enum": [ + 1, + 0 + ] + }, + "local_currency": { + "description": "Local currency for this order.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$", + "examples": [ + "USD" + ] + }, + "payment_info": { + "description": "Payment instructions.", + "type": "string", + "sensitive": 1 + }, + "payment_method": { + "description": "Supported payment methods. Comma separated list of identifiers.", + "type": [ + "null", + "string" + ] + }, + "payment_method_names": { + "description": "Names of supported payment methods.", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Cost in local currency.", + "type": "number" + }, + "price_display": { + "description": "Cost in local currency, formatted to appropriate decimal places.", + "type": "string" + }, + "rate": { + "description": "Conversion rate of the order.", + "type": "number" + }, + "rate_display": { + "description": "Conversion rate of the order, formatted to appropriate decimal places.", + "type": "string" + }, + "review_details": { + "title": "Review Details", + "description": "Details of the review you gave for this order, if any.", + "type": "object", + "additionalProperties": false, + "required": [ + "created_time", + "rating", + "recommended" + ], + "properties": { + "created_time": { + "description": "The epoch time of the review.", + "type": "integer" + }, + "rating": { + "description": "Rating for the transaction, 1 to 5.", + "type": "integer", + "maximum": 5, + "minimum": 1 + }, + "recommended": { + "description": "`1` if the advertiser is recommended, `0` if not recommended.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + } + } + }, + "status": { + "description": "Current order status.", + "type": "string", + "enum": [ + "pending", + "buyer-confirmed", + "cancelled", + "timed-out", + "blocked", + "refunded", + "completed", + "disputed", + "dispute-refunded", + "dispute-completed" + ] + }, + "type": { + "description": "Whether this is a buy or a sell.", + "type": "string", + "enum": [ + "buy", + "sell" + ] + }, + "verification_lockout_until": { + "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", + "type": "integer" + }, + "verification_next_request": { + "description": "If a verification request has already been made, the epoch time that another verification request can be made.", + "type": "integer" + }, + "verification_pending": { + "description": "Indicates that the seller in the process of confirming the order.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "verification_token_expiry": { + "description": "Epoch time that the current verification token will expire.", + "type": "integer" + } + } + } } - }, - "advertiser_details": { - "title": "Advertiser Details", - "description": "Details of the advertiser for this order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "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] - }, - "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"] - }, - "loginid": { - "description": "The advertiser's account identifier.", - "type": "string" - }, - "name": { - "description": "The advertiser's displayed name.", - "type": "string", - "sensitive": 1 - } - } - }, - "amount": { - "description": "The amount of the order.", - "type": "number" - }, - "amount_display": { - "description": "The amount of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "chat_channel_url": { - "description": "The URL to be used to initialise the chat for this order.", - "type": "string" - }, - "client_details": { - "title": "Client Details", - "description": "Details of the client who created the order.", - "type": "object", - "additionalProperties": false, - "required": ["id", "is_online", "last_online_time", "loginid", "name"], - "properties": { - "first_name": { - "description": "The client's first name.", - "type": "string", - "sensitive": 1 - }, - "id": { - "description": "The client's unique P2P identifier.", - "type": "string" - }, - "is_online": { - "description": "Indicates if the advertiser is currently online.", - "type": "integer", - "enum": [0, 1] - }, - "is_recommended": { - "description": "Indicates that the client was recommended in the most recent review by the current user.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - }, - "last_name": { - "description": "The client'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"] - }, - "loginid": { - "description": "The client's account identifier.", - "type": "string" - }, - "name": { - "description": "The client's displayed name.", + } + }, + "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", - "sensitive": 1 - } + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] } - }, - "completion_time": { - "description": "The epoch time of the order completion.", - "type": "integer" - }, - "contact_info": { - "description": "Seller contact information.", - "type": "string", - "sensitive": 1 - }, - "created_time": { - "description": "The epoch time of the order creation.", - "type": "integer" - }, - "dispute_details": { - "title": "Dispute Details", - "description": "Details of the order dispute.", - "type": "object", - "additionalProperties": false, - "required": ["dispute_reason", "disputer_loginid"], - "properties": { - "dispute_reason": { - "description": "The dispute reason", - "type": ["null", "string"] - }, - "disputer_loginid": { - "description": "The loginid of the client who's raising the dispute", - "type": ["null", "string"] - } - } - }, - "expiry_time": { - "description": "The epoch time in which the order will be expired.", - "type": "integer" - }, - "id": { - "description": "The unique identifier for this order.", - "type": "string" - }, - "is_incoming": { - "description": "`1` if the order is created for the advert of the current client, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_reviewable": { - "description": "`1` if a review can be given, otherwise `0`.", - "type": "integer", - "enum": [0, 1] - }, - "is_seen": { - "description": "`1` if the latest order changes have been seen by the current client, otherwise `0`.", - "type": "integer", - "enum": [1, 0] - }, - "local_currency": { - "description": "Local currency for this order.", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$", - "examples": ["USD"] - }, - "payment_info": { - "description": "Payment instructions.", - "type": "string", - "sensitive": 1 - }, - "payment_method": { - "description": "Supported payment methods. Comma separated list of identifiers.", - "type": ["null", "string"] - }, - "payment_method_names": { - "description": "Names of supported payment methods.", - "type": "array", - "items": { - "type": "string" - } - }, - "price": { - "description": "Cost in local currency.", - "type": "number" - }, - "price_display": { - "description": "Cost in local currency, formatted to appropriate decimal places.", - "type": "string" - }, - "rate": { - "description": "Conversion rate of the order.", - "type": "number" - }, - "rate_display": { - "description": "Conversion rate of the order, formatted to appropriate decimal places.", - "type": "string" - }, - "review_details": { - "title": "Review Details", - "description": "Details of the review you gave for this order, if any.", - "type": "object", - "additionalProperties": false, - "required": ["created_time", "rating", "recommended"], - "properties": { - "created_time": { - "description": "The epoch time of the review.", - "type": "integer" - }, - "rating": { - "description": "Rating for the transaction, 1 to 5.", - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "recommended": { - "description": "`1` if the advertiser is recommended, `0` if not recommended.", - "type": ["integer", "null"], - "enum": [null, 0, 1] - } - } - }, - "status": { - "description": "Current order status.", - "type": "string", - "enum": [ - "pending", - "buyer-confirmed", - "cancelled", - "timed-out", - "blocked", - "refunded", - "completed", - "disputed", - "dispute-refunded", - "dispute-completed" - ] - }, - "type": { - "description": "Whether this is a buy or a sell.", - "type": "string", - "enum": ["buy", "sell"] - }, - "verification_lockout_until": { - "description": "If blocked for too many failed verification attempts, the epoch time that the block will end.", - "type": "integer" - }, - "verification_next_request": { - "description": "If a verification request has already been made, the epoch time that another verification request can be made.", - "type": "integer" - }, - "verification_pending": { - "description": "Indicates that the seller in the process of confirming the order.", - "type": "integer", - "enum": [0, 1] - }, - "verification_token_expiry": { - "description": "Epoch time that the current verification token will expire.", - "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_order_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_order_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_order_list/send.json b/config/v3/p2p_order_list/send.json index 702707b1..02dc1bf9 100644 --- a/config/v3/p2p_order_list/send.json +++ b/config/v3/p2p_order_list/send.json @@ -1,50 +1,63 @@ { - "$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]+$" - }, - "limit": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 50 - }, - "offset": { - "description": "[Optional] Used for paging.", - "type": "integer", - "default": 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.", - "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]+$" + }, + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_order_review/example.json b/config/v3/p2p_order_review/example.json index 0515eca0..1058de99 100644 --- a/config/v3/p2p_order_review/example.json +++ b/config/v3/p2p_order_review/example.json @@ -1,6 +1,6 @@ { - "p2p_order_review": 1, - "order_id": "1234", - "rating": 4, - "recommended": 1 + "p2p_order_review": 1, + "order_id": "1234", + "rating": 4, + "recommended": 1 } diff --git a/config/v3/p2p_order_review/receive.json b/config/v3/p2p_order_review/receive.json index 51db9aa2..6df71b20 100644 --- a/config/v3/p2p_order_review/receive.json +++ b/config/v3/p2p_order_review/receive.json @@ -1,55 +1,73 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Order Review (response)", - "description": "Response for creating a P2P order review.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_order_review": { - "title": "p2p_order_review", - "description": "Details of the created order review.", - "type": "object", - "additionalProperties": false, - "required": ["advertiser_id", "created_time", "order_id", "rating", "recommended"], - "properties": { - "advertiser_id": { - "description": "The reviewed advertiser's identification number.", - "type": "string" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Order Review (response)", + "description": "Response for creating a P2P order review.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_order_review": { + "title": "p2p_order_review", + "description": "Details of the created order review.", + "type": "object", + "additionalProperties": false, + "required": [ + "advertiser_id", + "created_time", + "order_id", + "rating", + "recommended" + ], + "properties": { + "advertiser_id": { + "description": "The reviewed advertiser's identification number.", + "type": "string" + }, + "created_time": { + "description": "The epoch time of the review.", + "type": "integer" + }, + "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": "`1` if the advertiser is recommended, `0` if not recommended.", + "type": [ + "integer", + "null" + ], + "enum": [ + null, + 0, + 1 + ] + } + } }, - "created_time": { - "description": "The epoch time of the review.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "order_id": { - "description": "The order identification number.", - "type": "string", - "pattern": "^[0-9]+$" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_order_review" + ] }, - "rating": { - "description": "Rating for the transaction, 1 to 5.", - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "recommended": { - "description": "`1` if the advertiser is recommended, `0` if not recommended.", - "type": ["integer", "null"], - "enum": [null, 0, 1] + "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_order_review"] - }, - "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_order_review/send.json b/config/v3/p2p_order_review/send.json index f7dab840..b0d2355e 100644 --- a/config/v3/p2p_order_review/send.json +++ b/config/v3/p2p_order_review/send.json @@ -1,41 +1,57 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_payment_methods/example.json b/config/v3/p2p_payment_methods/example.json index ea7df7ba..a10b68b4 100644 --- a/config/v3/p2p_payment_methods/example.json +++ b/config/v3/p2p_payment_methods/example.json @@ -1,3 +1,3 @@ { - "p2p_payment_methods": 1 + "p2p_payment_methods": 1 } diff --git a/config/v3/p2p_payment_methods/receive.json b/config/v3/p2p_payment_methods/receive.json index 23d2369b..c98030ad 100644 --- a/config/v3/p2p_payment_methods/receive.json +++ b/config/v3/p2p_payment_methods/receive.json @@ -1,75 +1,95 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Payment Methods (response)", - "description": "List all P2P payment methods.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_payment_methods": { - "description": "Payment methods keyed by identifier.", - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[a-z0-9_]{1,30}$": { - "description": "Payment method identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "fields", "type"], - "properties": { - "display_name": { - "description": "Display name of payment method.", - "type": "string" - }, - "fields": { - "description": "Payment method field definitions.", - "type": "object", - "additionalProperties": false, - "minProperties": 1, - "patternProperties": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Payment Methods (response)", + "description": "List all P2P payment methods.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_payment_methods": { + "description": "Payment methods keyed by identifier.", + "type": "object", + "additionalProperties": false, + "patternProperties": { "^[a-z0-9_]{1,30}$": { - "description": "Field identifier.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "required", "type"], - "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"] + "description": "Payment method identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "fields", + "type" + ], + "properties": { + "display_name": { + "description": "Display name of payment method.", + "type": "string" + }, + "fields": { + "description": "Payment method field definitions.", + "type": "object", + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^[a-z0-9_]{1,30}$": { + "description": "Field identifier.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "required", + "type" + ], + "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" + ] + } + } + } + } + }, + "type": { + "description": "Payment method type.", + "type": "string", + "enum": [ + "bank", + "ewallet", + "other" + ] + } } - } } - } - }, - "type": { - "description": "Payment method type.", - "type": "string", - "enum": ["bank", "ewallet", "other"] } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_payment_methods" + ] + }, + "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_payment_methods"] - }, - "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_payment_methods/send.json b/config/v3/p2p_payment_methods/send.json index 28adab3a..3d170752 100644 --- a/config/v3/p2p_payment_methods/send.json +++ b/config/v3/p2p_payment_methods/send.json @@ -1,25 +1,32 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/p2p_ping/example.json b/config/v3/p2p_ping/example.json index 9b0f48de..e17dffe7 100644 --- a/config/v3/p2p_ping/example.json +++ b/config/v3/p2p_ping/example.json @@ -1,3 +1,3 @@ { - "p2p_ping": 1 + "p2p_ping": 1 } diff --git a/config/v3/p2p_ping/receive.json b/config/v3/p2p_ping/receive.json index 55901069..43b6166f 100644 --- a/config/v3/p2p_ping/receive.json +++ b/config/v3/p2p_ping/receive.json @@ -1,27 +1,34 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "P2P Ping (response)", - "description": "The response of P2P ping request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "p2p_ping": { - "description": "Will return 'pong'", - "type": "string", - "enum": ["pong"] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["p2p_ping"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "P2P Ping (response)", + "description": "The response of P2P ping request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "p2p_ping": { + "description": "Will return 'pong'", + "type": "string", + "enum": [ + "pong" + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "p2p_ping" + ] + }, + "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_ping/send.json b/config/v3/p2p_ping/send.json index bb956f68..d6fb813f 100644 --- a/config/v3/p2p_ping/send.json +++ b/config/v3/p2p_ping/send.json @@ -1,25 +1,32 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/payment_methods/example.json b/config/v3/payment_methods/example.json index 9e5661d1..dc9c2955 100644 --- a/config/v3/payment_methods/example.json +++ b/config/v3/payment_methods/example.json @@ -1,4 +1,4 @@ { - "payment_methods": 1, - "country": "id" + "payment_methods": 1, + "country": "id" } diff --git a/config/v3/payment_methods/receive.json b/config/v3/payment_methods/receive.json index eb380fb4..c214b364 100644 --- a/config/v3/payment_methods/receive.json +++ b/config/v3/payment_methods/receive.json @@ -1,180 +1,223 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Methods (response)", - "description": "List of available payment methods for a given country.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "payment_methods": { - "title": "payment_methods", - "description": "Available payment methods for a given country. Note: if a user is logged in, the residence country will be considered.", - "type": "array", - "items": { - "title": "The payment_method schema", - "description": "A payment method suported for the given country", - "type": "object", - "additionalProperties": false, - "required": [ - "deposit_limits", - "deposit_time", - "description", - "display_name", - "id", - "payment_processor", - "predefined_amounts", - "signup_link", - "supported_currencies", - "type", - "type_display_name", - "withdraw_limits", - "withdrawal_time" - ], - "properties": { - "deposit_limits": { - "title": "deposit_limits", - "description": "The min and max values for deposits.", - "type": "object", - "patternProperties": { - "^[A-Z]{3}$": { - "title": "Currency limits", - "description": "Deposit limits for this method.", - "type": "object", - "additionalProperties": false, - "required": ["max", "min"], - "properties": { - "max": { - "title": "max", - "description": "Maximum amount for deposits for this currency.", - "type": "integer", - "examples": [100] - }, - "min": { - "title": "min", - "description": "Minimum amount for deposit for this currency.", - "type": "integer", - "examples": [5] - } - } - } - } - }, - "deposit_time": { - "title": "deposit_time", - "description": "How much time it takes for a deposit to be processed.", - "type": "string", - "examples": ["instant"] - }, - "description": { - "title": "description", - "description": "Short description explaining the payment method.", - "type": "string", - "examples": ["Use your bank account to deposit and withdraw. Bank charges apply."] - }, - "display_name": { - "title": "display_name", - "description": "Common name for the payment method.", - "type": "string", - "examples": ["Bank Transfer"] - }, - "id": { - "title": "id", - "description": "Unique identifier for the payment method.", - "type": "string", - "examples": ["bank_transfer"] - }, - "payment_processor": { - "title": "type", - "description": "Payment processor for this payment method.", - "type": "string", - "examples": ["Skrill"] - }, - "predefined_amounts": { - "title": "The predefined_amounts schema", - "description": "A list of predefined amounts for withdraw or deposit.", - "type": "array", - "items": { - "description": "Predefined amount to withdraw or deposit.", - "type": "integer", - "examples": [5, 10] - } - }, - "signup_link": { - "title": "signup_link", - "description": "Sign up link for this payment method.", - "type": "string", - "examples": ["https://account.skrill.com/wallet/account/sign-up"] - }, - "supported_currencies": { - "title": "supported_currencies", - "description": "Currencies supported for this payment method.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Methods (response)", + "description": "List of available payment methods for a given country.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "payment_methods": { + "title": "payment_methods", + "description": "Available payment methods for a given country. Note: if a user is logged in, the residence country will be considered.", "type": "array", "items": { - "description": "Supported currency, using 3-letter code (ISO standard).", - "type": "string", - "examples": ["EUR", "USD"] - } - }, - "type": { - "title": "type", - "description": "Type of Payment Method.", - "type": "string", - "examples": ["bank_wire"] - }, - "type_display_name": { - "title": "type_display_name", - "description": "A printable description for type of payment method.", - "type": "string", - "examples": ["Bank Wire"] - }, - "withdraw_limits": { - "title": "withdraw_limits", - "description": "Withdrawal limits per currency.", - "type": "object", - "patternProperties": { - "^[A-Z]{3}$": { - "title": "Currency limits", - "description": "Withdrawal limits for this currency.", + "title": "The payment_method schema", + "description": "A payment method suported for the given country", "type": "object", "additionalProperties": false, - "required": ["max", "min"], + "required": [ + "deposit_limits", + "deposit_time", + "description", + "display_name", + "id", + "payment_processor", + "predefined_amounts", + "signup_link", + "supported_currencies", + "type", + "type_display_name", + "withdraw_limits", + "withdrawal_time" + ], "properties": { - "max": { - "title": "max", - "description": "Maximum amount for wihdrawals in this currency.", - "type": "integer", - "examples": [10] - }, - "min": { - "title": "min", - "description": "Minimum amount for withdrawals in this currency.", - "type": "integer", - "examples": [5] - } + "deposit_limits": { + "title": "deposit_limits", + "description": "The min and max values for deposits.", + "type": "object", + "patternProperties": { + "^[A-Z]{3}$": { + "title": "Currency limits", + "description": "Deposit limits for this method.", + "type": "object", + "additionalProperties": false, + "required": [ + "max", + "min" + ], + "properties": { + "max": { + "title": "max", + "description": "Maximum amount for deposits for this currency.", + "type": "integer", + "examples": [ + 100 + ] + }, + "min": { + "title": "min", + "description": "Minimum amount for deposit for this currency.", + "type": "integer", + "examples": [ + 5 + ] + } + } + } + } + }, + "deposit_time": { + "title": "deposit_time", + "description": "How much time it takes for a deposit to be processed.", + "type": "string", + "examples": [ + "instant" + ] + }, + "description": { + "title": "description", + "description": "Short description explaining the payment method.", + "type": "string", + "examples": [ + "Use your bank account to deposit and withdraw. Bank charges apply." + ] + }, + "display_name": { + "title": "display_name", + "description": "Common name for the payment method.", + "type": "string", + "examples": [ + "Bank Transfer" + ] + }, + "id": { + "title": "id", + "description": "Unique identifier for the payment method.", + "type": "string", + "examples": [ + "bank_transfer" + ] + }, + "payment_processor": { + "title": "type", + "description": "Payment processor for this payment method.", + "type": "string", + "examples": [ + "Skrill" + ] + }, + "predefined_amounts": { + "title": "The predefined_amounts schema", + "description": "A list of predefined amounts for withdraw or deposit.", + "type": "array", + "items": { + "description": "Predefined amount to withdraw or deposit.", + "type": "integer", + "examples": [ + 5, + 10 + ] + } + }, + "signup_link": { + "title": "signup_link", + "description": "Sign up link for this payment method.", + "type": "string", + "examples": [ + "https://account.skrill.com/wallet/account/sign-up" + ] + }, + "supported_currencies": { + "title": "supported_currencies", + "description": "Currencies supported for this payment method.", + "type": "array", + "items": { + "description": "Supported currency, using 3-letter code (ISO standard).", + "type": "string", + "examples": [ + "EUR", + "USD" + ] + } + }, + "type": { + "title": "type", + "description": "Type of Payment Method.", + "type": "string", + "examples": [ + "bank_wire" + ] + }, + "type_display_name": { + "title": "type_display_name", + "description": "A printable description for type of payment method.", + "type": "string", + "examples": [ + "Bank Wire" + ] + }, + "withdraw_limits": { + "title": "withdraw_limits", + "description": "Withdrawal limits per currency.", + "type": "object", + "patternProperties": { + "^[A-Z]{3}$": { + "title": "Currency limits", + "description": "Withdrawal limits for this currency.", + "type": "object", + "additionalProperties": false, + "required": [ + "max", + "min" + ], + "properties": { + "max": { + "title": "max", + "description": "Maximum amount for wihdrawals in this currency.", + "type": "integer", + "examples": [ + 10 + ] + }, + "min": { + "title": "min", + "description": "Minimum amount for withdrawals in this currency.", + "type": "integer", + "examples": [ + 5 + ] + } + } + } + } + }, + "withdrawal_time": { + "title": "withdrawal_time", + "description": "How much time takes a withdrawal to be processed.", + "type": "string", + "examples": [ + "1 working day" + ] + } } - } } - }, - "withdrawal_time": { - "title": "withdrawal_time", - "description": "How much time takes a withdrawal to be processed.", + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", "type": "string", - "examples": ["1 working day"] - } + "enum": [ + "payment_methods" + ] + }, + "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": ["payment_methods"] - }, - "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/payment_methods/send.json b/config/v3/payment_methods/send.json index e652c1cb..ff713302 100644 --- a/config/v3/payment_methods/send.json +++ b/config/v3/payment_methods/send.json @@ -1,29 +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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_create/example.json b/config/v3/paymentagent_create/example.json index 89906794..aa6487b3 100644 --- a/config/v3/paymentagent_create/example.json +++ b/config/v3/paymentagent_create/example.json @@ -1,28 +1,28 @@ { - "paymentagent_create": 1, - "affiliate_id": "1231234", - "code_of_conduct_approval": 1, - "commission_deposit": 2, - "commission_withdrawal": 3, - "email": "joe@joy.com", - "information": "The best person you can find", - "payment_agent_name": "Joe Joy", - "phone_numbers": [ - { - "phone_number": "+923-22-23-13" - } - ], - "supported_payment_methods": [ - { - "payment_method": "MasterCard" - }, - { - "payment_method": "Visa" - } - ], - "urls": [ - { - "url": "https://abc.com" - } - ] + "paymentagent_create": 1, + "affiliate_id": "1231234", + "code_of_conduct_approval": 1, + "commission_deposit": 2, + "commission_withdrawal": 3, + "email": "joe@joy.com", + "information": "The best person you can find", + "payment_agent_name": "Joe Joy", + "phone_numbers": [ + { + "phone_number": "+923-22-23-13" + } + ], + "supported_payment_methods": [ + { + "payment_method": "MasterCard" + }, + { + "payment_method": "Visa" + } + ], + "urls": [ + { + "url": "https://abc.com" + } + ] } diff --git a/config/v3/paymentagent_create/receive.json b/config/v3/paymentagent_create/receive.json index e686bcb8..a89707af 100644 --- a/config/v3/paymentagent_create/receive.json +++ b/config/v3/paymentagent_create/receive.json @@ -1,22 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment agent create (response)", - "description": "Sets client's payment agent details.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["paymentagent_create"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment agent create (response)", + "description": "Sets client's payment agent details.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "paymentagent_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/paymentagent_create/send.json b/config/v3/paymentagent_create/send.json index 38f2491f..ac2283a6 100644 --- a/config/v3/paymentagent_create/send.json +++ b/config/v3/paymentagent_create/send.json @@ -1,121 +1,134 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment agent create (request)", - "description": "Saves client's payment agent details.", - "beta": 1, - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": [ - "paymentagent_create", - "code_of_conduct_approval", - "commission_deposit", - "commission_withdrawal", - "email", - "information", - "payment_agent_name", - "supported_payment_methods", - "urls" - ], - "properties": { - "paymentagent_create": { - "description": "Must be 1", - "type": "integer", - "enum": [1] - }, - "affiliate_id": { - "description": "[Optional] Client's My Affiliate id, if exists.", - "type": "string", - "pattern": "^[\\w]{0,32}$" - }, - "code_of_conduct_approval": { - "description": "Indicates client's agreement with the Code of Conduct.", - "type": "integer", - "enum": [1] - }, - "commission_deposit": { - "description": "Commission (%) the agent wants to take on deposits", - "type": "number", - "maximum": 9, - "minimum": 0 - }, - "commission_withdrawal": { - "description": "Commission (%) the agent wants to take on withdrawals", - "type": "number", - "maximum": 9, - "minimum": 0 - }, - "email": { - "description": "Payment agent's email address.", - "type": "string", - "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{1,255}$" - }, - "information": { - "description": "[Optional] Information about payment agent and their proposed service.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,500}$" - }, - "payment_agent_name": { - "description": "The name with which the payment agent is going to be identified.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,100}$" - }, - "phone_numbers": { - "description": "Payment agent's phone number(s) with country code.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["phone_number"], - "properties": { - "phone_number": { - "description": "A phone number", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment agent create (request)", + "description": "Saves client's payment agent details.", + "beta": 1, + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "paymentagent_create", + "code_of_conduct_approval", + "commission_deposit", + "commission_withdrawal", + "email", + "information", + "payment_agent_name", + "supported_payment_methods", + "urls" + ], + "properties": { + "paymentagent_create": { + "description": "Must be 1", + "type": "integer", + "enum": [ + 1 + ] + }, + "affiliate_id": { + "description": "[Optional] Client's My Affiliate id, if exists.", "type": "string", - "pattern": "^\\+[\\-\\ 0-9]{8,40}$" - } - } - } - }, - "supported_payment_methods": { - "description": "A list of supported payment methods.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["payment_method"], - "properties": { - "payment_method": { - "description": "A payment method's name", + "pattern": "^[\\w]{0,32}$" + }, + "code_of_conduct_approval": { + "description": "Indicates client's agreement with the Code of Conduct.", + "type": "integer", + "enum": [ + 1 + ] + }, + "commission_deposit": { + "description": "Commission (%) the agent wants to take on deposits", + "type": "number", + "maximum": 9, + "minimum": 0 + }, + "commission_withdrawal": { + "description": "Commission (%) the agent wants to take on withdrawals", + "type": "number", + "maximum": 9, + "minimum": 0 + }, + "email": { + "description": "Payment agent's email address.", "type": "string", - "pattern": "^[\\w \\-]{2,30}$" - } - } - } - }, - "urls": { - "description": "The URL(s) of payment agent's website(s).", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["url"], - "properties": { - "url": { - "description": "A webpage or website's URL.", + "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{1,255}$" + }, + "information": { + "description": "[Optional] Information about payment agent and their proposed service.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()@#/+-]{1,500}$" + }, + "payment_agent_name": { + "description": "The name with which the payment agent is going to be identified.", "type": "string", - "pattern": "^[a-z][a-z0-9.+\\-]*://[0-9a-zA-Z\\.-]+[\\%\\/\\w \\.-]*$" - } + "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/paymentagent_details/example.json b/config/v3/paymentagent_details/example.json index 6a5f356b..8d120425 100644 --- a/config/v3/paymentagent_details/example.json +++ b/config/v3/paymentagent_details/example.json @@ -1,3 +1,3 @@ { - "paymentagent_details": 1 + "paymentagent_details": 1 } diff --git a/config/v3/paymentagent_details/receive.json b/config/v3/paymentagent_details/receive.json index 15a4add4..fe0e5b5e 100644 --- a/config/v3/paymentagent_details/receive.json +++ b/config/v3/paymentagent_details/receive.json @@ -1,152 +1,179 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment agent details (response)", - "description": "Gets client's payment agent details.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "required": ["echo_req", "msg_type"], - "properties": { - "paymentagent_details": { - "description": "The payment agent details.", - "type": "object", - "additionalProperties": false, - "required": ["can_apply"], - "properties": { - "affiliate_id": { - "description": "Client's My Affiliate id, if exists.", - "type": ["null", "string"] - }, - "can_apply": { - "description": "If 1, the client may apply using paymentagent_create.", - "type": "integer", - "enum": [0, 1] - }, - "code_of_conduct_approval": { - "description": "Indicates client's agreement with the Code of Conduct document.", - "type": "integer", - "enum": [0, 1] - }, - "commission_deposit": { - "description": "Commission (%) the agent want to take on deposits", - "type": "number" - }, - "commission_withdrawal": { - "description": "Commission (%) the agent want to take on withdrawals", - "type": "number" - }, - "currency_code": { - "description": "Currency supported by the payment agent. It's usually the same as agent's Deriv account currency.", - "type": "string" - }, - "eligibilty_validation": { - "description": "Contains a list of error codes that would prevent a successful payment agent application.", - "type": "array", - "items": { - "type": "string" - } - }, - "email": { - "description": "Payment agent's email address.", - "type": "string" - }, - "information": { - "description": "Information about payment agent and their proposed service.", - "type": "string" - }, - "max_withdrawal": { - "description": "Maximum amount allowed for withdrawals", - "type": "number" - }, - "min_withdrawal": { - "description": "Minimum amount allowed for withdrawals", - "type": "number" - }, - "newly_authorized": { - "description": "Indicates if the payment agent was recently approved with no transactions yet.", - "type": "integer", - "enum": [0, 1] - }, - "payment_agent_name": { - "description": "The name with which the payment agent is going to be identified.", - "type": "string" - }, - "phone_numbers": { - "description": "Payment agent's phone number(s) with country code.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment agent details (response)", + "description": "Gets client's payment agent details.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "paymentagent_details": { + "description": "The payment agent details.", "type": "object", "additionalProperties": false, + "required": [ + "can_apply" + ], "properties": { - "phone_number": { - "description": "A phone number.", - "type": "string" - } + "affiliate_id": { + "description": "Client's My Affiliate id, if exists.", + "type": [ + "null", + "string" + ] + }, + "can_apply": { + "description": "If 1, the client may apply using paymentagent_create.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "code_of_conduct_approval": { + "description": "Indicates client's agreement with the Code of Conduct document.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "commission_deposit": { + "description": "Commission (%) the agent want to take on deposits", + "type": "number" + }, + "commission_withdrawal": { + "description": "Commission (%) the agent want to take on withdrawals", + "type": "number" + }, + "currency_code": { + "description": "Currency supported by the payment agent. It's usually the same as agent's Deriv account currency.", + "type": "string" + }, + "eligibilty_validation": { + "description": "Contains a list of error codes that would prevent a successful payment agent application.", + "type": "array", + "items": { + "type": "string" + } + }, + "email": { + "description": "Payment agent's email address.", + "type": "string" + }, + "information": { + "description": "Information about payment agent and their proposed service.", + "type": "string" + }, + "max_withdrawal": { + "description": "Maximum amount allowed for withdrawals", + "type": "number" + }, + "min_withdrawal": { + "description": "Minimum amount allowed for withdrawals", + "type": "number" + }, + "newly_authorized": { + "description": "Indicates if the payment agent was recently approved with no transactions yet.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "payment_agent_name": { + "description": "The name with which the payment agent is going to be identified.", + "type": "string" + }, + "phone_numbers": { + "description": "Payment agent's phone number(s) with country code.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "phone_number": { + "description": "A phone number.", + "type": "string" + } + } + } + }, + "status": { + "description": "Indicates the status of the Payment Agent.", + "anyOf": [ + { + "type": "string", + "enum": [ + "applied", + "verified", + "authorized", + "rejected", + "suspended" + ] + }, + { + "type": "null" + } + ] + }, + "supported_payment_methods": { + "description": "A list of supported payment methods.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "payment_method": { + "description": "A payment method's name", + "type": "string" + } + } + } + }, + "target_country": { + "description": "Client's target country.", + "type": "string" + }, + "urls": { + "description": "The URL(s) of payment agent's website(s).", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "description": "A website url.", + "type": "string" + } + } + } + } } - } }, - "status": { - "description": "Indicates the status of the Payment Agent.", - "anyOf": [ - { - "type": "string", - "enum": ["applied", "verified", "authorized", "rejected", "suspended"] - }, - { - "type": "null" - } - ] + "passthrough": { + "description": "Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" }, - "supported_payment_methods": { - "description": "A list of supported payment methods.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "payment_method": { - "description": "A payment method's name", - "type": "string" - } - } - } + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "target_country": { - "description": "Client's target country.", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "paymentagent_details" + ] }, - "urls": { - "description": "The URL(s) of payment agent's website(s).", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "description": "A website url.", - "type": "string" - } - } - } + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "passthrough": { - "description": "Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["paymentagent_details"] - }, - "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/paymentagent_details/send.json b/config/v3/paymentagent_details/send.json index 6fb0789b..81a831e1 100644 --- a/config/v3/paymentagent_details/send.json +++ b/config/v3/paymentagent_details/send.json @@ -1,25 +1,32 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_list/example.json b/config/v3/paymentagent_list/example.json index b0ce5fa9..2abb25df 100644 --- a/config/v3/paymentagent_list/example.json +++ b/config/v3/paymentagent_list/example.json @@ -1,3 +1,3 @@ { - "paymentagent_list": "id" + "paymentagent_list": "id" } diff --git a/config/v3/paymentagent_list/receive.json b/config/v3/paymentagent_list/receive.json index 935a5b3c..a14058cd 100644 --- a/config/v3/paymentagent_list/receive.json +++ b/config/v3/paymentagent_list/receive.json @@ -1,149 +1,165 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: List (response)", - "description": "A message with Payment Agent List", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "paymentagent_list": { - "title": "paymentagent_list", - "description": "Payment Agent List", - "type": "object", - "additionalProperties": false, - "required": ["list"], - "properties": { - "available_countries": { - "description": "The list of countries in which payment agent is available.", - "type": "array", - "items": { - "description": "The `country_code` and `country_name`", - "type": "array", - "items": { - "type": ["null", "string"] - } - } - }, - "list": { - "description": "List of payment agents available in the requested country.", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: List (response)", + "description": "A message with Payment Agent List", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "paymentagent_list": { + "title": "paymentagent_list", + "description": "Payment Agent List", "type": "object", "additionalProperties": false, "required": [ - "currencies", - "deposit_commission", - "email", - "further_information", - "max_withdrawal", - "min_withdrawal", - "name", - "paymentagent_loginid", - "phone_numbers", - "summary", - "supported_payment_methods", - "urls", - "withdrawal_commission" + "list" ], "properties": { - "currencies": { - "description": "Currencies that are accepted by this payment agent.", - "type": "string" - }, - "deposit_commission": { - "description": "Commission amount applied on deposits made through this payment agent.", - "type": "string" - }, - "email": { - "description": "Payment agent's email address.", - "type": "string" - }, - "further_information": { - "description": "More descriptions about this payment agent.", - "type": "string" - }, - "max_withdrawal": { - "description": "Maximum withdrawal allowed for transactions through this payment agent.", - "type": ["null", "string"] - }, - "min_withdrawal": { - "description": "Minimum withdrawal allowed for transactions through this payment agent.", - "type": ["null", "string"] - }, - "name": { - "description": "Payment agent's name.", - "type": "string" - }, - "paymentagent_loginid": { - "description": "Payment agent's loginid.", - "type": "string" - }, - "phone_numbers": { - "description": "Payment agent's phone number(s) with country code.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "phone_number": { - "description": "A phone number", - "type": "string" - } - } - } - }, - "summary": { - "description": "A summary about payment agent.", - "type": "string" - }, - "supported_payment_methods": { - "description": "A list of supported payment methods.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "payment_method": { - "description": "A payment method's name", - "type": "string" + "available_countries": { + "description": "The list of countries in which payment agent is available.", + "type": "array", + "items": { + "description": "The `country_code` and `country_name`", + "type": "array", + "items": { + "type": [ + "null", + "string" + ] + } } - } - } - }, - "urls": { - "description": "The URL(s) of payment agent's website(s).", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "url": { - "description": "A webpage or website's URL.", - "type": "string" + }, + "list": { + "description": "List of payment agents available in the requested country.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "currencies", + "deposit_commission", + "email", + "further_information", + "max_withdrawal", + "min_withdrawal", + "name", + "paymentagent_loginid", + "phone_numbers", + "summary", + "supported_payment_methods", + "urls", + "withdrawal_commission" + ], + "properties": { + "currencies": { + "description": "Currencies that are accepted by this payment agent.", + "type": "string" + }, + "deposit_commission": { + "description": "Commission amount applied on deposits made through this payment agent.", + "type": "string" + }, + "email": { + "description": "Payment agent's email address.", + "type": "string" + }, + "further_information": { + "description": "More descriptions about this payment agent.", + "type": "string" + }, + "max_withdrawal": { + "description": "Maximum withdrawal allowed for transactions through this payment agent.", + "type": [ + "null", + "string" + ] + }, + "min_withdrawal": { + "description": "Minimum withdrawal allowed for transactions through this payment agent.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "Payment agent's name.", + "type": "string" + }, + "paymentagent_loginid": { + "description": "Payment agent's loginid.", + "type": "string" + }, + "phone_numbers": { + "description": "Payment agent's phone number(s) with country code.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "phone_number": { + "description": "A phone number", + "type": "string" + } + } + } + }, + "summary": { + "description": "A summary about payment agent.", + "type": "string" + }, + "supported_payment_methods": { + "description": "A list of supported payment methods.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "payment_method": { + "description": "A payment method's name", + "type": "string" + } + } + } + }, + "urls": { + "description": "The URL(s) of payment agent's website(s).", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "url": { + "description": "A webpage or website's URL.", + "type": "string" + } + } + } + }, + "withdrawal_commission": { + "description": "Commission amount applied on withdrawals made through this payment agent.", + "type": "string" + } + } } - } } - }, - "withdrawal_commission": { - "description": "Commission amount applied on withdrawals made through this payment agent.", - "type": "string" - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "paymentagent_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": ["paymentagent_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/paymentagent_list/send.json b/config/v3/paymentagent_list/send.json index aded077b..b49aa7f3 100644 --- a/config/v3/paymentagent_list/send.json +++ b/config/v3/paymentagent_list/send.json @@ -1,30 +1,33 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_transfer/example.json b/config/v3/paymentagent_transfer/example.json index b9bdd913..354a5d13 100644 --- a/config/v3/paymentagent_transfer/example.json +++ b/config/v3/paymentagent_transfer/example.json @@ -1,6 +1,6 @@ { - "paymentagent_transfer": 1, - "amount": 1000, - "currency": "USD", - "transfer_to": "CR100001" + "paymentagent_transfer": 1, + "amount": 1000, + "currency": "USD", + "transfer_to": "CR100001" } diff --git a/config/v3/paymentagent_transfer/receive.json b/config/v3/paymentagent_transfer/receive.json index 0b1d5f42..9c824714 100644 --- a/config/v3/paymentagent_transfer/receive.json +++ b/config/v3/paymentagent_transfer/receive.json @@ -1,40 +1,48 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: Transfer (response)", - "description": "The result of transfer request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "paymentagent_transfer": { - "title": "paymentagent_transfer", - "description": "If set to `1`, transfer success. If set to `2`, dry-run success.", - "type": "integer", - "enum": [1, 2] - }, - "client_to_full_name": { - "description": "The `transfer_to` client full name", - "type": "string" - }, - "client_to_loginid": { - "description": "The `transfer_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": ["paymentagent_transfer"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Transfer (response)", + "description": "The result of transfer request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "paymentagent_transfer": { + "title": "paymentagent_transfer", + "description": "If set to `1`, transfer success. If set to `2`, dry-run success.", + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "client_to_full_name": { + "description": "The `transfer_to` client full name", + "type": "string" + }, + "client_to_loginid": { + "description": "The `transfer_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": [ + "paymentagent_transfer" + ] + }, + "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/paymentagent_transfer/send.json b/config/v3/paymentagent_transfer/send.json index a7de7038..139f77e9 100644 --- a/config/v3/paymentagent_transfer/send.json +++ b/config/v3/paymentagent_transfer/send.json @@ -1,49 +1,62 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_withdraw/example.json b/config/v3/paymentagent_withdraw/example.json index 311e21aa..e5db8554 100644 --- a/config/v3/paymentagent_withdraw/example.json +++ b/config/v3/paymentagent_withdraw/example.json @@ -1,7 +1,7 @@ { - "paymentagent_withdraw": 1, - "amount": 1000, - "currency": "USD", - "paymentagent_loginid": "CR100001", - "verification_code": "my_verification_code" + "paymentagent_withdraw": 1, + "amount": 1000, + "currency": "USD", + "paymentagent_loginid": "CR100001", + "verification_code": "my_verification_code" } diff --git a/config/v3/paymentagent_withdraw/receive.json b/config/v3/paymentagent_withdraw/receive.json index c16bcd8b..7b18470b 100644 --- a/config/v3/paymentagent_withdraw/receive.json +++ b/config/v3/paymentagent_withdraw/receive.json @@ -1,36 +1,44 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payment Agent: Withdraw (response)", - "description": "The result of payment agent withdrawal request made.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "paymentagent_withdraw": { - "title": "paymentagent_withdraw", - "description": "If set to `1`, withdrawal success. If set to `2`, dry-run success.", - "type": "integer", - "enum": [1, 2] - }, - "paymentagent_name": { - "description": "Payment agent name.", - "type": "string" - }, - "transaction_id": { - "description": "Reference ID of withdrawal 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": ["paymentagent_withdraw"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Withdraw (response)", + "description": "The result of payment agent withdrawal request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "paymentagent_withdraw": { + "title": "paymentagent_withdraw", + "description": "If set to `1`, withdrawal success. If set to `2`, dry-run success.", + "type": "integer", + "enum": [ + 1, + 2 + ] + }, + "paymentagent_name": { + "description": "Payment agent name.", + "type": "string" + }, + "transaction_id": { + "description": "Reference ID of withdrawal 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": [ + "paymentagent_withdraw" + ] + }, + "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/paymentagent_withdraw/send.json b/config/v3/paymentagent_withdraw/send.json index 3743472a..ea407351 100644 --- a/config/v3/paymentagent_withdraw/send.json +++ b/config/v3/paymentagent_withdraw/send.json @@ -1,60 +1,68 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/paymentagent_withdraw_justification/example.json b/config/v3/paymentagent_withdraw_justification/example.json new file mode 100644 index 00000000..d912a7f0 --- /dev/null +++ b/config/v3/paymentagent_withdraw_justification/example.json @@ -0,0 +1,4 @@ +{ + "paymentagent_withdraw_justification": 1, + "message": "my justification" +} diff --git a/config/v3/paymentagent_withdraw_justification/receive.json b/config/v3/paymentagent_withdraw_justification/receive.json new file mode 100644 index 00000000..4e576146 --- /dev/null +++ b/config/v3/paymentagent_withdraw_justification/receive.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payment Agent: Withdraw justification (response)", + "description": "The result of payment agent withdrawal justification request made.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "paymentagent_withdraw_justification": { + "description": "1 on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "paymentagent_withdraw_justification" + ] + }, + "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/paymentagent_withdraw_justification/send.json b/config/v3/paymentagent_withdraw_justification/send.json new file mode 100644 index 00000000..9aebcec4 --- /dev/null +++ b/config/v3/paymentagent_withdraw_justification/send.json @@ -0,0 +1,38 @@ +{ + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } + } +} diff --git a/config/v3/payout_currencies/example.json b/config/v3/payout_currencies/example.json index 5e727c89..ad3b5fc7 100644 --- a/config/v3/payout_currencies/example.json +++ b/config/v3/payout_currencies/example.json @@ -1,3 +1,3 @@ { - "payout_currencies": 1 + "payout_currencies": 1 } diff --git a/config/v3/payout_currencies/receive.json b/config/v3/payout_currencies/receive.json index 28ca0509..94ff78cf 100644 --- a/config/v3/payout_currencies/receive.json +++ b/config/v3/payout_currencies/receive.json @@ -1,32 +1,39 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Payout Currencies (response)", - "description": "List of available payout currencies.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "payout_currencies": { - "title": "payout_currencies", - "description": "Available payout currencies. Note: if a user is logged in, only the currency available for the account will be returned.", - "type": "array", - "items": { - "description": "Available payout currency.", - "type": "string", - "examples": ["USD"] - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["payout_currencies"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Payout Currencies (response)", + "description": "List of available payout currencies.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "payout_currencies": { + "title": "payout_currencies", + "description": "Available payout currencies. Note: if a user is logged in, only the currency available for the account will be returned.", + "type": "array", + "items": { + "description": "Available payout currency.", + "type": "string", + "examples": [ + "USD" + ] + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "payout_currencies" + ] + }, + "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/payout_currencies/send.json b/config/v3/payout_currencies/send.json index bda6d423..49414ee3 100644 --- a/config/v3/payout_currencies/send.json +++ b/config/v3/payout_currencies/send.json @@ -1,24 +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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/ping/example.json b/config/v3/ping/example.json index d13adadb..d3f55c49 100644 --- a/config/v3/ping/example.json +++ b/config/v3/ping/example.json @@ -1,3 +1,3 @@ { - "ping": 1 + "ping": 1 } diff --git a/config/v3/ping/receive.json b/config/v3/ping/receive.json index add24d39..a0489330 100644 --- a/config/v3/ping/receive.json +++ b/config/v3/ping/receive.json @@ -1,28 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ping (response)", - "description": "The response of ping request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "ping": { - "title": "ping", - "description": "Will return 'pong'", - "type": "string", - "enum": ["pong"] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["ping"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ping (response)", + "description": "The response of ping request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "ping": { + "title": "ping", + "description": "Will return 'pong'", + "type": "string", + "enum": [ + "pong" + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "ping" + ] + }, + "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/ping/send.json b/config/v3/ping/send.json index 3ed78545..fba6e146 100644 --- a/config/v3/ping/send.json +++ b/config/v3/ping/send.json @@ -1,24 +1,29 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ping (request)", - "description": "To send the ping request to the server. Mostly used to test the connection or to keep it alive.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ping"], - "properties": { - "ping": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/portfolio/example.json b/config/v3/portfolio/example.json index 83c83ba9..dbaa4972 100644 --- a/config/v3/portfolio/example.json +++ b/config/v3/portfolio/example.json @@ -1,3 +1,3 @@ { - "portfolio": 1 + "portfolio": 1 } diff --git a/config/v3/portfolio/receive.json b/config/v3/portfolio/receive.json index a2247139..7bd385b3 100644 --- a/config/v3/portfolio/receive.json +++ b/config/v3/portfolio/receive.json @@ -1,97 +1,109 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Portfolio (response)", - "description": "Receive a list of outstanding options in the user's portfolio", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "portfolio": { - "title": "portfolio", - "description": "Current account's open positions.", - "type": "object", - "additionalProperties": false, - "required": ["contracts"], - "properties": { - "contracts": { - "title": "Contracts", - "description": "List of open positions.", - "type": "array", - "items": { - "title": "Portfolio", - "description": "The details of each open position.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Portfolio (response)", + "description": "Receive a list of outstanding options in the user's portfolio", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "portfolio": { + "title": "portfolio", + "description": "Current account's open positions.", "type": "object", "additionalProperties": false, + "required": [ + "contracts" + ], "properties": { - "app_id": { - "description": "ID of the application where this contract was purchased.", - "type": ["integer", "null"] - }, - "buy_price": { - "description": "Buy price", - "type": "number" - }, - "contract_id": { - "description": "Internal contract identifier number (to be used in a `proposal_open_contract` API call).", - "type": "integer" - }, - "contract_type": { - "description": "Contract type", - "type": "string" - }, - "currency": { - "description": "Contract currency", - "type": "string" - }, - "date_start": { - "description": "Epoch of start date", - "type": "integer" - }, - "expiry_time": { - "description": "Epoch of expiry time", - "type": "integer" - }, - "longcode": { - "description": "Contract description", - "type": "string" - }, - "payout": { - "description": "Payout price", - "type": "number" - }, - "purchase_time": { - "description": "Epoch of purchase time", - "type": "integer" - }, - "shortcode": { - "description": "Contract short code description", - "type": "string" - }, - "symbol": { - "description": "Symbol code", - "type": "string" - }, - "transaction_id": { - "description": "It is the transaction ID. Every contract (buy or sell) and every payment has a unique ID.", - "type": "integer", - "examples": ["10867502908"] - } + "contracts": { + "title": "Contracts", + "description": "List of open positions.", + "type": "array", + "items": { + "title": "Portfolio", + "description": "The details of each open position.", + "type": "object", + "additionalProperties": false, + "properties": { + "app_id": { + "description": "ID of the application where this contract was purchased.", + "type": [ + "integer", + "null" + ] + }, + "buy_price": { + "description": "Buy price", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier number (to be used in a `proposal_open_contract` API call).", + "type": "integer" + }, + "contract_type": { + "description": "Contract type", + "type": "string" + }, + "currency": { + "description": "Contract currency", + "type": "string" + }, + "date_start": { + "description": "Epoch of start date", + "type": "integer" + }, + "expiry_time": { + "description": "Epoch of expiry time", + "type": "integer" + }, + "longcode": { + "description": "Contract description", + "type": "string" + }, + "payout": { + "description": "Payout price", + "type": "number" + }, + "purchase_time": { + "description": "Epoch of purchase time", + "type": "integer" + }, + "shortcode": { + "description": "Contract short code description", + "type": "string" + }, + "symbol": { + "description": "Symbol code", + "type": "string" + }, + "transaction_id": { + "description": "It is the transaction ID. Every contract (buy or sell) and every payment has a unique ID.", + "type": "integer", + "examples": [ + "10867502908" + ] + } + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "portfolio" + ] + }, + "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": ["portfolio"] - }, - "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/portfolio/send.json b/config/v3/portfolio/send.json index c6ceab06..8ab185bb 100644 --- a/config/v3/portfolio/send.json +++ b/config/v3/portfolio/send.json @@ -1,70 +1,80 @@ { - "$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" - ], - "uniqueItems": true - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + } + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/profit_table/example.json b/config/v3/profit_table/example.json index 5048db6f..603a08f8 100644 --- a/config/v3/profit_table/example.json +++ b/config/v3/profit_table/example.json @@ -1,7 +1,7 @@ { - "profit_table": 1, - "description": 1, - "limit": 25, - "offset": 25, - "sort": "ASC" + "profit_table": 1, + "description": 1, + "limit": 25, + "offset": 25, + "sort": "ASC" } diff --git a/config/v3/profit_table/receive.json b/config/v3/profit_table/receive.json index 067eaddb..5921b088 100644 --- a/config/v3/profit_table/receive.json +++ b/config/v3/profit_table/receive.json @@ -1,90 +1,111 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Profit Table (response)", - "description": "A summary of account profit table is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "profit_table": { - "title": "profit_table", - "description": "Account Profit Table.", - "type": "object", - "additionalProperties": false, - "properties": { - "count": { - "description": "Number of transactions returned in this call", - "type": "number" - }, - "transactions": { - "description": "Array of returned transactions", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Profit Table (response)", + "description": "A summary of account profit table is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "profit_table": { + "title": "profit_table", + "description": "Account Profit Table.", "type": "object", "additionalProperties": false, "properties": { - "app_id": { - "description": "ID of the application where this contract was purchased.", - "type": ["integer", "null"] - }, - "buy_price": { - "description": "The buy price", - "type": "number" - }, - "contract_id": { - "description": "The unique contract identifier.", - "type": ["integer", "null"], - "examples": [4867502908] - }, - "duration_type": { - "description": "The duration type of the contract.", - "type": ["null", "string"] - }, - "longcode": { - "description": "The description of contract purchased if description is set to 1", - "type": "string" - }, - "payout": { - "description": "Payout price", - "type": "number" - }, - "purchase_time": { - "description": "Epoch purchase time of the transaction", - "type": "integer" - }, - "sell_price": { - "description": "The price the contract sold for.", - "type": "number" - }, - "sell_time": { - "description": "Epoch sell time of the transaction", - "type": ["integer", "null"] - }, - "shortcode": { - "description": "Compact description of the contract purchased if description is set to 1", - "type": "string" - }, - "transaction_id": { - "description": "The transaction Identifier. Every contract (buy or sell) and every payment has a unique transaction identifier.", - "type": "integer", - "examples": [10867502908] - } + "count": { + "description": "Number of transactions returned in this call", + "type": "number" + }, + "transactions": { + "description": "Array of returned transactions", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "app_id": { + "description": "ID of the application where this contract was purchased.", + "type": [ + "integer", + "null" + ] + }, + "buy_price": { + "description": "The buy price", + "type": "number" + }, + "contract_id": { + "description": "The unique contract identifier.", + "type": [ + "integer", + "null" + ], + "examples": [ + 4867502908 + ] + }, + "duration_type": { + "description": "The duration type of the contract.", + "type": [ + "null", + "string" + ] + }, + "longcode": { + "description": "The description of contract purchased if description is set to 1", + "type": "string" + }, + "payout": { + "description": "Payout price", + "type": "number" + }, + "purchase_time": { + "description": "Epoch purchase time of the transaction", + "type": "integer" + }, + "sell_price": { + "description": "The price the contract sold for.", + "type": "number" + }, + "sell_time": { + "description": "Epoch sell time of the transaction", + "type": [ + "integer", + "null" + ] + }, + "shortcode": { + "description": "Compact description of the contract purchased if description is set to 1", + "type": "string" + }, + "transaction_id": { + "description": "The transaction Identifier. Every contract (buy or sell) and every payment has a unique transaction identifier.", + "type": "integer", + "examples": [ + 10867502908 + ] + } + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "profit_table" + ] + }, + "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": ["profit_table"] - }, - "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/profit_table/send.json b/config/v3/profit_table/send.json index b236021f..21cf948d 100644 --- a/config/v3/profit_table/send.json +++ b/config/v3/profit_table/send.json @@ -1,103 +1,120 @@ { - "$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" - ], - "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": "number" - }, - "sort": { - "description": "[Optional] Sort direction.", - "type": "string", - "default": "DESC", - "enum": ["ASC", "DESC"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/proposal/example.json b/config/v3/proposal/example.json index 71b9aa0a..4183d41c 100644 --- a/config/v3/proposal/example.json +++ b/config/v3/proposal/example.json @@ -1,11 +1,11 @@ { - "proposal": 1, - "amount": 100, - "barrier": "+0.1", - "basis": "payout", - "contract_type": "CALL", - "currency": "USD", - "duration": 60, - "duration_unit": "s", - "symbol": "R_100" + "proposal": 1, + "amount": 100, + "barrier": "+0.1", + "basis": "payout", + "contract_type": "CALL", + "currency": "USD", + "duration": 60, + "duration_unit": "s", + "symbol": "R_100" } diff --git a/config/v3/proposal/receive.json b/config/v3/proposal/receive.json index bee0bf2c..3162edec 100644 --- a/config/v3/proposal/receive.json +++ b/config/v3/proposal/receive.json @@ -1,259 +1,331 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Price Proposal (response)", - "description": "Latest price and other details for a given contract", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "proposal": { - "title": "proposal", - "description": "Latest price and other details for a given contract", - "type": "object", - "additionalProperties": false, - "required": [ - "ask_price", - "date_start", - "display_value", - "id", - "longcode", - "payout", - "spot", - "spot_time" - ], - "properties": { - "ask_price": { - "description": "The ask price.", - "type": "number", - "examples": [5.14] - }, - "barrier_choices": { - "description": "[Only for vanilla options] The choices of predefined strike price for client to choose", - "type": "array" - }, - "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" - } - } - }, - "commission": { - "description": "Commission changed in percentage (%).", - "type": ["null", "number"] - }, - "contract_details": { - "description": "Contains contract information. (Only applicable for accumulator).", - "type": "object", - "additionalProperties": false, - "properties": { - "high_barrier": { - "description": "High barrier calculated based on current spot", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": [42.123] - }, - "last_tick_epoch": { - "description": "Epoch of last tick considered for stat chart", - "type": "integer" - }, - "low_barrier": { - "description": "Low barrier calculated based on current spot", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": [42.123] - }, - "maximum_payout": { - "description": "Maximum payout that user can get out of a contract, contract will close automatically if payout reaches this number", - "type": "number", - "examples": [1000.59] - }, - "maximum_ticks": { - "description": "Maximum duration that a contract can last, contract will close automatically after this number of ticks", - "type": "integer", - "examples": [500] - }, - "tick_size_barrier": { - "description": "Tick size barrier for Accumulator contracts", - "type": "number", - "examples": [4.9358253e-5] - }, - "ticks_stayed_in": { - "description": "An array of numbers to build a stat chart - each number represents the duration that spot stayed between barries", - "type": "array", - "items": { - "type": "integer", - "examples": [50] - } - } - } - }, - "date_expiry": { - "description": "The end date of the contract.", - "type": "integer", - "examples": [1439999053] - }, - "date_start": { - "description": "The start date of the contract.", - "type": "integer", - "examples": [1439999053] - }, - "display_value": { - "description": "Same as `ask_price`.", - "type": "string", - "examples": ["5.14"] - }, - "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"] - }, - "limit_order": { - "description": "Contains limit order information. (Only applicable for contract with limit order).", - "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" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal (response)", + "description": "Latest price and other details for a given contract", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "proposal": { + "title": "proposal", + "description": "Latest price and other details for a given contract", + "type": "object", + "additionalProperties": false, + "required": [ + "ask_price", + "date_start", + "display_value", + "id", + "longcode", + "payout", + "spot", + "spot_time" + ], + "properties": { + "ask_price": { + "description": "The ask price.", + "type": "number", + "examples": [ + 5.14 + ] }, - "order_amount": { - "description": "Stop loss amount", - "type": ["null", "number"] + "barrier_choices": { + "description": "[Only for vanilla options] The choices of predefined strike price for client to choose", + "type": "array" }, - "order_date": { - "description": "Stop loss order epoch", - "type": "integer" + "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" + } + } }, - "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" + "commission": { + "description": "Commission changed in percentage (%).", + "type": [ + "null", + "number" + ] }, - "order_amount": { - "description": "Stop out amount", - "type": "number" + "contract_details": { + "description": "Contains contract information.", + "type": "object", + "additionalProperties": false, + "properties": { + "barrier": { + "description": "Barrier of the contract.", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "barrier_spot_distance": { + "description": "Absolute difference between high/low barrier and spot", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + 2.123 + ] + }, + "high_barrier": { + "description": "High barrier calculated based on current spot", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + 42.123 + ] + }, + "last_tick_epoch": { + "description": "Epoch of last tick considered for stat chart", + "type": "integer" + }, + "low_barrier": { + "description": "Low barrier calculated based on current spot", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + 42.123 + ] + }, + "maximum_payout": { + "description": "Maximum payout that user can get out of a contract, contract will close automatically if payout reaches this number", + "type": "number", + "examples": [ + 1000.59 + ] + }, + "maximum_ticks": { + "description": "Maximum duration that a contract can last, contract will close automatically after this number of ticks", + "type": "integer", + "examples": [ + 500 + ] + }, + "tick_size_barrier": { + "description": "Tick size barrier for Accumulator contracts", + "type": "number", + "examples": [ + 4.9358253e-05 + ] + }, + "ticks_stayed_in": { + "description": "An array of numbers to build a stat chart - each number represents the duration that spot stayed between barries", + "type": "array", + "items": { + "type": "integer", + "examples": [ + 50 + ] + } + } + } }, - "order_date": { - "description": "Stop out order epoch", - "type": "integer" + "date_expiry": { + "description": "The end date of the contract.", + "type": "integer", + "examples": [ + 1439999053 + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": "string" - } - } - }, - "take_profit": { - "description": "Contains 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" + "date_start": { + "description": "The start date of the contract.", + "type": "integer", + "examples": [ + 1439999053 + ] + }, + "display_number_of_contracts": { + "description": "[Only for vanilla or turbos options] The implied number of contracts", + "type": "string" + }, + "display_value": { + "description": "Same as `ask_price`.", + "type": "string", + "examples": [ + "5.14" + ] }, - "order_amount": { - "description": "Take profit amount", - "type": ["null", "number"] + "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" + ] }, - "order_date": { - "description": "Take profit order epoch", - "type": "integer" + "limit_order": { + "description": "Contains limit order information. (Only applicable for contract with limit order).", + "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": "Contains 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" + ] + } + } + } + } }, - "value": { - "description": "Pip-sized barrier value", - "type": ["null", "string"] + "longcode": { + "description": "Example: Win payout if Random 100 Index is strictly higher than entry spot at 15 minutes after contract start time.", + "type": "string" + }, + "max_stake": { + "description": "[Only for vanilla or turbos options] Maximum stakes allowed", + "type": "number" + }, + "min_stake": { + "description": "[Only for vanilla or turbos options] Minimum stakes allowed", + "type": "number" + }, + "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": "The payout amount of the contract.", + "type": "number", + "examples": [ + 10 + ] + }, + "spot": { + "description": "Spot value (if there are no Exchange data-feed licensing restrictions for the underlying symbol).", + "type": "number", + "examples": [ + 9874.52 + ] + }, + "spot_time": { + "description": "The corresponding time of the spot value.", + "type": "integer", + "examples": [ + 1439999052 + ] } - } } - } }, - "longcode": { - "description": "Example: Win payout if Random 100 Index is strictly higher than entry spot at 15 minutes after contract start time.", - "type": "string" - }, - "max_stake": { - "description": "[Only for vanilla options] Maximum stakes allowed", - "type": "number" - }, - "min_stake": { - "description": "[Only for vanilla options] Minimum stakes allowed", - "type": "number" - }, - "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 options] The implied number of contracts", - "type": "number" + "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" + ] + } + } }, - "payout": { - "description": "The payout amount of the contract.", - "type": "number", - "examples": [10] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "spot": { - "description": "Spot value (if there are no Exchange data-feed licensing restrictions for the underlying symbol).", - "type": "number", - "examples": [9874.52] + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "proposal" + ] }, - "spot_time": { - "description": "The corresponding time of the spot value.", - "type": "integer", - "examples": [1439999052] - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["proposal"] - }, - "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/send.json b/config/v3/proposal/send.json index 93f7628c..c5a6f604 100644 --- a/config/v3/proposal/send.json +++ b/config/v3/proposal/send.json @@ -1,173 +1,200 @@ { - "$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" - ] - }, - "currency": { - "description": "This can only be the account-holder's currency (obtained from `payout_currencies` call).", - "type": "string", - "pattern": "^[a-zA-Z0-9]{2,20}$" - }, - "date_expiry": { - "description": "[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "date_start": { - "description": "[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "duration": { - "description": "[Optional] Duration quantity. Either date_expiry or duration is required.", - "type": "integer", - "maximum": 99999999, - "minimum": 0 - }, - "duration_unit": { - "description": "[Optional] Duration unit - `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks.", - "type": "string", - "default": "s", - "enum": ["d", "m", "s", "h", "t"] - }, - "growth_rate": { - "description": "[Optional] Growth rate of an accumulator contract.", - "type": "number" - }, - "limit_order": { - "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`, `stop_loss`.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", - "type": "number" - }, - "take_profit": { - "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal (request)", + "description": "Gets latest price for a specific contract.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "proposal", + "contract_type", + "currency", + "symbol" + ], + "properties": { + "proposal": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "amount": { + "description": "[Optional] Proposed contract payout or stake, or multiplier (for lookbacks).", + "type": "number", + "minimum": 0 + }, + "barrier": { + "description": "[Optional] Barrier for the contract (or last digit prediction for digit contracts). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier2": { + "description": "[Optional] Low barrier for the contract (for contracts with two barriers). Contracts less than 24 hours in duration would need a relative barrier (barriers which need +/-), where entry spot would be adjusted accordingly with that amount to define a barrier, except for Synthetic Indices as they support both relative and absolute barriers. Not needed for lookbacks.", + "type": "string", + "pattern": "^(?=.{1,20}$)[+-]?[0-9]+\\.?[0-9]*$" + }, + "barrier_range": { + "description": "[Optional] Barrier range for callputspread.", + "type": "string", + "enum": [ + "tight", + "middle", + "wide" + ] + }, + "basis": { + "description": "[Optional] Indicates type of the `amount`.", + "type": "string", + "enum": [ + "payout", + "stake" + ] + }, + "cancellation": { + "description": "Cancellation duration option (only for `MULTUP` and `MULTDOWN` contracts).", + "type": "string", + "pattern": "^\\w+$" + }, + "contract_type": { + "description": "The proposed contract type", + "type": "string", + "enum": [ + "MULTUP", + "MULTDOWN", + "UPORDOWN", + "EXPIRYRANGE", + "ONETOUCH", + "CALLE", + "LBHIGHLOW", + "ASIAND", + "EXPIRYRANGEE", + "DIGITDIFF", + "DIGITMATCH", + "DIGITOVER", + "PUTE", + "DIGITUNDER", + "NOTOUCH", + "CALL", + "RANGE", + "LBFLOATPUT", + "DIGITODD", + "PUT", + "ASIANU", + "LBFLOATCALL", + "EXPIRYMISSE", + "EXPIRYMISS", + "DIGITEVEN", + "TICKHIGH", + "TICKLOW", + "RESETCALL", + "RESETPUT", + "CALLSPREAD", + "PUTSPREAD", + "RUNHIGH", + "RUNLOW", + "ACCU", + "VANILLALONGCALL", + "VANILLALONGPUT", + "TURBOSLONG", + "TURBOSSHORT" + ] + }, + "currency": { + "description": "This can only be the account-holder's currency (obtained from `payout_currencies` call).", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "date_expiry": { + "description": "[Optional] Epoch value of the expiry time of the contract. Either date_expiry or duration is required.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "date_start": { + "description": "[Optional] Indicates epoch value of the starting time of the contract. If left empty, the start time of the contract is now.", + "type": "integer", + "maximum": 9999999999, + "minimum": 0 + }, + "duration": { + "description": "[Optional] Duration quantity. Either date_expiry or duration is required.", + "type": "integer", + "maximum": 99999999, + "minimum": 0 + }, + "duration_unit": { + "description": "[Optional] Duration unit - `s`: seconds, `m`: minutes, `h`: hours, `d`: days, `t`: ticks.", + "type": "string", + "default": "s", + "enum": [ + "d", + "m", + "s", + "h", + "t" + ] + }, + "growth_rate": { + "description": "[Optional] Growth rate of an accumulator contract.", + "type": "number" + }, + "limit_order": { + "description": "Add an order to close the contract once the order condition is met (only for `MULTUP` and `MULTDOWN` and 'ACCU' contracts). Supported orders: `take_profit`, `stop_loss`.", + "type": "object", + "additionalProperties": false, + "properties": { + "stop_loss": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific loss.", + "type": "number" + }, + "take_profit": { + "description": "Contract will be automatically closed when the value of the contract reaches a specific profit.", + "type": "number" + } + } + }, + "multiplier": { + "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", + "type": "number", + "minimum": 0 + }, + "product_type": { + "description": "[Optional] The product type.", + "type": "string", + "default": "basic", + "enum": [ + "basic" + ] + }, + "selected_tick": { + "description": "[Optional] The tick that is predicted to have the highest/lowest value - for `TICKHIGH` and `TICKLOW` contracts.", + "type": "integer" + }, + "subscribe": { + "description": "[Optional] 1 - to initiate a realtime stream of prices. Note that tick trades (without a user-defined barrier), digit trades and less than 24 hours at-the-money contracts for the following underlying symbols are not streamed: `R_10`, `R_25`, `R_50`, `R_75`, `R_100`, `RDBULL`, `RDBEAR` (this is because their price is constant).", + "type": "integer", + "enum": [ + 1 + ] + }, + "symbol": { + "description": "The short symbol name (obtained from `active_symbols` call).", + "type": "string", + "pattern": "^\\w{2,30}$" + }, + "trading_period_start": { + "description": "[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.", + "type": "integer" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "multiplier": { - "description": "[Optional] The multiplier for non-binary options. E.g. lookbacks.", - "type": "number", - "minimum": 0 - }, - "product_type": { - "description": "[Optional] The product type.", - "type": "string", - "default": "basic", - "enum": ["basic"] - }, - "selected_tick": { - "description": "[Optional] The tick that is predicted to have the highest/lowest value - for `TICKHIGH` and `TICKLOW` contracts.", - "type": "integer" - }, - "subscribe": { - "description": "[Optional] 1 - to initiate a realtime stream of prices. Note that tick trades (without a user-defined barrier), digit trades and less than 24 hours at-the-money contracts for the following underlying symbols are not streamed: `R_10`, `R_25`, `R_50`, `R_75`, `R_100`, `RDBULL`, `RDBEAR` (this is because their price is constant).", - "type": "integer", - "enum": [1] - }, - "symbol": { - "description": "The short symbol name (obtained from `active_symbols` call).", - "type": "string", - "pattern": "^\\w{2,30}$" - }, - "trading_period_start": { - "description": "[Optional] Required only for multi-barrier trading. Defines the epoch value of the trading period start time.", - "type": "integer" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/proposal_open_contract/example.json b/config/v3/proposal_open_contract/example.json index 8150958a..e61133ba 100644 --- a/config/v3/proposal_open_contract/example.json +++ b/config/v3/proposal_open_contract/example.json @@ -1,5 +1,5 @@ { - "proposal_open_contract": 1, - "contract_id": 11111111, - "subscribe": 1 + "proposal_open_contract": 1, + "contract_id": 11111111, + "subscribe": 1 } diff --git a/config/v3/proposal_open_contract/receive.json b/config/v3/proposal_open_contract/receive.json index e24be5ad..4d4bdd8e 100644 --- a/config/v3/proposal_open_contract/receive.json +++ b/config/v3/proposal_open_contract/receive.json @@ -1,544 +1,754 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Price Proposal: Open Contracts (response)", - "description": "Latest price and other details for an open contract in the user's portfolio", - "type": "object", - "required": ["echo_req"], - "properties": { - "proposal_open_contract": { - "title": "proposal_open_contract", - "description": "Latest price and other details for an open contract", - "type": "object", - "additionalProperties": false, - "properties": { - "account_id": { - "description": "Account Id", - "type": "number" - }, - "audit_details": { - "title": "Audit details for expired contract.", - "description": "Tick details around contract start and end time.", - "type": ["null", "object"], - "additionalProperties": false, - "properties": { - "all_ticks": { - "description": "Ticks for tick expiry contract from start time till expiry.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - }, - "contract_end": { - "description": "Ticks around contract end time.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - }, - "contract_start": { - "description": "Ticks around contract start time.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Price Proposal: Open Contracts (response)", + "description": "Latest price and other details for an open contract in the user's portfolio", + "type": "object", + "required": [ + "echo_req" + ], + "properties": { + "proposal_open_contract": { + "title": "proposal_open_contract", + "description": "Latest price and other details for an open contract", + "type": "object", + "additionalProperties": false, + "properties": { + "account_id": { + "description": "Account Id", + "type": "number" + }, + "audit_details": { + "title": "Audit details for expired contract.", + "description": "Tick details around contract start and end time.", + "type": [ + "null", + "object" + ], + "additionalProperties": false, + "properties": { + "all_ticks": { + "description": "Ticks for tick expiry contract from start time till expiry.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "contract_end": { + "description": "Ticks around contract end time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "contract_start": { + "description": "Ticks around contract start time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "flag": { + "description": "A flag used to highlight the record in front-end applications.", + "type": [ + "null", + "string" + ] + }, + "name": { + "description": "A short description of the data. It could be a tick or a time associated with the contract.", + "type": [ + "null", + "string" + ] + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + } + } + }, + "barrier": { + "description": "Barrier of the contract (if any).", + "type": [ + "null", + "string" + ], + "examples": [ + "42.123" + ] + }, + "barrier_count": { + "description": "The number of barriers a contract has.", + "type": "number", + "examples": [ + 0, + 1, + 2 + ] + }, + "barrier_spot_distance": { + "description": "[Only for accumulator] Absolute difference between high/low barrier and spot", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + 2.123 + ] + }, + "bid_price": { + "description": "Price at which the contract could be sold back to the company.", + "type": "number", + "examples": [ + 5.14 + ] + }, + "buy_price": { + "description": "Price at which contract was purchased", + "type": "number" + }, + "cancellation": { + "description": "Contains information about contract cancellation option.", + "type": "object", + "additionalProperties": false, + "properties": { + "ask_price": { + "description": "Ask price of contract cancellation option.", + "type": "number" + }, + "date_expiry": { + "description": "Expiry time in epoch for contract cancellation option.", + "type": "integer" + } + } + }, + "commision": { + "description": "Commission in payout currency amount.", + "type": [ + "null", + "number" + ] + }, + "commission": { + "description": "Commission in payout currency amount.", + "type": [ + "null", + "number" + ] + }, + "contract_id": { + "description": "The internal contract identifier", "type": "integer" - }, - "flag": { - "description": "A flag used to highlight the record in front-end applications.", - "type": ["null", "string"] - }, - "name": { - "description": "A short description of the data. It could be a tick or a time associated with the contract.", - "type": ["null", "string"] - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } - } - } - } - } - }, - "barrier": { - "description": "Barrier of the contract (if any).", - "type": ["null", "string"], - "examples": ["42.123"] - }, - "barrier_count": { - "description": "The number of barriers a contract has.", - "type": "number", - "examples": [0, 1, 2] - }, - "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_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_value": { - "description": "The `bid_price` with the correct precision", - "type": "string" - }, - "entry_spot": { - "description": "Same as `entry_tick`. For backwards compatibility.", - "type": ["null", "number"] - }, - "entry_spot_display_value": { - "description": "Same as `entry_tick_display_value`. For backwards compatibility.", - "type": ["null", "string"] - }, - "entry_tick": { - "description": "This is the entry spot of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", - "type": "number", - "examples": [86.63] - }, - "entry_tick_display_value": { - "description": "This is the entry spot with the correct precision of the contract. For contracts starting immediately it is the next tick after the start time. For forward-starting contracts it is the spot at the start time.", - "type": "string", - "examples": ["86.630"] - }, - "entry_tick_time": { - "description": "This is the epoch time of the entry tick.", - "type": "integer", - "examples": [1446629000] - }, - "exit_tick": { - "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", - "type": "number", - "examples": [86.81] - }, - "exit_tick_display_value": { - "description": "Exit tick can refer to the latest tick at the end time, the tick that fulfils the contract's winning or losing condition for path dependent contracts (Touch/No Touch and Stays Between/Goes Outside) or the tick at which the contract is sold before expiry.", - "type": "string", - "examples": ["86.810"] - }, - "exit_tick_time": { - "description": "This is the epoch time of the exit tick. Note that since certain instruments don't tick every second, the exit tick time may be a few seconds before the end time.", - "type": "integer", - "examples": [1446629000] - }, - "expiry_time": { - "description": "This is the expiry time.", - "type": "integer", - "examples": [1446629000] - }, - "growth_rate": { - "description": "[Only for accumulator] Growth rate of an accumulator contract.", - "type": "number" - }, - "high_barrier": { - "description": "High barrier of the contract (if any).", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["42.123"] - }, - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] - }, - "is_expired": { - "description": "Whether the contract is expired or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_forward_starting": { - "description": "Whether the contract is forward-starting or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_intraday": { - "description": "Whether the contract is an intraday contract.", - "type": "integer", - "enum": [0, 1] - }, - "is_path_dependent": { - "description": "Whether the contract expiry price will depend on the path of the market (e.g. One Touch contract).", - "type": "integer", - "enum": [0, 1] - }, - "is_settleable": { - "description": "Whether the contract is settleable or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_sold": { - "description": "Whether the contract is sold or not.", - "type": "integer", - "enum": [0, 1] - }, - "is_valid_to_cancel": { - "description": "Whether the contract can be cancelled.", - "type": "integer", - "enum": [0, 1] - }, - "is_valid_to_sell": { - "description": "Whether the contract can be sold back to the company.", - "type": "integer", - "enum": [0, 1] - }, - "limit_order": { - "description": "Orders are applicable to `MULTUP` and `MULTDOWN` contracts only.", - "type": "object", - "additionalProperties": false, - "properties": { - "stop_loss": { - "description": "Contains information where the contract will be closed automatically at the loss specified by the user.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Localized display name", - "type": "string" }, - "order_amount": { - "description": "Stop loss amount", - "type": ["null", "number"] + "contract_type": { + "description": "Contract type.", + "type": "string", + "examples": [ + "CALL", + "PUT" + ] }, - "order_date": { - "description": "Stop loss order epoch", - "type": "integer" + "currency": { + "description": "The currency code of the contract.", + "type": "string", + "examples": [ + "USD" + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": ["null", "string"] - } - } - }, - "stop_out": { - "description": "Contains information where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Localized display name", - "type": "string" + "current_spot": { + "description": "Spot value if we have license to stream this symbol.", + "type": "number", + "examples": [ + 9874.52 + ] }, - "order_amount": { - "description": "Stop out amount", - "type": "number" + "current_spot_display_value": { + "description": "Spot value with the correct precision if we have license to stream this symbol.", + "type": "string", + "examples": [ + "9874.520" + ] }, - "order_date": { - "description": "Stop out order epoch", - "type": "integer" + "current_spot_high_barrier": { + "description": "[Applicable for accumulator] High barrier based on current spot.", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "current_spot_low_barrier": { + "description": "[Applicable for accumulator] Low barrier based on current spot.", + "type": "string", + "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", + "examples": [ + "42.123" + ] + }, + "current_spot_time": { + "description": "The corresponding time of the current spot.", + "type": "integer", + "examples": [ + 1439999052 + ] + }, + "date_expiry": { + "description": "Expiry date (epoch) of the Contract. Please note that it is not applicable for tick trade contracts.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "date_settlement": { + "description": "Settlement date (epoch) of the contract.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "date_start": { + "description": "Start date (epoch) of the contract.", + "type": "integer", + "examples": [ + 1446629000 + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": "string" - } - } - }, - "take_profit": { - "description": "Contain information where the contract will be closed automatically at the profit specified by the user.", - "type": "object", - "additionalProperties": false, - "properties": { "display_name": { - "description": "Localized display name", - "type": "string" + "description": "Display name of underlying", + "type": "string" + }, + "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.", + "type": "integer" + }, + "reset_time": { + "description": "[Only for reset trades] The epoch time of a barrier reset.", + "type": "integer", + "examples": [ + 1446629000 + ] }, - "order_amount": { - "description": "Take profit amount", - "type": ["null", "number"] + "sell_price": { + "description": "Price at which contract was sold, only available when contract has been sold.", + "type": "number" }, - "order_date": { - "description": "Take profit order epoch", - "type": "integer" + "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 + ] }, - "value": { - "description": "Pip-sized barrier value", - "type": ["null", "string"] + "sell_spot_display_value": { + "description": "Latest spot value with the correct precision at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", + "type": "string", + "examples": [ + "86.630" + ] + }, + "sell_spot_time": { + "description": "Epoch time of the sell spot. Note that since certain underlyings don't tick every second, the sell spot time may be a few seconds before the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", + "type": "integer", + "examples": [ + 1446629000 + ] + }, + "sell_time": { + "description": "Epoch time of when the contract was sold (only present for contracts already sold)", + "type": [ + "integer", + "null" + ] + }, + "shortcode": { + "description": "Coded description of the contract purchased.", + "type": "string", + "examples": [ + "CALL_R_100_90_1446704187_1446704787_S0P_0" + ] + }, + "status": { + "title": "Contract status", + "description": "Contract status. Will be `sold` if the contract was sold back before expiry, `won` if won and `lost` if lost at expiry. Otherwise will be `open`", + "type": [ + "null", + "string" + ], + "enum": [ + "open", + "sold", + "won", + "lost", + "cancelled", + null + ] + }, + "tick_count": { + "description": "Only for tick trades, number of ticks", + "type": "integer" + }, + "tick_passed": { + "description": "[Only for accumulator] Number of ticks passed since entry_tick", + "type": "integer", + "examples": [ + 500 + ] + }, + "tick_stream": { + "description": "Tick stream from entry to end time.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "epoch": { + "description": "Epoch time of a tick or the contract start or end time.", + "type": "integer" + }, + "tick": { + "description": "The spot value at the given epoch.", + "type": [ + "null", + "number" + ] + }, + "tick_display_value": { + "description": "The spot value with the correct precision at the given epoch.", + "type": [ + "null", + "string" + ] + } + } + } + }, + "transaction_ids": { + "title": "Transaction ids for contract", + "description": "Every contract has buy and sell transaction ids, i.e. when you purchase a contract we associate it with buy transaction id, and if contract is already sold we associate that with sell transaction id.", + "type": "object", + "additionalProperties": false, + "properties": { + "buy": { + "description": "Buy transaction ID for that contract", + "type": "integer" + }, + "sell": { + "description": "Sell transaction ID for that contract, only present when contract is already sold.", + "type": "integer" + } + } + }, + "underlying": { + "description": "The underlying symbol code.", + "type": "string", + "examples": [ + "R_50" + ] + }, + "validation_error": { + "description": "Error message if validation fails", + "type": "string" + }, + "validation_error_code": { + "description": "Error code if validation fails", + "type": "string" } - } } - } - }, - "longcode": { - "description": "Text description of the contract purchased, Example: Win payout if Volatility 100 Index is strictly higher than entry spot at 10 minutes after contract start time.", - "type": "string" - }, - "low_barrier": { - "description": "Low barrier of the contract (if any).", - "type": "string", - "pattern": "^[+-]?[0-9]+\\.?[0-9]*$", - "examples": ["40.132"] - }, - "multiplier": { - "description": "[Only for lookback trades] Multiplier applies when calculating the final payoff for each type of lookback. e.g. (Exit spot - Lowest historical price) * multiplier = Payout", - "type": "number" - }, - "number_of_contracts": { - "description": "[Only for vanilla options] The implied number of contracts", - "type": "number" - }, - "payout": { - "description": "Payout value of the contract.", - "type": "number", - "examples": [10.5] }, - "profit": { - "description": "The latest bid price minus buy price.", - "type": "number" - }, - "profit_percentage": { - "description": "Profit in percentage.", - "type": "number" - }, - "purchase_time": { - "description": "Epoch of purchase time, will be same as `date_start` for all contracts except forward starting contracts.", - "type": "integer" - }, - "reset_time": { - "description": "[Only for reset trades] The epoch time of a barrier reset.", - "type": "integer", - "examples": [1446629000] - }, - "sell_price": { - "description": "Price at which contract was sold, only available when contract has been sold.", - "type": "number" - }, - "sell_spot": { - "description": "Latest spot value at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "number", - "examples": [86.63] - }, - "sell_spot_display_value": { - "description": "Latest spot value with the correct precision at the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "string", - "examples": ["86.630"] - }, - "sell_spot_time": { - "description": "Epoch time of the sell spot. Note that since certain underlyings don't tick every second, the sell spot time may be a few seconds before the sell time. (only present for contracts already sold). Will no longer be supported in the next API release.", - "type": "integer", - "examples": [1446629000] - }, - "sell_time": { - "description": "Epoch time of when the contract was sold (only present for contracts already sold)", - "type": ["integer", "null"] - }, - "shortcode": { - "description": "Coded description of the contract purchased.", - "type": "string", - "examples": ["CALL_R_100_90_1446704187_1446704787_S0P_0"] - }, - "status": { - "title": "Contract status", - "description": "Contract status. Will be `sold` if the contract was sold back before expiry, `won` if won and `lost` if lost at expiry. Otherwise will be `open`", - "type": ["null", "string"], - "enum": ["open", "sold", "won", "lost", "cancelled", null] - }, - "tick_count": { - "description": "Only for tick trades, number of ticks", - "type": "integer" - }, - "tick_passed": { - "description": "[Only for accumulator] Number of ticks passed since entry_tick", - "type": "integer", - "examples": [500] - }, - "tick_stream": { - "description": "Tick stream from entry to end time.", - "type": "array", - "items": { + "subscription": { + "title": "Subscription information", + "description": "For subscription requests only.", "type": "object", "additionalProperties": false, + "required": [ + "id" + ], "properties": { - "epoch": { - "description": "Epoch time of a tick or the contract start or end time.", - "type": "integer" - }, - "tick": { - "description": "The spot value at the given epoch.", - "type": ["null", "number"] - }, - "tick_display_value": { - "description": "The spot value with the correct precision at the given epoch.", - "type": ["null", "string"] - } + "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" + ] + } } - } }, - "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" - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["proposal_open_contract"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/proposal_open_contract/send.json b/config/v3/proposal_open_contract/send.json index dec96b8e..a3bfe296 100644 --- a/config/v3/proposal_open_contract/send.json +++ b/config/v3/proposal_open_contract/send.json @@ -1,34 +1,44 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/reality_check/example.json b/config/v3/reality_check/example.json index c0bc1568..8adf1b54 100644 --- a/config/v3/reality_check/example.json +++ b/config/v3/reality_check/example.json @@ -1,3 +1,3 @@ { - "reality_check": 1 + "reality_check": 1 } diff --git a/config/v3/reality_check/receive.json b/config/v3/reality_check/receive.json index b0a9af05..9d38baaa 100644 --- a/config/v3/reality_check/receive.json +++ b/config/v3/reality_check/receive.json @@ -1,67 +1,74 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Reality Check (response)", - "description": "This gives summary of client's trades and account for reality check", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "reality_check": { - "title": "reality_check", - "description": "Reality check summary of trades.", - "type": "object", - "additionalProperties": false, - "properties": { - "buy_amount": { - "description": "Total amount of contract purchased.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Reality Check (response)", + "description": "This gives summary of client's trades and account for reality check", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "reality_check": { + "title": "reality_check", + "description": "Reality check summary of trades.", + "type": "object", + "additionalProperties": false, + "properties": { + "buy_amount": { + "description": "Total amount of contract purchased.", + "type": "number" + }, + "buy_count": { + "description": "Total count of contract purchased.", + "type": "integer" + }, + "currency": { + "description": "Currency of client account i.e currency for trading", + "type": "string" + }, + "loginid": { + "description": "Client loginid.", + "type": "string", + "examples": [ + "CR000000" + ] + }, + "open_contract_count": { + "description": "Total count of contracts that are not yet expired.", + "type": "integer" + }, + "potential_profit": { + "description": "Indicative profit of contract as per current market price.", + "type": "number" + }, + "sell_amount": { + "description": "Total amount of contracts sold.", + "type": "number" + }, + "sell_count": { + "description": "Total count of contract sold.", + "type": "integer" + }, + "start_time": { + "description": "Reality check summary start time epoch", + "type": "integer" + } + } }, - "buy_count": { - "description": "Total count of contract purchased.", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "currency": { - "description": "Currency of client account i.e currency for trading", - "type": "string" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "reality_check" + ] }, - "loginid": { - "description": "Client loginid.", - "type": "string", - "examples": ["CR000000"] - }, - "open_contract_count": { - "description": "Total count of contracts that are not yet expired.", - "type": "integer" - }, - "potential_profit": { - "description": "Indicative profit of contract as per current market price.", - "type": "number" - }, - "sell_amount": { - "description": "Total amount of contracts sold.", - "type": "number" - }, - "sell_count": { - "description": "Total count of contract sold.", - "type": "integer" - }, - "start_time": { - "description": "Reality check summary start time epoch", - "type": "integer" + "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": ["reality_check"] - }, - "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/reality_check/send.json b/config/v3/reality_check/send.json index 09833963..38ba9a08 100644 --- a/config/v3/reality_check/send.json +++ b/config/v3/reality_check/send.json @@ -1,25 +1,33 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/residence_list/example.json b/config/v3/residence_list/example.json index 0b76f489..0342921c 100644 --- a/config/v3/residence_list/example.json +++ b/config/v3/residence_list/example.json @@ -1,3 +1,3 @@ { - "residence_list": 1 + "residence_list": 1 } diff --git a/config/v3/residence_list/receive.json b/config/v3/residence_list/receive.json index e7985b1e..edc75cca 100644 --- a/config/v3/residence_list/receive.json +++ b/config/v3/residence_list/receive.json @@ -1,161 +1,178 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Countries List (response)", - "description": "A message with Residence List", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "residence_list": { - "title": "residence_list", - "description": "List of countries for account opening", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "disabled": { - "description": "Disabled.", - "type": "string" - }, - "identity": { - "description": "Information about identity options available", - "type": "object", - "additionalProperties": false, - "properties": { - "services": { - "description": "Identity services configuration", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Countries List (response)", + "description": "A message with Residence List", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "residence_list": { + "title": "residence_list", + "description": "List of countries for account opening", + "type": "array", + "items": { "type": "object", "additionalProperties": false, "properties": { - "idv": { - "description": "IDV configuration", - "type": "object", - "additionalProperties": false, - "properties": { - "documents_supported": { - "description": "Documents supported by the IDV service in this country", + "disabled": { + "description": "Disabled.", + "type": "string" + }, + "identity": { + "description": "Information about identity options available", "type": "object", - "patternProperties": { - "^\\w+$": { - "description": "Document type", - "type": "object", - "additionalProperties": false, - "properties": { - "additional": { - "description": "[Optional] Additional input required from the user", + "additionalProperties": false, + "properties": { + "services": { + "description": "Identity services configuration", "type": "object", "additionalProperties": false, "properties": { - "display_name": { - "description": "The localized display name", - "type": "string" - }, - "format": { - "description": "[Optional] Regex pattern to validate documents", - "type": "string" - } + "idv": { + "description": "IDV configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "documents_supported": { + "description": "Documents supported by the IDV service in this country", + "type": "object", + "patternProperties": { + "^\\w+$": { + "description": "Document type", + "type": "object", + "additionalProperties": false, + "properties": { + "additional": { + "description": "[Optional] Additional input required from the user", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "The localized display name", + "type": "string" + }, + "format": { + "description": "[Optional] Regex pattern to validate documents", + "type": "string" + } + } + }, + "display_name": { + "description": "The localized display name", + "type": "string" + }, + "format": { + "description": "[Optional] Regex pattern to validate documents", + "type": "string" + } + } + } + } + }, + "has_visual_sample": { + "description": "Flag which indicates whether this country has IDV visual samples", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_country_supported": { + "description": "Flag which indicates whether IDV is available in this country", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + }, + "onfido": { + "description": "Onfido configuration", + "type": "object", + "additionalProperties": false, + "properties": { + "documents_supported": { + "description": "Documents supported by the IDV service in this country", + "type": "object", + "patternProperties": { + "^\\w+$": { + "description": "Document type", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "The localized display name", + "type": "string" + }, + "format": { + "description": "[Optional] Regex pattern to validate documents", + "type": "string" + } + } + } + } + }, + "is_country_supported": { + "description": "Flag which indicates whether Onfido is available in this country", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + } } - }, - "display_name": { - "description": "The localized display name", - "type": "string" - }, - "format": { - "description": "[Optional] Regex pattern to validate documents", - "type": "string" - } } - } } - }, - "has_visual_sample": { - "description": "Flag which indicates whether this country has IDV visual samples", - "type": "integer", - "enum": [0, 1] - }, - "is_country_supported": { - "description": "Flag which indicates whether IDV is available in this country", - "type": "integer", - "enum": [0, 1] - } - } - }, - "onfido": { - "description": "Onfido configuration", - "type": "object", - "additionalProperties": false, - "properties": { - "documents_supported": { - "description": "Documents supported by the IDV service in this country", - "type": "object", - "patternProperties": { - "^\\w+$": { - "description": "Document type", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "The localized display name", - "type": "string" - }, - "format": { - "description": "[Optional] Regex pattern to validate documents", - "type": "string" - } - } - } + }, + "phone_idd": { + "description": "IDD code of country", + "type": [ + "null", + "string" + ] + }, + "selected": { + "description": "Selected.", + "type": "string" + }, + "text": { + "description": "Country full name", + "type": "string" + }, + "tin_format": { + "description": "Country tax identifier format", + "type": "array", + "items": { + "type": "string" } - }, - "is_country_supported": { - "description": "Flag which indicates whether Onfido is available in this country", - "type": "integer", - "enum": [0, 1] - } + }, + "value": { + "description": "2-letter country code", + "type": "string", + "pattern": "^\\w\\w$" } - } } - } - } - }, - "phone_idd": { - "description": "IDD code of country", - "type": ["null", "string"] - }, - "selected": { - "description": "Selected.", - "type": "string" - }, - "text": { - "description": "Country full name", - "type": "string" - }, - "tin_format": { - "description": "Country tax identifier format", - "type": "array", - "items": { - "type": "string" } - }, - "value": { - "description": "2-letter country code", + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", "type": "string", - "pattern": "^\\w\\w$" - } + "enum": [ + "residence_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": ["residence_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/residence_list/send.json b/config/v3/residence_list/send.json index 3294c04a..e44f5358 100644 --- a/config/v3/residence_list/send.json +++ b/config/v3/residence_list/send.json @@ -1,24 +1,29 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Countries List (request)", - "description": "This call returns a list of countries and 2-letter country codes, suitable for populating the account opening form.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["residence_list"], - "properties": { - "residence_list": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/revoke_oauth_app/example.json b/config/v3/revoke_oauth_app/example.json index c411780c..50e3ec37 100644 --- a/config/v3/revoke_oauth_app/example.json +++ b/config/v3/revoke_oauth_app/example.json @@ -1,3 +1,3 @@ { - "revoke_oauth_app": 1234 + "revoke_oauth_app": 1234 } diff --git a/config/v3/revoke_oauth_app/receive.json b/config/v3/revoke_oauth_app/receive.json index d55c8c10..23b96046 100644 --- a/config/v3/revoke_oauth_app/receive.json +++ b/config/v3/revoke_oauth_app/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Revoke Oauth Application (response)", - "description": "A message with revoking a used application", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "revoke_oauth_app": { - "title": "revoke_oauth_app", - "description": "`1` on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["revoke_oauth_app"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Revoke Oauth Application (response)", + "description": "A message with revoking a used application", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "revoke_oauth_app": { + "title": "revoke_oauth_app", + "description": "`1` on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "revoke_oauth_app" + ] + }, + "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/revoke_oauth_app/send.json b/config/v3/revoke_oauth_app/send.json index a01cfdb7..4e034f0e 100644 --- a/config/v3/revoke_oauth_app/send.json +++ b/config/v3/revoke_oauth_app/send.json @@ -1,24 +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" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell/example.json b/config/v3/sell/example.json index 7f01b633..1bb243a2 100644 --- a/config/v3/sell/example.json +++ b/config/v3/sell/example.json @@ -1,4 +1,4 @@ { - "sell": 11542203588, - "price": 500 + "sell": 11542203588, + "price": 500 } diff --git a/config/v3/sell/receive.json b/config/v3/sell/receive.json index 2f61fe01..a5e82258 100644 --- a/config/v3/sell/receive.json +++ b/config/v3/sell/receive.json @@ -1,50 +1,55 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Contract (response)", - "description": "A message with transaction results is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "sell": { - "title": "sell", - "description": "Receipt for the transaction", - "type": "object", - "additionalProperties": false, - "properties": { - "balance_after": { - "description": "New account balance after completion of the sale", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Contract (response)", + "description": "A message with transaction results is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "sell": { + "title": "sell", + "description": "Receipt for the transaction", + "type": "object", + "additionalProperties": false, + "properties": { + "balance_after": { + "description": "New account balance after completion of the sale", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier for the sold contract", + "type": "integer" + }, + "reference_id": { + "description": "Internal transaction identifier for the corresponding buy transaction", + "type": "integer" + }, + "sold_for": { + "description": "Actual effected sale price", + "type": "number" + }, + "transaction_id": { + "description": "Internal transaction identifier for the sale transaction", + "type": "integer" + } + } }, - "contract_id": { - "description": "Internal contract identifier for the sold contract", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "reference_id": { - "description": "Internal transaction identifier for the corresponding buy transaction", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "sell" + ] }, - "sold_for": { - "description": "Actual effected sale price", - "type": "number" - }, - "transaction_id": { - "description": "Internal transaction identifier for the sale transaction", - "type": "integer" + "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": ["sell"] - }, - "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/sell/send.json b/config/v3/sell/send.json index 24039a84..c561e251 100644 --- a/config/v3/sell/send.json +++ b/config/v3/sell/send.json @@ -1,28 +1,34 @@ { - "$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" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell_contract_for_multiple_accounts/example.json b/config/v3/sell_contract_for_multiple_accounts/example.json index d992e464..e514c7da 100644 --- a/config/v3/sell_contract_for_multiple_accounts/example.json +++ b/config/v3/sell_contract_for_multiple_accounts/example.json @@ -1,6 +1,9 @@ { - "sell_contract_for_multiple_accounts": 1, - "price": 500, - "shortcode": "CALL_R_50_5_1488181433_1488181553_S0P_0", - "tokens": ["FrvservuIFEf1", "JUBibibkebiuwbeCNEc"] + "sell_contract_for_multiple_accounts": 1, + "price": 500, + "shortcode": "CALL_R_50_5_1488181433_1488181553_S0P_0", + "tokens": [ + "FrvservuIFEf1", + "JUBibibkebiuwbeCNEc" + ] } diff --git a/config/v3/sell_contract_for_multiple_accounts/receive.json b/config/v3/sell_contract_for_multiple_accounts/receive.json index cca4028e..f842faaf 100644 --- a/config/v3/sell_contract_for_multiple_accounts/receive.json +++ b/config/v3/sell_contract_for_multiple_accounts/receive.json @@ -1,97 +1,106 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Contracts: Multiple Accounts (response)", - "description": "Confirmation of the sale status for the selected contracts and accounts.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "sell_contract_for_multiple_accounts": { - "title": "sell_contract_for_multiple_accounts", - "description": "Status information for each affected account.", - "type": "object", - "additionalProperties": false, - "properties": { - "result": { - "description": "The result of sell for multiple accounts request.", - "type": "array", - "items": { - "anyOf": [ - { - "title": "Receipt for the transaction", - "description": "Receipt for the transaction", - "type": "object", - "additionalProperties": false, - "required": [ - "balance_after", - "contract_id", - "reference_id", - "sell_price", - "transaction_id" - ], - "properties": { - "balance_after": { - "description": "New account balance after completion of the sale", - "type": "number" - }, - "contract_id": { - "description": "Internal contract identifier", - "type": "integer" - }, - "reference_id": { - "description": "Internal transaction identifier for the corresponding transaction", - "type": "integer" - }, - "sell_price": { - "description": "Actual effected sale price", - "type": "number" - }, - "sell_time": { - "description": "date and time of sale `YYYY-MM-dd hh:mm:ss` format", - "type": "string" - }, - "transaction_id": { - "description": "Internal transaction identifier for the contract sale transaction", - "type": "integer" - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Contracts: Multiple Accounts (response)", + "description": "Confirmation of the sale status for the selected contracts and accounts.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "sell_contract_for_multiple_accounts": { + "title": "sell_contract_for_multiple_accounts", + "description": "Status information for each affected account.", + "type": "object", + "additionalProperties": false, + "properties": { + "result": { + "description": "The result of sell for multiple accounts request.", + "type": "array", + "items": { + "anyOf": [ + { + "title": "Receipt for the transaction", + "description": "Receipt for the transaction", + "type": "object", + "additionalProperties": false, + "required": [ + "balance_after", + "contract_id", + "reference_id", + "sell_price", + "transaction_id" + ], + "properties": { + "balance_after": { + "description": "New account balance after completion of the sale", + "type": "number" + }, + "contract_id": { + "description": "Internal contract identifier", + "type": "integer" + }, + "reference_id": { + "description": "Internal transaction identifier for the corresponding transaction", + "type": "integer" + }, + "sell_price": { + "description": "Actual effected sale price", + "type": "number" + }, + "sell_time": { + "description": "date and time of sale `YYYY-MM-dd hh:mm:ss` format", + "type": "string" + }, + "transaction_id": { + "description": "Internal transaction identifier for the contract sale transaction", + "type": "integer" + } + } + }, + { + "description": "Error message", + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "message_to_client", + "token" + ], + "properties": { + "code": { + "description": "An error code", + "type": "string" + }, + "message_to_client": { + "description": "An error message localized according to the websocket", + "type": "string" + }, + "token": { + "description": "The token designating the account", + "type": "string" + } + } + } + ] + } } - }, - { - "description": "Error message", - "type": "object", - "additionalProperties": false, - "required": ["code", "message_to_client", "token"], - "properties": { - "code": { - "description": "An error code", - "type": "string" - }, - "message_to_client": { - "description": "An error message localized according to the websocket", - "type": "string" - }, - "token": { - "description": "The token designating the account", - "type": "string" - } - } - } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "sell_contract_for_multiple_accounts" ] - } + }, + "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": ["sell_contract_for_multiple_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/sell_contract_for_multiple_accounts/send.json b/config/v3/sell_contract_for_multiple_accounts/send.json index a4b5bbf9..7c6ada2a 100644 --- a/config/v3/sell_contract_for_multiple_accounts/send.json +++ b/config/v3/sell_contract_for_multiple_accounts/send.json @@ -1,43 +1,53 @@ { - "$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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/sell_expired/example.json b/config/v3/sell_expired/example.json index 82018158..05fb6b65 100644 --- a/config/v3/sell_expired/example.json +++ b/config/v3/sell_expired/example.json @@ -1,3 +1,3 @@ { - "sell_expired": 1 + "sell_expired": 1 } diff --git a/config/v3/sell_expired/receive.json b/config/v3/sell_expired/receive.json index 8dbad6f6..b748ca36 100644 --- a/config/v3/sell_expired/receive.json +++ b/config/v3/sell_expired/receive.json @@ -1,35 +1,42 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Sell Expired Contracts (response)", - "description": "The result of sell expired contract", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "sell_expired": { - "title": "sell_expired", - "description": "Sell expired contract object containing count of contracts sold", - "type": "object", - "additionalProperties": false, - "properties": { - "count": { - "description": "The number of contracts that has been sold.", - "type": "integer", - "examples": [10] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Sell Expired Contracts (response)", + "description": "The result of sell expired contract", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "sell_expired": { + "title": "sell_expired", + "description": "Sell expired contract object containing count of contracts sold", + "type": "object", + "additionalProperties": false, + "properties": { + "count": { + "description": "The number of contracts that has been sold.", + "type": "integer", + "examples": [ + 10 + ] + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "sell_expired" + ] + }, + "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": ["sell_expired"] - }, - "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/sell_expired/send.json b/config/v3/sell_expired/send.json index 2bcd2441..32bf3c48 100644 --- a/config/v3/sell_expired/send.json +++ b/config/v3/sell_expired/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_account_currency/example.json b/config/v3/set_account_currency/example.json index d0018b4c..1b3f8030 100644 --- a/config/v3/set_account_currency/example.json +++ b/config/v3/set_account_currency/example.json @@ -1,3 +1,3 @@ { - "set_account_currency": "USD" + "set_account_currency": "USD" } diff --git a/config/v3/set_account_currency/receive.json b/config/v3/set_account_currency/receive.json index dbda283d..ab39d506 100644 --- a/config/v3/set_account_currency/receive.json +++ b/config/v3/set_account_currency/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Currency (response)", - "description": "Status of set account currency call", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "set_account_currency": { - "title": "set_account_currency", - "description": "`1`: success, `0`: no change", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["set_account_currency"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Currency (response)", + "description": "Status of set account currency call", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "set_account_currency": { + "title": "set_account_currency", + "description": "`1`: success, `0`: no change", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "set_account_currency" + ] + }, + "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/set_account_currency/send.json b/config/v3/set_account_currency/send.json index 0161f4fb..ba47cf50 100644 --- a/config/v3/set_account_currency/send.json +++ b/config/v3/set_account_currency/send.json @@ -1,25 +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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_financial_assessment/example.json b/config/v3/set_financial_assessment/example.json index c80fb461..e6a2d304 100644 --- a/config/v3/set_financial_assessment/example.json +++ b/config/v3/set_financial_assessment/example.json @@ -1,36 +1,36 @@ { - "set_financial_assessment": 1, - "financial_information": { - "account_turnover": "Less than $25,000", - "education_level": "Secondary", - "employment_industry": "Finance", - "employment_status": "Self-Employed", - "estimated_worth": "$100,000 - $250,000", - "income_source": "Self-Employed", - "net_income": "$25,000 - $50,000", - "occupation": "Managers", - "source_of_wealth": "Company Ownership" - }, - "trading_experience": { - "binary_options_trading_experience": "1-2 years", - "binary_options_trading_frequency": "40 transactions or more in the past 12 months", - "cfd_trading_experience": "Over 3 years", - "cfd_trading_frequency": "6-10 transactions in the past 12 months", - "forex_trading_experience": "Over 3 years", - "forex_trading_frequency": "0-5 transactions in the past 12 months", - "other_instruments_trading_experience": "Over 3 years", - "other_instruments_trading_frequency": "6-10 transactions in the past 12 months" - }, - "trading_experience_regulated": { - "cfd_experience": "Less than a year", - "cfd_frequency": "1 - 5 transactions in the past 12 months", - "cfd_trading_definition": "Speculate on the price movement.", - "leverage_impact_trading": "Leverage lets you open larger positions for a fraction of the trade's value.", - "leverage_trading_high_risk_stop_loss": "Close your trade automatically when the loss is more than or equal to a specific amount.", - "required_initial_margin": "When opening a Leveraged CFD trade.", - "risk_tolerance": "Yes", - "source_of_experience": "I have an academic degree, professional certification, and/or work experience.", - "trading_experience_financial_instruments": "Less than a year", - "trading_frequency_financial_instruments": "1 - 5 transactions in the past 12 months" - } + "set_financial_assessment": 1, + "financial_information": { + "account_turnover": "Less than $25,000", + "education_level": "Secondary", + "employment_industry": "Finance", + "employment_status": "Self-Employed", + "estimated_worth": "$100,000 - $250,000", + "income_source": "Self-Employed", + "net_income": "$25,000 - $50,000", + "occupation": "Managers", + "source_of_wealth": "Company Ownership" + }, + "trading_experience": { + "binary_options_trading_experience": "1-2 years", + "binary_options_trading_frequency": "40 transactions or more in the past 12 months", + "cfd_trading_experience": "Over 3 years", + "cfd_trading_frequency": "6-10 transactions in the past 12 months", + "forex_trading_experience": "Over 3 years", + "forex_trading_frequency": "0-5 transactions in the past 12 months", + "other_instruments_trading_experience": "Over 3 years", + "other_instruments_trading_frequency": "6-10 transactions in the past 12 months" + }, + "trading_experience_regulated": { + "cfd_experience": "Less than a year", + "cfd_frequency": "1 - 5 transactions in the past 12 months", + "cfd_trading_definition": "Speculate on the price movement.", + "leverage_impact_trading": "Leverage lets you open larger positions for a fraction of the trade's value.", + "leverage_trading_high_risk_stop_loss": "Close your trade automatically when the loss is more than or equal to a specific amount.", + "required_initial_margin": "When opening a Leveraged CFD trade.", + "risk_tolerance": "Yes", + "source_of_experience": "I have an academic degree, professional certification, and/or work experience.", + "trading_experience_financial_instruments": "Less than a year", + "trading_frequency_financial_instruments": "1 - 5 transactions in the past 12 months" + } } diff --git a/config/v3/set_financial_assessment/receive.json b/config/v3/set_financial_assessment/receive.json index 40ad9cfc..2644a86d 100644 --- a/config/v3/set_financial_assessment/receive.json +++ b/config/v3/set_financial_assessment/receive.json @@ -1,46 +1,51 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Financial Assessment (response)", - "description": "Set Financial Assessment Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "set_financial_assessment": { - "title": "set_financial_assessment", - "description": "The financial assessment score assigned to the submitted financial assessment", - "type": "object", - "additionalProperties": false, - "properties": { - "cfd_score": { - "description": "CFD score based on answers", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Financial Assessment (response)", + "description": "Set Financial Assessment Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "set_financial_assessment": { + "title": "set_financial_assessment", + "description": "The financial assessment score assigned to the submitted financial assessment", + "type": "object", + "additionalProperties": false, + "properties": { + "cfd_score": { + "description": "CFD score based on answers", + "type": "integer" + }, + "financial_information_score": { + "description": "Financial information score based on answers", + "type": "integer" + }, + "total_score": { + "description": "Financial Assessment score based on answers", + "type": "integer" + }, + "trading_score": { + "description": "Trading experience score based on answers", + "type": "integer" + } + } }, - "financial_information_score": { - "description": "Financial information score based on answers", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "total_score": { - "description": "Financial Assessment score based on answers", - "type": "integer" + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "set_financial_assessment" + ] }, - "trading_score": { - "description": "Trading experience score based on answers", - "type": "integer" + "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": ["set_financial_assessment"] - }, - "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/set_financial_assessment/send.json b/config/v3/set_financial_assessment/send.json index 7f5b0481..10584407 100644 --- a/config/v3/set_financial_assessment/send.json +++ b/config/v3/set_financial_assessment/send.json @@ -1,490 +1,562 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Financial Assessment (request)", - "description": "This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_financial_assessment"], - "properties": { - "set_financial_assessment": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "binary_options_trading_experience": { - "description": "[Optional] Binary options trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "binary_options_trading_frequency": { - "description": "[Optional] Binary options trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "cfd_trading_experience": { - "description": "[Optional] CFDs trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "cfd_trading_frequency": { - "description": "[Optional] CFDs trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "education_level": { - "description": "[Optional] Level of Education.", - "type": "string", - "enum": ["Primary", "Secondary", "Tertiary"] - }, - "employment_industry": { - "description": "[Optional] Industry of Employment.", - "type": "string", - "enum": [ - "Construction", - "Education", - "Finance", - "Health", - "Tourism", - "Information & Communications Technology", - "Science & Engineering", - "Legal", - "Social & Cultural", - "Agriculture", - "Real Estate", - "Food Services", - "Manufacturing", - "Unemployed" - ] - }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "estimated_worth": { - "description": "[Optional] Estimated Net Worth.", - "type": "string", - "enum": [ - "Less than $100,000", - "$100,000 - $250,000", - "$250,001 - $500,000", - "$500,001 - $1,000,000", - "Over $1,000,000" - ] - }, - "financial_information": { - "description": "[Optional] The financial information of a client", - "type": "object", - "additionalProperties": false, - "required": [ - "education_level", - "employment_industry", - "estimated_worth", - "income_source", - "net_income", - "occupation" - ], - "properties": { - "account_turnover": { - "description": "[Optional] The anticipated account turnover.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "education_level": { - "description": "Level of Education.", - "type": "string", - "enum": ["Primary", "Secondary", "Tertiary"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Financial Assessment (request)", + "description": "This call sets the financial assessment details based on the client's answers to analyze whether they possess the experience and knowledge to understand the risks involved with binary options trading.", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_financial_assessment" + ], + "properties": { + "set_financial_assessment": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] }, - "employment_industry": { - "description": "Industry of Employment.", - "type": "string", - "enum": [ - "Construction", - "Education", - "Finance", - "Health", - "Tourism", - "Information & Communications Technology", - "Science & Engineering", - "Legal", - "Social & Cultural", - "Agriculture", - "Real Estate", - "Food Services", - "Manufacturing", - "Unemployed" - ] + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] + "binary_options_trading_experience": { + "description": "[Optional] Binary options trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "estimated_worth": { - "description": "Estimated Net Worth.", - "type": "string", - "enum": [ - "Less than $100,000", - "$100,000 - $250,000", - "$250,001 - $500,000", - "$500,001 - $1,000,000", - "Over $1,000,000" - ] + "binary_options_trading_frequency": { + "description": "[Optional] Binary options trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "income_source": { - "description": "Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] + "cfd_trading_experience": { + "description": "[Optional] CFDs trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "net_income": { - "description": "Net Annual Income.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] + "cfd_trading_frequency": { + "description": "[Optional] CFDs trading frequency.", + "type": "string", + "enum": [ + "0-5 transactions in the past 12 months", + "6-10 transactions in the past 12 months", + "11-39 transactions in the past 12 months", + "40 transactions or more in the past 12 months" + ] }, - "occupation": { - "description": "Occupation.", - "type": "string", - "enum": [ - "Chief Executives, Senior Officials and Legislators", - "Managers", - "Professionals", - "Clerks", - "Personal Care, Sales and Service Workers", - "Agricultural, Forestry and Fishery Workers", - "Craft, Metal, Electrical and Electronics Workers", - "Plant and Machine Operators and Assemblers", - "Cleaners and Helpers", - "Mining, Construction, Manufacturing and Transport Workers", - "Armed Forces", - "Government Officers", - "Students", - "Unemployed" - ] + "education_level": { + "description": "[Optional] Level of Education.", + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] }, - "source_of_wealth": { - "description": "[Optional] Source of wealth.", - "type": "string", - "enum": [ - "Accumulation of Income/Savings", - "Cash Business", - "Company Ownership", - "Divorce Settlement", - "Inheritance", - "Investment Income", - "Sale of Property" - ] - } - } - }, - "forex_trading_experience": { - "description": "[Optional] Forex trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "forex_trading_frequency": { - "description": "[Optional] Forex trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "income_source": { - "description": "[Optional] Income Source.", - "type": "string", - "enum": [ - "Salaried Employee", - "Self-Employed", - "Investments & Dividends", - "Pension", - "State Benefits", - "Savings & Inheritance" - ] - }, - "net_income": { - "description": "[Optional] Net Annual Income.", - "type": "string", - "enum": [ - "Less than $25,000", - "$25,000 - $50,000", - "$50,001 - $100,000", - "$100,001 - $500,000", - "Over $500,000" - ] - }, - "occupation": { - "description": "[Optional] Occupation.", - "type": "string", - "enum": [ - "Chief Executives, Senior Officials and Legislators", - "Managers", - "Professionals", - "Clerks", - "Personal Care, Sales and Service Workers", - "Agricultural, Forestry and Fishery Workers", - "Craft, Metal, Electrical and Electronics Workers", - "Plant and Machine Operators and Assemblers", - "Cleaners and Helpers", - "Mining, Construction, Manufacturing and Transport Workers", - "Armed Forces", - "Government Officers", - "Students", - "Unemployed" - ] - }, - "other_instruments_trading_experience": { - "description": "[Optional] Trading experience in other financial instruments.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] - }, - "other_instruments_trading_frequency": { - "description": "[Optional] Trading frequency in other financial instruments.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "source_of_wealth": { - "description": "[Optional] Source of wealth.", - "type": "string", - "enum": [ - "Accumulation of Income/Savings", - "Cash Business", - "Company Ownership", - "Divorce Settlement", - "Inheritance", - "Investment Income", - "Sale of Property" - ] - }, - "trading_experience": { - "description": "[Optional] The trading experience of a client", - "type": "object", - "additionalProperties": false, - "properties": { - "binary_options_trading_experience": { - "description": "[Optional] Binary options trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "employment_industry": { + "description": "[Optional] Industry of Employment.", + "type": "string", + "enum": [ + "Construction", + "Education", + "Finance", + "Health", + "Tourism", + "Information & Communications Technology", + "Science & Engineering", + "Legal", + "Social & Cultural", + "Agriculture", + "Real Estate", + "Food Services", + "Manufacturing", + "Unemployed" + ] }, - "binary_options_trading_frequency": { - "description": "[Optional] Binary options trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] }, - "cfd_trading_experience": { - "description": "[Optional] CFDs trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "estimated_worth": { + "description": "[Optional] Estimated Net Worth.", + "type": "string", + "enum": [ + "Less than $100,000", + "$100,000 - $250,000", + "$250,001 - $500,000", + "$500,001 - $1,000,000", + "Over $1,000,000" + ] }, - "cfd_trading_frequency": { - "description": "[Optional] CFDs trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "financial_information": { + "description": "[Optional] The financial information of a client", + "type": "object", + "additionalProperties": false, + "required": [ + "education_level", + "employment_industry", + "estimated_worth", + "income_source", + "net_income", + "occupation" + ], + "properties": { + "account_turnover": { + "description": "[Optional] The anticipated account turnover.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "education_level": { + "description": "Level of Education.", + "type": "string", + "enum": [ + "Primary", + "Secondary", + "Tertiary" + ] + }, + "employment_industry": { + "description": "Industry of Employment.", + "type": "string", + "enum": [ + "Construction", + "Education", + "Finance", + "Health", + "Tourism", + "Information & Communications Technology", + "Science & Engineering", + "Legal", + "Social & Cultural", + "Agriculture", + "Real Estate", + "Food Services", + "Manufacturing", + "Unemployed" + ] + }, + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "estimated_worth": { + "description": "Estimated Net Worth.", + "type": "string", + "enum": [ + "Less than $100,000", + "$100,000 - $250,000", + "$250,001 - $500,000", + "$500,001 - $1,000,000", + "Over $1,000,000" + ] + }, + "income_source": { + "description": "Income Source.", + "type": "string", + "enum": [ + "Salaried Employee", + "Self-Employed", + "Investments & Dividends", + "Pension", + "State Benefits", + "Savings & Inheritance" + ] + }, + "net_income": { + "description": "Net Annual Income.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] + }, + "occupation": { + "description": "Occupation.", + "type": "string", + "enum": [ + "Chief Executives, Senior Officials and Legislators", + "Managers", + "Professionals", + "Clerks", + "Personal Care, Sales and Service Workers", + "Agricultural, Forestry and Fishery Workers", + "Craft, Metal, Electrical and Electronics Workers", + "Plant and Machine Operators and Assemblers", + "Cleaners and Helpers", + "Mining, Construction, Manufacturing and Transport Workers", + "Armed Forces", + "Government Officers", + "Students", + "Unemployed" + ] + }, + "source_of_wealth": { + "description": "[Optional] Source of wealth.", + "type": "string", + "enum": [ + "Accumulation of Income/Savings", + "Cash Business", + "Company Ownership", + "Divorce Settlement", + "Inheritance", + "Investment Income", + "Sale of Property" + ] + } + } }, "forex_trading_experience": { - "description": "[Optional] Forex trading experience.", - "type": "string", - "enum": ["0-1 year", "1-2 years", "Over 3 years"] + "description": "[Optional] Forex trading experience.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, "forex_trading_frequency": { - "description": "[Optional] Forex trading frequency.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - }, - "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] 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_frequency": { - "description": "[Optional] Trading frequency in other financial instruments.", - "type": "string", - "enum": [ - "0-5 transactions in the past 12 months", - "6-10 transactions in the past 12 months", - "11-39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] - } - } - }, - "trading_experience_regulated": { - "description": "[Optional] The trading experience of a `maltainvest` client", - "type": "object", - "additionalProperties": false, - "required": [ - "cfd_experience", - "cfd_frequency", - "cfd_trading_definition", - "leverage_impact_trading", - "leverage_trading_high_risk_stop_loss", - "required_initial_margin", - "risk_tolerance", - "source_of_experience", - "trading_experience_financial_instruments", - "trading_frequency_financial_instruments" - ], - "properties": { - "cfd_experience": { - "description": "How much experience do you have in CFD trading?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] + "income_source": { + "description": "[Optional] Income Source.", + "type": "string", + "enum": [ + "Salaried Employee", + "Self-Employed", + "Investments & Dividends", + "Pension", + "State Benefits", + "Savings & Inheritance" + ] }, - "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" - ] + "net_income": { + "description": "[Optional] Net Annual Income.", + "type": "string", + "enum": [ + "Less than $25,000", + "$25,000 - $50,000", + "$50,001 - $100,000", + "$100,001 - $500,000", + "Over $500,000" + ] }, - "cfd_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." - ] + "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" + ] }, - "leverage_impact_trading": { - "description": "How does leverage affect CFD trading?", - "type": "string", - "enum": [ - "Leverage is a risk mitigation technique.", - "Leverage prevents you from opening large positions.", - "Leverage guarantees profits.", - "Leverage lets you open larger positions for a fraction of the trade's value." - ] + "other_instruments_trading_experience": { + "description": "[Optional] Trading experience in other financial instruments.", + "type": "string", + "enum": [ + "0-1 year", + "1-2 years", + "Over 3 years" + ] }, - "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." - ] + "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." - ] + "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" + ] }, - "risk_tolerance": { - "description": "Do you understand that you could potentially lose 100% of the money you use to trade?", - "type": "string", - "enum": ["Yes", "No"] + "trading_experience": { + "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" + ] + } + } }, - "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_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" + ] + } + } }, - "trading_experience_financial_instruments": { - "description": "How much experience do you have with other financial instruments?", - "type": "string", - "enum": ["No experience", "Less than a year", "1 - 2 years", "Over 3 years"] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 }, - "trading_frequency_financial_instruments": { - "description": "How many trades have you placed with other financial instruments in the past 12 months?", - "type": "string", - "enum": [ - "No transactions in the past 12 months", - "1 - 5 transactions in the past 12 months", - "6 - 10 transactions in the past 12 months", - "11 - 39 transactions in the past 12 months", - "40 transactions or more in the past 12 months" - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/set_self_exclusion/example.json b/config/v3/set_self_exclusion/example.json index 2170db01..c34a2ec2 100644 --- a/config/v3/set_self_exclusion/example.json +++ b/config/v3/set_self_exclusion/example.json @@ -1,15 +1,15 @@ { - "set_self_exclusion": 1, - "exclude_until": "2020-01-01", - "max_30day_deposit": 1000, - "max_30day_losses": 100000, - "max_30day_turnover": 1000, - "max_7day_deposit": 100, - "max_7day_losses": 100000, - "max_7day_turnover": 1000, - "max_deposit": 10, - "max_losses": 100000, - "max_turnover": 1000, - "session_duration_limit": 3600, - "timeout_until": 1497357184 + "set_self_exclusion": 1, + "exclude_until": "2020-01-01", + "max_30day_deposit": 1000, + "max_30day_losses": 100000, + "max_30day_turnover": 1000, + "max_7day_deposit": 100, + "max_7day_losses": 100000, + "max_7day_turnover": 1000, + "max_deposit": 10, + "max_losses": 100000, + "max_turnover": 1000, + "session_duration_limit": 3600, + "timeout_until": 1497357184 } diff --git a/config/v3/set_self_exclusion/receive.json b/config/v3/set_self_exclusion/receive.json index 3f4ff94e..d0072e56 100644 --- a/config/v3/set_self_exclusion/receive.json +++ b/config/v3/set_self_exclusion/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Self-Exclusion (response)", - "description": "A message with User Self-Exclusion", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "set_self_exclusion": { - "title": "set_self_exclusion", - "description": "`1` on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["set_self_exclusion"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Self-Exclusion (response)", + "description": "A message with User Self-Exclusion", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "set_self_exclusion": { + "title": "set_self_exclusion", + "description": "`1` on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "set_self_exclusion" + ] + }, + "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/set_self_exclusion/send.json b/config/v3/set_self_exclusion/send.json index a7cc70eb..456df778 100644 --- a/config/v3/set_self_exclusion/send.json +++ b/config/v3/set_self_exclusion/send.json @@ -1,87 +1,136 @@ { - "$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 - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/set_settings/example.json b/config/v3/set_settings/example.json index 1b9812ac..a8b080c1 100644 --- a/config/v3/set_settings/example.json +++ b/config/v3/set_settings/example.json @@ -1,17 +1,17 @@ { - "set_settings": 1, - "account_opening_reason": "Speculative", - "address_city": "Test City", - "address_line_1": "Test Address Line 1", - "address_line_2": "Test Address Line 2", - "address_postcode": "123456", - "allow_copiers": 1, - "email_consent": 0, - "employment_status": "Employed", - "phone": "+15417543010", - "place_of_birth": "ar", - "preferred_language": "EN", - "request_professional_status": 1, - "tax_identification_number": "987654321", - "tax_residence": "hk" + "set_settings": 1, + "account_opening_reason": "Speculative", + "address_city": "Test City", + "address_line_1": "Test Address Line 1", + "address_line_2": "Test Address Line 2", + "address_postcode": "123456", + "allow_copiers": 1, + "email_consent": 0, + "employment_status": "Employed", + "phone": "+15417543010", + "place_of_birth": "ar", + "preferred_language": "EN", + "request_professional_status": 1, + "tax_identification_number": "987654321", + "tax_residence": "hk" } diff --git a/config/v3/set_settings/receive.json b/config/v3/set_settings/receive.json index cd82a309..06b716da 100644 --- a/config/v3/set_settings/receive.json +++ b/config/v3/set_settings/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Settings (response)", - "description": "A message with User Settings", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "set_settings": { - "title": "set_settings", - "description": "1 on success", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["set_settings"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Settings (response)", + "description": "A message with User Settings", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "set_settings": { + "title": "set_settings", + "description": "1 on success", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "set_settings" + ] + }, + "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/set_settings/send.json b/config/v3/set_settings/send.json index ff5725f2..478a57c5 100644 --- a/config/v3/set_settings/send.json +++ b/config/v3/set_settings/send.json @@ -1,181 +1,238 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Settings (request)", - "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", - "type": "object", - "auth_required": 1, - "auth_scopes": ["admin"], - "additionalProperties": false, - "required": ["set_settings"], - "properties": { - "set_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "account_opening_reason": { - "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", - "type": "string", - "enum": ["Speculative", "Income Earning", "Hedging", "Peer-to-peer exchange"] - }, - "address_city": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{1,35}$" - }, - "address_line_1": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()\\x{b0}@#/-]{1,70}$" - }, - "address_line_2": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": ["null", "string"], - "pattern": "^[\\p{L}\\p{Nd}\\s'.,:;()\\x{b0}@#/-]{0,70}$" - }, - "address_postcode": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" - }, - "address_state": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" - }, - "allow_copiers": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", - "type": "integer", - "enum": [0, 1] - }, - "citizen": { - "description": "[Optional] Country of legal citizenship, 2-letter country code.", - "type": ["null", "string"], - "pattern": "^([a-z]{2})?$" - }, - "date_of_birth": { - "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" - }, - "dxtrade_user_exception": { - "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", - "type": "integer", - "enum": [0, 1] - }, - "email_consent": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", - "type": "integer", - "enum": [0, 1] - }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string", - "enum": ["Employed", "Pensioner", "Self-Employed", "Student", "Unemployed"] - }, - "feature_flag": { - "description": "[Optional] Enable or disable one or multiple features.", - "type": "object", - "additionalProperties": false, - "properties": { - "wallet": { - "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", - "type": "integer", - "enum": [0, 1] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Settings (request)", + "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", + "type": "object", + "auth_required": 1, + "auth_scopes": [ + "admin" + ], + "additionalProperties": false, + "required": [ + "set_settings" + ], + "properties": { + "set_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [ + 1 + ] + }, + "account_opening_reason": { + "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", + "type": "string", + "enum": [ + "Speculative", + "Income Earning", + "Hedging", + "Peer-to-peer exchange" + ] + }, + "address_city": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{1,35}$" + }, + "address_line_1": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{1,70}$" + }, + "address_line_2": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": [ + "null", + "string" + ], + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" + }, + "address_postcode": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" + }, + "address_state": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" + }, + "allow_copiers": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "citizen": { + "description": "[Optional] Country of legal citizenship, 2-letter country code.", + "type": [ + "null", + "string" + ], + "pattern": "^([a-z]{2})?$" + }, + "date_of_birth": { + "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" + }, + "dxtrade_user_exception": { + "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "email_consent": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string", + "enum": [ + "Employed", + "Pensioner", + "Self-Employed", + "Student", + "Unemployed" + ] + }, + "feature_flag": { + "description": "[Optional] Enable or disable one or multiple features.", + "type": "object", + "additionalProperties": false, + "properties": { + "wallet": { + "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } + }, + "first_name": { + "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "last_name": { + "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{2,50}$", + "sensitive": 1 + }, + "non_pep_declaration": { + "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", + "type": "integer", + "enum": [ + 1 + ] + }, + "phone": { + "description": "[Optional] Note: not applicable for virtual account. Starting with `+` followed by 9-35 digits, hyphens or space.", + "type": [ + "null", + "string" + ], + "sensitive": 1 + }, + "place_of_birth": { + "description": "[Optional] Place of birth, 2-letter country code.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "preferred_language": { + "description": "[Optional] User's preferred language, ISO standard language code", + "type": [ + "null", + "string" + ], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "request_professional_status": { + "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", + "type": "integer", + "enum": [ + 1 + ] + }, + "residence": { + "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", + "type": [ + "null", + "string" + ], + "pattern": "^[a-z]{2}$" + }, + "salutation": { + "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", + "type": "string", + "enum": [ + "Mr", + "Ms", + "Miss", + "Mrs" + ] + }, + "secret_answer": { + "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "pattern": "^[\\w\\-\\,\\.\\' ]+", + "maxLength": 50, + "minLength": 4, + "sensitive": 1 + }, + "secret_question": { + "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "enum": [ + "Mother's maiden name", + "Name of your pet", + "Name of first love", + "Memorable town/city", + "Memorable date", + "Favourite dish", + "Brand of first car", + "Favourite artist" + ] + }, + "tax_identification_number": { + "description": "[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[A-Za-z0-9.\\/\\s-]{0,25}$" + }, + "tax_residence": { + "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" + }, + "trading_hub": { + "description": "[Optional] Enable/Disable Trading Hub dashboard", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "first_name": { - "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "last_name": { - "description": "[Optional] Within 2-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{2,50}$", - "sensitive": 1 - }, - "non_pep_declaration": { - "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", - "type": "integer", - "enum": [1] - }, - "phone": { - "description": "[Optional] Note: not applicable for virtual account. Starting with `+` followed by 9-35 digits, hyphens or space.", - "type": ["null", "string"], - "sensitive": 1 - }, - "place_of_birth": { - "description": "[Optional] Place of birth, 2-letter country code.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "preferred_language": { - "description": "[Optional] User's preferred language, ISO standard language code", - "type": ["null", "string"], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "request_professional_status": { - "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", - "type": "integer", - "enum": [1] - }, - "residence": { - "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", - "type": ["null", "string"], - "pattern": "^[a-z]{2}$" - }, - "salutation": { - "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", - "type": "string", - "enum": ["Mr", "Ms"] - }, - "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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/statement/example.json b/config/v3/statement/example.json index 98da2e47..8aaf1780 100644 --- a/config/v3/statement/example.json +++ b/config/v3/statement/example.json @@ -1,6 +1,6 @@ { - "statement": 1, - "description": 1, - "limit": 100, - "offset": 25 + "statement": 1, + "description": 1, + "limit": 100, + "offset": 25 } diff --git a/config/v3/statement/receive.json b/config/v3/statement/receive.json index a69dfe56..33dfda68 100644 --- a/config/v3/statement/receive.json +++ b/config/v3/statement/receive.json @@ -1,157 +1,187 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Statement (response)", - "description": "A summary of account statement is received", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "statement": { - "title": "statement", - "description": "Account statement.", - "type": "object", - "additionalProperties": false, - "properties": { - "count": { - "description": "Number of transactions returned in this call", - "type": "number" - }, - "transactions": { - "description": "Array of returned transactions", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Statement (response)", + "description": "A summary of account statement is received", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "statement": { + "title": "statement", + "description": "Account statement.", "type": "object", "additionalProperties": false, "properties": { - "action_type": { - "description": "It is the type of action.", - "type": "string", - "enum": [ - "buy", - "sell", - "deposit", - "withdrawal", - "hold", - "release", - "adjustment", - "virtual_credit", - "transfer" - ] - }, - "amount": { - "description": "It is the amount of transaction.", - "type": "number", - "examples": [-83.23] - }, - "app_id": { - "description": "ID of the application where this contract was purchased.", - "type": ["integer", "null"] - }, - "balance_after": { - "description": "It is the remaining balance.", - "type": "number", - "examples": [10150.13] - }, - "contract_id": { - "description": "It is the contract ID.", - "type": ["integer", "null"], - "examples": [4867502908] - }, - "fees": { - "description": "Contains details about fees used for transfer. It is present only when action type is transfer.", - "type": "object", - "additionalProperties": false, - "properties": { - "amount": { - "description": "Fees amount", - "type": "number" - }, - "currency": { - "description": "Fees currency", - "type": "string" - }, - "minimum": { - "description": "Minimum amount of fees", + "count": { + "description": "Number of transactions returned in this call", "type": "number" - }, - "percentage": { - "description": "Fees percentage", - "type": "number" - } - } - }, - "from": { - "description": "Contains details of account from which amount was transferred. It is present only when action type is transfer.", - "type": "object", - "additionalProperties": false, - "properties": { - "loginid": { - "description": "Login id of the account from which money was transferred.", - "type": "string" - } + }, + "transactions": { + "description": "Array of returned transactions", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "action_type": { + "description": "It is the type of action.", + "type": "string", + "enum": [ + "buy", + "sell", + "deposit", + "withdrawal", + "hold", + "release", + "adjustment", + "virtual_credit", + "transfer" + ] + }, + "amount": { + "description": "It is the amount of transaction.", + "type": "number", + "examples": [ + -83.23 + ] + }, + "app_id": { + "description": "ID of the application where this contract was purchased.", + "type": [ + "integer", + "null" + ] + }, + "balance_after": { + "description": "It is the remaining balance.", + "type": "number", + "examples": [ + 10150.13 + ] + }, + "contract_id": { + "description": "It is the contract ID.", + "type": [ + "integer", + "null" + ], + "examples": [ + 4867502908 + ] + }, + "fees": { + "description": "Contains details about fees used for transfer. It is present only when action type is transfer.", + "type": "object", + "additionalProperties": false, + "properties": { + "amount": { + "description": "Fees amount", + "type": "number" + }, + "currency": { + "description": "Fees currency", + "type": "string" + }, + "minimum": { + "description": "Minimum amount of fees", + "type": "number" + }, + "percentage": { + "description": "Fees percentage", + "type": "number" + } + } + }, + "from": { + "description": "Contains details of account from which amount was transferred. It is present only when action type is transfer.", + "type": "object", + "additionalProperties": false, + "properties": { + "loginid": { + "description": "Login id of the account from which money was transferred.", + "type": "string" + } + } + }, + "longcode": { + "description": "The description of contract purchased if description is set to `1`.", + "type": "string" + }, + "payout": { + "description": "Payout price", + "type": [ + "null", + "number" + ] + }, + "purchase_time": { + "description": "Time at which contract was purchased, present only for sell transaction", + "type": "integer" + }, + "reference_id": { + "description": "Internal transaction identifier for the corresponding buy transaction ( set only for contract selling )", + "type": [ + "integer", + "null" + ] + }, + "shortcode": { + "description": "Compact description of the contract purchased if description is set to `1`.", + "type": [ + "null", + "string" + ] + }, + "to": { + "description": "Contains details of account to which amount was transferred. It is present only when action type is transfer.", + "type": "object", + "additionalProperties": false, + "properties": { + "loginid": { + "description": "Login id of the account to which money was transferred.", + "type": "string" + } + } + }, + "transaction_id": { + "description": "It is the transaction ID. In statement every contract (buy or sell) and every payment has a unique ID.", + "type": "integer", + "examples": [ + 10867502908 + ] + }, + "transaction_time": { + "description": "It is the time of transaction.", + "type": "integer", + "examples": [ + 1441175849 + ] + }, + "withdrawal_details": { + "description": "Additional withdrawal details such as typical processing times, if description is set to `1`.", + "type": "string" + } + } + } } - }, - "longcode": { - "description": "The description of contract purchased if description is set to `1`.", - "type": "string" - }, - "payout": { - "description": "Payout price", - "type": ["null", "number"] - }, - "purchase_time": { - "description": "Time at which contract was purchased, present only for sell transaction", - "type": "integer" - }, - "reference_id": { - "description": "Internal transaction identifier for the corresponding buy transaction ( set only for contract selling )", - "type": ["integer", "null"] - }, - "shortcode": { - "description": "Compact description of the contract purchased if description is set to `1`.", - "type": ["null", "string"] - }, - "to": { - "description": "Contains details of account to which amount was transferred. It is present only when action type is transfer.", - "type": "object", - "additionalProperties": false, - "properties": { - "loginid": { - "description": "Login id of the account to which money was transferred.", - "type": "string" - } - } - }, - "transaction_id": { - "description": "It is the transaction ID. In statement every contract (buy or sell) and every payment has a unique ID.", - "type": "integer", - "examples": [10867502908] - }, - "transaction_time": { - "description": "It is the time of transaction.", - "type": "integer", - "examples": [1441175849] - }, - "withdrawal_details": { - "description": "Additional withdrawal details such as typical processing times, if description is set to `1`.", - "type": "string" - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "statement" + ] + }, + "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": ["statement"] - }, - "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/statement/send.json b/config/v3/statement/send.json index 5ed14bac..2711af06 100644 --- a/config/v3/statement/send.json +++ b/config/v3/statement/send.json @@ -1,67 +1,79 @@ { - "$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": "number" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/states_list/example.json b/config/v3/states_list/example.json index b56b927b..cb72faf5 100644 --- a/config/v3/states_list/example.json +++ b/config/v3/states_list/example.json @@ -1,3 +1,3 @@ { - "states_list": "id" + "states_list": "id" } diff --git a/config/v3/states_list/receive.json b/config/v3/states_list/receive.json index b129f0ce..de716e2d 100644 --- a/config/v3/states_list/receive.json +++ b/config/v3/states_list/receive.json @@ -1,41 +1,46 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "States List (response)", - "description": "A message with States List", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "states_list": { - "title": "states_list", - "description": "List of states.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "text": { - "description": "The state name.", - "type": "string" - }, - "value": { - "description": "The state code.", - "type": "string" - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "States List (response)", + "description": "A message with States List", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "states_list": { + "title": "states_list", + "description": "List of states.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "text": { + "description": "The state name.", + "type": "string" + }, + "value": { + "description": "The state code.", + "type": "string" + } + } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "states_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": ["states_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/states_list/send.json b/config/v3/states_list/send.json index 073ffbaf..1973d36e 100644 --- a/config/v3/states_list/send.json +++ b/config/v3/states_list/send.json @@ -1,25 +1,28 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "States List (request)", - "description": "For a given country, returns a list of States of that country. This is useful to populate the account opening form.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["states_list"], - "properties": { - "states_list": { - "title": "States list", - "description": "Client's 2-letter country code (obtained from `residence_list` call)", - "type": "string", - "pattern": "^\\w\\w$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/ticks/example.json b/config/v3/ticks/example.json index 19797022..a2e3abf6 100644 --- a/config/v3/ticks/example.json +++ b/config/v3/ticks/example.json @@ -1,4 +1,4 @@ { - "ticks": "R_50", - "subscribe": 1 + "ticks": "R_50", + "subscribe": 1 } diff --git a/config/v3/ticks/receive.json b/config/v3/ticks/receive.json index c48d5366..4251d784 100644 --- a/config/v3/ticks/receive.json +++ b/config/v3/ticks/receive.json @@ -1,74 +1,87 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks Stream (response)", - "description": "Latest spot price for a given symbol. Continuous responses with a frequency of up to one second.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "tick": { - "title": "TickSpotData", - "description": "Tick by tick list of streamed data", - "type": "object", - "additionalProperties": false, - "required": ["pip_size"], - "properties": { - "ask": { - "description": "Market ask at the epoch", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ticks Stream (response)", + "description": "Latest spot price for a given symbol. Continuous responses with a frequency of up to one second.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "tick": { + "title": "TickSpotData", + "description": "Tick by tick list of streamed data", + "type": "object", + "additionalProperties": false, + "required": [ + "pip_size" + ], + "properties": { + "ask": { + "description": "Market ask at the epoch", + "type": "number" + }, + "bid": { + "description": "Market bid at the epoch", + "type": "number" + }, + "epoch": { + "description": "Epoch time of the tick", + "type": "integer" + }, + "id": { + "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", + "type": "string", + "examples": [ + "c84a793b-8a87-7999-ce10-9b22f7ceead3" + ] + }, + "pip_size": { + "description": "Indicates the number of decimal points that the returned amounts must be displayed with", + "type": "number" + }, + "quote": { + "description": "Market value at the epoch", + "type": "number" + }, + "symbol": { + "description": "Symbol", + "type": "string" + } + } }, - "bid": { - "description": "Market bid at the epoch", - "type": "number" + "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" + ] + } + } }, - "epoch": { - "description": "Epoch time of the tick", - "type": "integer" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "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"] + "msg_type": { + "description": "Type of the response.", + "type": "string", + "enum": [ + "tick" + ] }, - "pip_size": { - "description": "Indicates the number of decimal points that the returned amounts must be displayed with", - "type": "number" - }, - "quote": { - "description": "Market value at the epoch", - "type": "number" - }, - "symbol": { - "description": "Symbol", - "type": "string" - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Type of the response.", - "type": "string", - "enum": ["tick"] - }, - "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/ticks/send.json b/config/v3/ticks/send.json index d6d8e45a..6a324ef1 100644 --- a/config/v3/ticks/send.json +++ b/config/v3/ticks/send.json @@ -1,40 +1,45 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks Stream (request)", - "description": "Initiate a continuous stream of spot price updates for a given symbol.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ticks"], - "properties": { - "ticks": { - "description": "The short symbol name or array of symbols (obtained from `active_symbols` call).", - "oneOf": [ - { - "type": "string", - "pattern": "^\\w{2,30}$" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ticks Stream (request)", + "description": "Initiate a continuous stream of spot price updates for a given symbol.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "ticks" + ], + "properties": { + "ticks": { + "description": "The short symbol name or array of symbols (obtained from `active_symbols` call).", + "oneOf": [ + { + "type": "string", + "pattern": "^\\w{2,30}$" + }, + { + "type": "array", + "items": { + "type": "string", + "pattern": "^\\w{2,30}$" + } + } + ] }, - { - "type": "array", - "items": { - "type": "string", - "pattern": "^\\w{2,30}$" - } + "subscribe": { + "description": "[Optional] If set to 1, will send updates whenever a new tick is received.", + "type": "integer", + "enum": [ + 1 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - ] - }, - "subscribe": { - "description": "[Optional] If set to 1, will send updates whenever a new tick is received.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/ticks_history/example.json b/config/v3/ticks_history/example.json index b83d8ff2..e40c62ed 100644 --- a/config/v3/ticks_history/example.json +++ b/config/v3/ticks_history/example.json @@ -1,8 +1,8 @@ { - "ticks_history": "R_50", - "adjust_start_time": 1, - "count": 10, - "end": "latest", - "start": 1, - "style": "ticks" + "ticks_history": "R_50", + "adjust_start_time": 1, + "count": 10, + "end": "latest", + "start": 1, + "style": "ticks" } diff --git a/config/v3/ticks_history/receive.json b/config/v3/ticks_history/receive.json index 3a1db02d..e9f4218b 100644 --- a/config/v3/ticks_history/receive.json +++ b/config/v3/ticks_history/receive.json @@ -1,95 +1,107 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks History (response)", - "description": "Historic tick data for a single symbol", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "candles": { - "title": "candles", - "description": "Array of OHLC (open/high/low/close) price values for the given time (only for style=`candles`)", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "close": { - "description": "It is the close price value for the given time", - "type": "number" - }, - "epoch": { - "description": "It is an epoch value", - "type": "integer" - }, - "high": { - "description": "It is the high price value for the given time", - "type": "number" - }, - "low": { - "description": "It is the low price value for the given time", - "type": "number" - }, - "open": { - "description": "It is the open price value for the given time", - "type": "number" - } - } - } - }, - "history": { - "title": "history", - "description": "Historic tick data for a given symbol. Note: this will always return the latest possible set of ticks with accordance to the parameters specified.", - "type": "object", - "additionalProperties": false, - "properties": { - "prices": { - "description": "An array containing list of tick values for the corresponding epoch values in `times` array.", - "type": "array", - "items": { - "description": "Tick value.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Ticks History (response)", + "description": "Historic tick data for a single symbol", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "candles": { + "title": "candles", + "description": "Array of OHLC (open/high/low/close) price values for the given time (only for style=`candles`)", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "close": { + "description": "It is the close price value for the given time", + "type": "number" + }, + "epoch": { + "description": "It is an epoch value", + "type": "integer" + }, + "high": { + "description": "It is the high price value for the given time", + "type": "number" + }, + "low": { + "description": "It is the low price value for the given time", + "type": "number" + }, + "open": { + "description": "It is the open price value for the given time", + "type": "number" + } + } + } + }, + "history": { + "title": "history", + "description": "Historic tick data for a given symbol. Note: this will always return the latest possible set of ticks with accordance to the parameters specified.", + "type": "object", + "additionalProperties": false, + "properties": { + "prices": { + "description": "An array containing list of tick values for the corresponding epoch values in `times` array.", + "type": "array", + "items": { + "description": "Tick value.", + "type": "number" + } + }, + "times": { + "description": "An array containing list of epoch values for the corresponding tick values in `prices` array.", + "type": "array", + "items": { + "description": "Epoch of the tick.", + "type": "integer" + } + } + } + }, + "pip_size": { + "description": "Indicates the number of decimal points that the returned amounts must be displayed with", "type": "number" - } }, - "times": { - "description": "An array containing list of epoch values for the corresponding tick values in `prices` array.", - "type": "array", - "items": { - "description": "Epoch of the tick.", + "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": "Type of the response according to the `style` sent in request. Would be `history` or `candles` for the first response, and `tick` or `ohlc` for the rest when subscribed.", + "type": "string", + "enum": [ + "history", + "tick", + "candles", + "ohlc" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", "type": "integer" - } - } - } - }, - "pip_size": { - "description": "Indicates the number of decimal points that the returned amounts must be displayed with", - "type": "number" - }, - "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": "Type of the response according to the `style` sent in request. Would be `history` or `candles` for the first response, and `tick` or `ohlc` for the rest when subscribed.", - "type": "string", - "enum": ["history", "tick", "candles", "ohlc"] - }, - "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/ticks_history/send.json b/config/v3/ticks_history/send.json index f2b91add..3402ab50 100644 --- a/config/v3/ticks_history/send.json +++ b/config/v3/ticks_history/send.json @@ -1,61 +1,85 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Ticks History (request)", - "description": "Get historic tick data for a given symbol.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["ticks_history", "end"], - "properties": { - "ticks_history": { - "description": "Short symbol name (obtained from the `active_symbols` call).", - "type": "string", - "pattern": "^\\w{2,30}$" - }, - "adjust_start_time": { - "description": "[Optional] 1 - if the market is closed at the end time, or license limit is before end time, adjust interval backwards to compensate.", - "type": "integer", - "enum": [1] - }, - "count": { - "description": "[Optional] An upper limit on ticks to receive.", - "type": "integer", - "default": "5000" - }, - "end": { - "description": "Epoch value representing the latest boundary of the returned ticks. If `latest` is specified, this will be the latest available timestamp.", - "type": "string", - "pattern": "^(latest|[0-9]{1,10})$" - }, - "granularity": { - "description": "[Optional] Only applicable for style: `candles`. Candle time-dimension width setting. (default: `60`).", - "type": "integer", - "enum": [60, 120, 180, 300, 600, 900, 1800, 3600, 7200, 14400, 28800, 86400] - }, - "start": { - "description": "[Optional] Epoch value representing the earliest boundary of the returned ticks. \n- For `\"style\": \"ticks\"`: this will default to 1 day ago.\n- For `\"style\": \"candles\"`: it will default to 1 day ago if count or granularity is undefined.", - "type": "integer", - "maximum": 9999999999, - "minimum": 0 - }, - "style": { - "description": "[Optional] The tick-output style.", - "type": "string", - "default": "ticks", - "enum": ["candles", "ticks"] - }, - "subscribe": { - "description": "[Optional] 1 - to send updates whenever a new tick is received.", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/time/example.json b/config/v3/time/example.json index fa19deda..7520cc03 100644 --- a/config/v3/time/example.json +++ b/config/v3/time/example.json @@ -1,3 +1,3 @@ { - "time": 1 + "time": 1 } diff --git a/config/v3/time/receive.json b/config/v3/time/receive.json index 1a18e119..328ab83a 100644 --- a/config/v3/time/receive.json +++ b/config/v3/time/receive.json @@ -1,27 +1,32 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Time (response)", - "description": "The result of server time request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "time": { - "title": "time", - "description": "Epoch of server time.", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["time"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server Time (response)", + "description": "The result of server time request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "time": { + "title": "time", + "description": "Epoch of server time.", + "type": "integer" + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "time" + ] + }, + "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/time/send.json b/config/v3/time/send.json index bd765d29..4a3feb63 100644 --- a/config/v3/time/send.json +++ b/config/v3/time/send.json @@ -1,24 +1,29 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Time (request)", - "description": "Request back-end server epoch time.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["time"], - "properties": { - "time": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/tnc_approval/example.json b/config/v3/tnc_approval/example.json index ab2110ee..7e660472 100644 --- a/config/v3/tnc_approval/example.json +++ b/config/v3/tnc_approval/example.json @@ -1,3 +1,3 @@ { - "tnc_approval": 1 + "tnc_approval": 1 } diff --git a/config/v3/tnc_approval/receive.json b/config/v3/tnc_approval/receive.json index 87450690..f84a3ce9 100644 --- a/config/v3/tnc_approval/receive.json +++ b/config/v3/tnc_approval/receive.json @@ -1,28 +1,35 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Terms and Conditions Approval (response)", - "description": "The result of T&C approval request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "tnc_approval": { - "title": "tnc_approval", - "description": "Set terms and conditions 1: success", - "type": "integer", - "enum": [1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["tnc_approval"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Terms and Conditions Approval (response)", + "description": "The result of T&C approval request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "tnc_approval": { + "title": "tnc_approval", + "description": "Set terms and conditions 1: success", + "type": "integer", + "enum": [ + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "tnc_approval" + ] + }, + "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/tnc_approval/send.json b/config/v3/tnc_approval/send.json index 8b29a8a7..80d90f64 100644 --- a/config/v3/tnc_approval/send.json +++ b/config/v3/tnc_approval/send.json @@ -1,35 +1,46 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/topup_virtual/example.json b/config/v3/topup_virtual/example.json index 32ba4e0f..5aac6b12 100644 --- a/config/v3/topup_virtual/example.json +++ b/config/v3/topup_virtual/example.json @@ -1,3 +1,3 @@ { - "topup_virtual": 1 + "topup_virtual": 1 } diff --git a/config/v3/topup_virtual/receive.json b/config/v3/topup_virtual/receive.json index 11d1604e..c03fd5ce 100644 --- a/config/v3/topup_virtual/receive.json +++ b/config/v3/topup_virtual/receive.json @@ -1,38 +1,43 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Top Up Virtual-Money Account (response)", - "description": "The result of virtual money top up", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "topup_virtual": { - "title": "topup_virtual", - "description": "The information regarding a successful top up for a virtual money account", - "type": "object", - "additionalProperties": false, - "properties": { - "amount": { - "description": "Top up amount", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Top Up Virtual-Money Account (response)", + "description": "The result of virtual money top up", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "topup_virtual": { + "title": "topup_virtual", + "description": "The information regarding a successful top up for a virtual money account", + "type": "object", + "additionalProperties": false, + "properties": { + "amount": { + "description": "Top up amount", + "type": "number" + }, + "currency": { + "description": "Top up currency string", + "type": "string" + } + } }, - "currency": { - "description": "Top up currency string", - "type": "string" + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "topup_virtual" + ] + }, + "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": ["topup_virtual"] - }, - "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/topup_virtual/send.json b/config/v3/topup_virtual/send.json index 8211ea36..ce3bc974 100644 --- a/config/v3/topup_virtual/send.json +++ b/config/v3/topup_virtual/send.json @@ -1,25 +1,32 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_durations/example.json b/config/v3/trading_durations/example.json index 769e3251..60e19357 100644 --- a/config/v3/trading_durations/example.json +++ b/config/v3/trading_durations/example.json @@ -1,3 +1,3 @@ { - "trading_durations": 1 + "trading_durations": 1 } diff --git a/config/v3/trading_durations/receive.json b/config/v3/trading_durations/receive.json index 4f775054..7638d4f9 100644 --- a/config/v3/trading_durations/receive.json +++ b/config/v3/trading_durations/receive.json @@ -1,173 +1,178 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Durations (response)", - "description": "A message with trading duration information for symbol and contract combinations.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "trading_durations": { - "title": "trading_durations", - "description": "List of underlyings by their display name and symbol followed by their available contract types and trading duration boundaries.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "data": { - "title": "data", - "description": "Available contract types and trading duration boundaries", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Durations (response)", + "description": "A message with trading duration information for symbol and contract combinations.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "trading_durations": { + "title": "trading_durations", + "description": "List of underlyings by their display name and symbol followed by their available contract types and trading duration boundaries.", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "market": { - "description": "The market in which the underlyings listed in `symbol` located.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Translated market name.", - "type": "string" - }, - "name": { - "description": "Market name.", - "type": "string" - } - } - }, - "submarket": { - "description": "The submarket in which the underlyings listed in `symbol` located.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Translated submarket name.", - "type": "string" - }, - "name": { - "description": "Submarket name.", - "type": "string" - } - } - }, - "symbol": { - "description": "List of underlying symbols.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Translated symbol name.", - "type": "string" - }, - "name": { - "description": "Symbol name.", - "type": "string" - } - } - } - }, - "trade_durations": { - "description": "List of trade durations available for symbols and contract combinations.", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "durations": { - "description": "List of trade durations available for the symbols.", + "type": "object", + "additionalProperties": false, + "properties": { + "data": { + "title": "data", + "description": "Available contract types and trading duration boundaries", "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { + "type": "object", + "additionalProperties": false, + "properties": { + "market": { + "description": "The market in which the underlyings listed in `symbol` located.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Translated market name.", + "type": "string" + }, + "name": { + "description": "Market name.", + "type": "string" + } + } + }, + "submarket": { + "description": "The submarket in which the underlyings listed in `symbol` located.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Translated submarket name.", + "type": "string" + }, + "name": { + "description": "Submarket name.", + "type": "string" + } + } + }, + "symbol": { + "description": "List of underlying symbols.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Translated symbol name.", + "type": "string" + }, + "name": { + "description": "Symbol name.", + "type": "string" + } + } + } + }, + "trade_durations": { + "description": "List of trade durations available for symbols and contract combinations.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "durations": { + "description": "List of trade durations available for the symbols.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Translated duration type name.", + "type": "string" + }, + "max": { + "description": "Maximum allowed duration for this type.", + "type": "integer" + }, + "min": { + "description": "Minimum allowed duration for this type.", + "type": "integer" + }, + "name": { + "description": "Duration type name.", + "type": "string" + } + } + } + }, + "trade_type": { + "description": "List of trade types available for the symbols.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Translated trade type name.", + "type": "string" + }, + "name": { + "description": "Trade type name.", + "type": "string" + } + } + } + } + } + } + } + } + }, + "market": { + "description": "The market in which the underlyings listed in `symbol` located.", + "type": "object", + "additionalProperties": false, + "properties": { "display_name": { - "description": "Translated duration type name.", - "type": "string" - }, - "max": { - "description": "Maximum allowed duration for this type.", - "type": "integer" - }, - "min": { - "description": "Minimum allowed duration for this type.", - "type": "integer" + "description": "Translated market name.", + "type": "string" }, "name": { - "description": "Duration type name.", - "type": "string" + "description": "Market name.", + "type": "string" } - } } - }, - "trade_type": { - "description": "List of trade types available for the symbols.", + }, + "submarket": { + "description": "The submarket in which the underlyings listed in `symbol` located.", "type": "object", "additionalProperties": false, "properties": { - "display_name": { - "description": "Translated trade type name.", - "type": "string" - }, - "name": { - "description": "Trade type name.", - "type": "string" - } + "display_name": { + "description": "Translated submarket name.", + "type": "string" + }, + "name": { + "description": "Submarket name.", + "type": "string" + } } - } } - } } - } - } - }, - "market": { - "description": "The market in which the underlyings listed in `symbol` located.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Translated market name.", - "type": "string" - }, - "name": { - "description": "Market name.", - "type": "string" - } - } - }, - "submarket": { - "description": "The submarket in which the underlyings listed in `symbol` located.", - "type": "object", - "additionalProperties": false, - "properties": { - "display_name": { - "description": "Translated submarket name.", - "type": "string" - }, - "name": { - "description": "Submarket name.", - "type": "string" - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_durations" + ] + }, + "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": ["trading_durations"] - }, - "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/trading_durations/send.json b/config/v3/trading_durations/send.json index efb6ff08..0a7017b1 100644 --- a/config/v3/trading_durations/send.json +++ b/config/v3/trading_durations/send.json @@ -1,38 +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": "[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" - ] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_platform_investor_password_reset/example.json b/config/v3/trading_platform_investor_password_reset/example.json index ad914c1c..18abb5b0 100644 --- a/config/v3/trading_platform_investor_password_reset/example.json +++ b/config/v3/trading_platform_investor_password_reset/example.json @@ -1,7 +1,7 @@ { - "trading_platform_investor_password_reset": 1, - "account_id": "MTR1000", - "new_password": "InvestPwd123@!", - "platform": "mt5", - "verification_code": "abCD0199" + "trading_platform_investor_password_reset": 1, + "account_id": "MTR1000", + "new_password": "InvestPwd123@!", + "platform": "mt5", + "verification_code": "abCD0199" } diff --git a/config/v3/trading_platform_investor_password_reset/receive.json b/config/v3/trading_platform_investor_password_reset/receive.json index 87518c87..e915bf56 100644 --- a/config/v3/trading_platform_investor_password_reset/receive.json +++ b/config/v3/trading_platform_investor_password_reset/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Platform: Investor Password Reset (response)", - "description": "The result of the Trading Platform investor password reset.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "trading_platform_password_reset": { - "title": "trading_platform_investor_password_reset", - "description": "If set to 1, the investor password has been reset.", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["trading_platform_investor_password_reset"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform: Investor Password Reset (response)", + "description": "The result of the Trading Platform investor password reset.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "trading_platform_password_reset": { + "title": "trading_platform_investor_password_reset", + "description": "If set to 1, the investor password has been reset.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_platform_investor_password_reset" + ] + }, + "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/trading_platform_investor_password_reset/send.json b/config/v3/trading_platform_investor_password_reset/send.json index 563029cc..bebda2af 100644 --- a/config/v3/trading_platform_investor_password_reset/send.json +++ b/config/v3/trading_platform_investor_password_reset/send.json @@ -1,51 +1,58 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_platform_password_reset/example.json b/config/v3/trading_platform_password_reset/example.json index 2ca4a5b4..8d17d89f 100644 --- a/config/v3/trading_platform_password_reset/example.json +++ b/config/v3/trading_platform_password_reset/example.json @@ -1,6 +1,6 @@ { - "trading_platform_password_reset": 1, - "new_password": "C0rrect_p4ssword", - "platform": "dxtrade", - "verification_code": "abCD0199" + "trading_platform_password_reset": 1, + "new_password": "C0rrect_p4ssword", + "platform": "dxtrade", + "verification_code": "abCD0199" } diff --git a/config/v3/trading_platform_password_reset/receive.json b/config/v3/trading_platform_password_reset/receive.json index 5e20818a..80582a2c 100644 --- a/config/v3/trading_platform_password_reset/receive.json +++ b/config/v3/trading_platform_password_reset/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Platform: Password Reset (response)", - "description": "The result of the Trading Platform password reset.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "trading_platform_password_reset": { - "title": "trading_platform_password_reset", - "description": "If set to 1, the password has been reset.", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["trading_platform_password_reset"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Platform: Password Reset (response)", + "description": "The result of the Trading Platform password reset.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "trading_platform_password_reset": { + "title": "trading_platform_password_reset", + "description": "If set to 1, the password has been reset.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_platform_password_reset" + ] + }, + "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/trading_platform_password_reset/send.json b/config/v3/trading_platform_password_reset/send.json index 853c43ed..a96b0c7a 100644 --- a/config/v3/trading_platform_password_reset/send.json +++ b/config/v3/trading_platform_password_reset/send.json @@ -1,41 +1,54 @@ { - "$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.", - "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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_servers/example.json b/config/v3/trading_servers/example.json index 9098d593..4fd3be79 100644 --- a/config/v3/trading_servers/example.json +++ b/config/v3/trading_servers/example.json @@ -1,4 +1,4 @@ { - "trading_servers": 1, - "platform": "mt5" + "trading_servers": 1, + "platform": "mt5" } diff --git a/config/v3/trading_servers/receive.json b/config/v3/trading_servers/receive.json index 9a28bef9..c7a446df 100644 --- a/config/v3/trading_servers/receive.json +++ b/config/v3/trading_servers/receive.json @@ -1,97 +1,121 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server list (response)", - "description": "Get list of servers for the platform provided.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "trading_servers": { - "title": "trading_servers", - "description": "Array containing platform server objects.", - "type": "array", - "items": { - "title": "Details of each server.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_type": { - "description": "Supported trading account type.", - "type": "string", - "enum": ["demo", "real"] - }, - "disabled": { - "description": "Flag to represent if this server is currently disabled or not", - "type": "integer", - "enum": [0, 1] - }, - "environment": { - "description": "Current environment (installation instance) where servers are deployed. Currently, there are one demo and two real environments.", - "type": "string", - "enum": ["Deriv-Demo", "Deriv-Server", "Deriv-Server-02"] - }, - "geolocation": { - "description": "Object containing geolocation information of the server.", - "type": "object", - "additionalProperties": false, - "properties": { - "group": { - "description": "Internal server grouping.", - "type": "string" - }, - "location": { - "description": "Geolocation country or place where server is located.", - "type": "string" - }, - "region": { - "description": "Geolocation region where server is located.", - "type": "string" - }, - "sequence": { - "description": "Sequence number of the server in that region.", - "type": "integer" - } - } - }, - "id": { - "description": "Server unique id.", - "type": "string", - "enum": ["p01_ts01", "p01_ts02", "p01_ts03", "p01_ts04", "p02_ts02"] - }, - "market_type": { - "description": "Market type", - "type": "string" - }, - "message_to_client": { - "description": "Error message to client when server is disabled", - "type": "string" - }, - "recommended": { - "description": "Flag to represent if this is server is recommended based on client's country of residence.", - "type": "integer", - "enum": [0, 1] - }, - "supported_accounts": { - "description": "Account type supported by the server.", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server list (response)", + "description": "Get list of servers for the platform provided.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "trading_servers": { + "title": "trading_servers", + "description": "Array containing platform server objects.", "type": "array", "items": { - "type": "string" + "title": "Details of each server.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_type": { + "description": "Supported trading account type.", + "type": "string", + "enum": [ + "demo", + "real" + ] + }, + "disabled": { + "description": "Flag to represent if this server is currently disabled or not", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "environment": { + "description": "Current environment (installation instance) where servers are deployed. Currently, there are one demo and two real environments.", + "type": "string", + "enum": [ + "Deriv-Demo", + "Deriv-Server", + "Deriv-Server-02" + ] + }, + "geolocation": { + "description": "Object containing geolocation information of the server.", + "type": "object", + "additionalProperties": false, + "properties": { + "group": { + "description": "Internal server grouping.", + "type": "string" + }, + "location": { + "description": "Geolocation country or place where server is located.", + "type": "string" + }, + "region": { + "description": "Geolocation region where server is located.", + "type": "string" + }, + "sequence": { + "description": "Sequence number of the server in that region.", + "type": "integer" + } + } + }, + "id": { + "description": "Server unique id.", + "type": "string", + "enum": [ + "p01_ts01", + "p01_ts02", + "p01_ts03", + "p01_ts04", + "p02_ts02" + ] + }, + "market_type": { + "description": "Market type", + "type": "string" + }, + "message_to_client": { + "description": "Error message to client when server is disabled", + "type": "string" + }, + "recommended": { + "description": "Flag to represent if this is server is recommended based on client's country of residence.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "supported_accounts": { + "description": "Account type supported by the server.", + "type": "array", + "items": { + "type": "string" + } + } + } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_servers" + ] + }, + "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": ["trading_servers"] - }, - "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/trading_servers/send.json b/config/v3/trading_servers/send.json index ecb873b1..a4ddfdad 100644 --- a/config/v3/trading_servers/send.json +++ b/config/v3/trading_servers/send.json @@ -1,48 +1,70 @@ { - "$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": ["financial", "synthetic"] - }, - "platform": { - "description": "[Optional] Pass the trading platform name, default to mt5", - "type": "string", - "default": "mt5", - "enum": ["mt5", "dxtrade"] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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" + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/trading_times/example.json b/config/v3/trading_times/example.json index ed519502..14d5ef67 100644 --- a/config/v3/trading_times/example.json +++ b/config/v3/trading_times/example.json @@ -1,3 +1,3 @@ { - "trading_times": "2015-09-14" + "trading_times": "2015-09-14" } diff --git a/config/v3/trading_times/receive.json b/config/v3/trading_times/receive.json index 4a18223b..d381fb02 100644 --- a/config/v3/trading_times/receive.json +++ b/config/v3/trading_times/receive.json @@ -1,96 +1,118 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Times (response)", - "description": "A message with Trading Times", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "trading_times": { - "title": "trading_times", - "description": "The trading times structure is a hierarchy as follows: Market -> SubMarket -> Underlyings", - "type": "object", - "additionalProperties": false, - "required": ["markets"], - "properties": { - "markets": { - "description": "An array of markets", - "type": "array", - "items": { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Trading Times (response)", + "description": "A message with Trading Times", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "trading_times": { + "title": "trading_times", + "description": "The trading times structure is a hierarchy as follows: Market -> SubMarket -> Underlyings", "type": "object", "additionalProperties": false, - "required": ["name"], + "required": [ + "markets" + ], "properties": { - "name": { - "description": "Market name", - "type": "string" - }, - "submarkets": { - "description": "An array of submarkets", - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "required": ["name"], - "properties": { - "name": { - "description": "Submarket name", - "type": "string" - }, - "symbols": { - "description": "Symbols array", - "type": "array", - "items": { + "markets": { + "description": "An array of markets", + "type": "array", + "items": { "type": "object", "additionalProperties": false, - "required": ["name", "symbol"], + "required": [ + "name" + ], "properties": { - "events": { - "description": "Events", - "type": "array" - }, - "name": { - "description": "Symbol name", - "type": "string" - }, - "symbol": { - "description": "Symbol shortcode", - "type": "string" - }, - "times": { - "description": "Open, close and settlement times", - "type": "object" - }, - "trading_days": { - "description": "Trading days", - "type": "array", - "items": { - "type": "string", - "enum": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] + "name": { + "description": "Market name", + "type": "string" + }, + "submarkets": { + "description": "An array of submarkets", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Submarket name", + "type": "string" + }, + "symbols": { + "description": "Symbols array", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "symbol" + ], + "properties": { + "events": { + "description": "Events", + "type": "array" + }, + "name": { + "description": "Symbol name", + "type": "string" + }, + "symbol": { + "description": "Symbol shortcode", + "type": "string" + }, + "times": { + "description": "Open, close and settlement times", + "type": "object" + }, + "trading_days": { + "description": "Trading days", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + } + } + } + } + } + } + } } - } } - } } - } } - } } - } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "trading_times" + ] + }, + "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": ["trading_times"] - }, - "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/trading_times/send.json b/config/v3/trading_times/send.json index 7df16564..af15ca7a 100644 --- a/config/v3/trading_times/send.json +++ b/config/v3/trading_times/send.json @@ -1,24 +1,27 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Trading Times (request)", - "description": "Receive a list of market opening times for a given date.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["trading_times"], - "properties": { - "trading_times": { - "description": "Date to receive market opening times for. (`yyyy-mm-dd` format. `today` can also be specified).", - "type": "string", - "pattern": "^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}|today)$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/transaction/example.json b/config/v3/transaction/example.json index 7d2ba267..5d887aa5 100644 --- a/config/v3/transaction/example.json +++ b/config/v3/transaction/example.json @@ -1,4 +1,4 @@ { - "transaction": 1, - "subscribe": 1 + "transaction": 1, + "subscribe": 1 } diff --git a/config/v3/transaction/receive.json b/config/v3/transaction/receive.json index 81d030b2..3fbfd10e 100644 --- a/config/v3/transaction/receive.json +++ b/config/v3/transaction/receive.json @@ -1,136 +1,172 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Transactions Stream (response)", - "description": "Return transaction updates", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "transaction": { - "title": "transaction", - "description": "Realtime stream of user transaction updates.", - "type": "object", - "additionalProperties": false, - "properties": { - "action": { - "description": "The transaction type.", - "type": "string", - "enum": [ - "buy", - "sell", - "deposit", - "withdrawal", - "escrow", - "adjustment", - "virtual_credit", - "transfer" - ] - }, - "amount": { - "description": "It is the amount of transaction performed.", - "type": "number", - "examples": [-83.23] - }, - "balance": { - "description": "Balance amount", - "type": "number", - "maximum": 9999999999999999999, - "minimum": 0 - }, - "barrier": { - "description": "Barrier of the contract. Only applicable to single barrier contracts. Could be undefined if a contract does not have a barrier.", - "type": ["null", "number", "string"] - }, - "contract_id": { - "description": "It is the contract ID.", - "type": ["integer", "null"], - "examples": [4867502908] - }, - "currency": { - "description": "Transaction currency", - "type": "string" - }, - "date_expiry": { - "description": "Epoch value of the expiry time of the contract. Please note that in case of buy transaction this is approximate value not exact one.", - "type": "integer" - }, - "display_name": { - "description": "Display name of symbol", - "type": "string" - }, - "high_barrier": { - "description": "The high barrier of a contract. Only applicable to double barrier contracts.", - "type": ["number", "string"] - }, - "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"] - }, - "longcode": { - "description": "Description of contract purchased", - "type": "string" - }, - "low_barrier": { - "description": "The low barrier of a contract. Only applicable to double barrier contracts.", - "type": "string" - }, - "purchase_time": { - "description": "Time at which contract was purchased, present only for sell transaction", - "type": "integer" - }, - "stop_loss": { - "description": "The pip-sized target spot price where the contract will be closed automatically at the loss specified by the user.", - "type": ["null", "string"] - }, - "stop_out": { - "description": "The pip-sized target spot price where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.", - "type": ["null", "string"] - }, - "symbol": { - "description": "Symbol code", - "type": "string" - }, - "take_profit": { - "description": "The pip-sized target spot price where the contract will be closed automatically at the profit specified by the user.", - "type": ["null", "string"] - }, - "transaction_id": { - "description": "It is the transaction ID. Every contract (buy or sell) or payment has a unique ID.", - "type": "integer", - "examples": [10867502908] - }, - "transaction_time": { - "description": "Time at which transaction was performed: for buy it is purchase time, for sell it is sell time.", - "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"] + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Transactions Stream (response)", + "description": "Return transaction updates", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "transaction": { + "title": "transaction", + "description": "Realtime stream of user transaction updates.", + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "description": "The transaction type.", + "type": "string", + "enum": [ + "buy", + "sell", + "deposit", + "withdrawal", + "escrow", + "adjustment", + "virtual_credit", + "transfer" + ] + }, + "amount": { + "description": "It is the amount of transaction performed.", + "type": "number", + "examples": [ + -83.23 + ] + }, + "balance": { + "description": "Balance amount", + "type": "number", + "maximum": 9999999999999999999, + "minimum": 0 + }, + "barrier": { + "description": "Barrier of the contract. Only applicable to single barrier contracts. Could be undefined if a contract does not have a barrier.", + "type": [ + "null", + "number", + "string" + ] + }, + "contract_id": { + "description": "It is the contract ID.", + "type": [ + "integer", + "null" + ], + "examples": [ + 4867502908 + ] + }, + "currency": { + "description": "Transaction currency", + "type": "string" + }, + "date_expiry": { + "description": "Epoch value of the expiry time of the contract. Please note that in case of buy transaction this is approximate value not exact one.", + "type": "integer" + }, + "display_name": { + "description": "Display name of symbol", + "type": "string" + }, + "high_barrier": { + "description": "The high barrier of a contract. Only applicable to double barrier contracts.", + "type": [ + "number", + "string" + ] + }, + "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" + ] + }, + "longcode": { + "description": "Description of contract purchased", + "type": "string" + }, + "low_barrier": { + "description": "The low barrier of a contract. Only applicable to double barrier contracts.", + "type": "string" + }, + "purchase_time": { + "description": "Time at which contract was purchased, present only for sell transaction", + "type": "integer" + }, + "stop_loss": { + "description": "The pip-sized target spot price where the contract will be closed automatically at the loss specified by the user.", + "type": [ + "null", + "string" + ] + }, + "stop_out": { + "description": "The pip-sized target spot price where the contract will be closed automatically when the value of the contract is close to zero. This is set by the us.", + "type": [ + "null", + "string" + ] + }, + "symbol": { + "description": "Symbol code", + "type": "string" + }, + "take_profit": { + "description": "The pip-sized target spot price where the contract will be closed automatically at the profit specified by the user.", + "type": [ + "null", + "string" + ] + }, + "transaction_id": { + "description": "It is the transaction ID. Every contract (buy or sell) or payment has a unique ID.", + "type": "integer", + "examples": [ + 10867502908 + ] + }, + "transaction_time": { + "description": "Time at which transaction was performed: for buy it is purchase time, for sell it is sell time.", + "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": [ + "transaction" + ] + }, + "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": ["transaction"] - }, - "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/transaction/send.json b/config/v3/transaction/send.json index 270f1063..432b8836 100644 --- a/config/v3/transaction/send.json +++ b/config/v3/transaction/send.json @@ -1,30 +1,41 @@ { - "$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] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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 + ] + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/transfer_between_accounts/example.json b/config/v3/transfer_between_accounts/example.json index 33dd71fe..5f49d863 100644 --- a/config/v3/transfer_between_accounts/example.json +++ b/config/v3/transfer_between_accounts/example.json @@ -1,7 +1,7 @@ { - "transfer_between_accounts": 1, - "account_from": "MLT100", - "account_to": "MF100", - "amount": 1000, - "currency": "EUR" + "transfer_between_accounts": 1, + "account_from": "MLT100", + "account_to": "MF100", + "amount": 1000, + "currency": "EUR" } diff --git a/config/v3/transfer_between_accounts/receive.json b/config/v3/transfer_between_accounts/receive.json index 1b7bd01f..e55dba97 100644 --- a/config/v3/transfer_between_accounts/receive.json +++ b/config/v3/transfer_between_accounts/receive.json @@ -1,94 +1,130 @@ { - "$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_type": { - "description": "Type of the account. Please note that `binary` is deprecated and replaced by `trading`", - "type": "string", - "enum": ["trading", "mt5", "wallet", "dxtrade", "derivez", "binary"] - }, - "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.", + "$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] - }, - "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": ["financial", "synthetic", "all"] - }, - "mt5_group": { - "description": "The group of mt5 account.", + "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_type": { + "description": "Type of the account. Please note that `binary` is deprecated and replaced by `trading`", + "type": "string", + "enum": [ + "trading", + "mt5", + "wallet", + "dxtrade", + "derivez", + "binary", + "ctrader" + ] + }, + "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": [ + "financial", + "synthetic", + "all" + ] + }, + "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" + ] + } + } + } + }, + "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", - "examples": ["real\\vanuatu_financial"] - }, - "status": { - "description": "The status of account.", - "type": ["null", "string"], - "examples": ["poa_failed"] - } + "enum": [ + "transfer_between_accounts" + ] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "client_to_full_name": { - "description": "The account to client full name", - "type": "string" - }, - "client_to_loginid": { - "description": "The account to client loginid", - "type": "string" - }, - "transaction_id": { - "description": "Reference ID of transfer performed", - "type": "integer" - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["transfer_between_accounts"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" } - } } diff --git a/config/v3/transfer_between_accounts/send.json b/config/v3/transfer_between_accounts/send.json index d56e0bb6..6dac20ab 100644 --- a/config/v3/transfer_between_accounts/send.json +++ b/config/v3/transfer_between_accounts/send.json @@ -1,51 +1,61 @@ { - "$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}$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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}$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/unsubscribe_email/example.json b/config/v3/unsubscribe_email/example.json index f22e7313..3e3af6dc 100644 --- a/config/v3/unsubscribe_email/example.json +++ b/config/v3/unsubscribe_email/example.json @@ -1,5 +1,5 @@ { - "unsubscribe_email": 1, - "binary_user_id": "90000216", - "checksum": "93917bec9d69a81e47987d6c4c0c7168456e86a12e1d66e2cd75e477258b86e4" + "unsubscribe_email": 1, + "binary_user_id": "90000216", + "checksum": "93917bec9d69a81e47987d6c4c0c7168456e86a12e1d66e2cd75e477258b86e4" } diff --git a/config/v3/unsubscribe_email/receive.json b/config/v3/unsubscribe_email/receive.json index bedd2680..f844bc38 100644 --- a/config/v3/unsubscribe_email/receive.json +++ b/config/v3/unsubscribe_email/receive.json @@ -1,32 +1,40 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Unsubscribe Email (response)", - "description": "The result of the unsubscribe email request.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "binary_user_id": { - "description": "Customer User ID.", - "type": "number" - }, - "email_unsubscribe_status": { - "title": "Email Unsubscription Status", - "description": "`1`: email notification unsubscribed sucssesfully, `0`: failed to unsubscribed email notification", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["unsubscribe_email"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Unsubscribe Email (response)", + "description": "The result of the unsubscribe email request.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "binary_user_id": { + "description": "Customer User ID.", + "type": "number" + }, + "email_unsubscribe_status": { + "title": "Email Unsubscription Status", + "description": "`1`: email notification unsubscribed sucssesfully, `0`: failed to unsubscribed email notification", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "unsubscribe_email" + ] + }, + "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/unsubscribe_email/send.json b/config/v3/unsubscribe_email/send.json index c9226132..baabdf9e 100644 --- a/config/v3/unsubscribe_email/send.json +++ b/config/v3/unsubscribe_email/send.json @@ -1,32 +1,39 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Unsubscribe Email (request)", - "description": "It unsubscribe user from the email subscription.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["unsubscribe_email", "binary_user_id", "checksum"], - "properties": { - "unsubscribe_email": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "binary_user_id": { - "description": "Customer User ID.", - "type": "number" - }, - "checksum": { - "description": "The generated checksum for the customer.", - "type": "string" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } } diff --git a/config/v3/verify_email/example.json b/config/v3/verify_email/example.json index 58283506..ff01fb42 100644 --- a/config/v3/verify_email/example.json +++ b/config/v3/verify_email/example.json @@ -1,4 +1,4 @@ { - "verify_email": "test@mailinator.com", - "type": "account_opening" + "verify_email": "test@mailinator.com", + "type": "account_opening" } diff --git a/config/v3/verify_email/receive.json b/config/v3/verify_email/receive.json index d5eb8d67..27e4bbe3 100644 --- a/config/v3/verify_email/receive.json +++ b/config/v3/verify_email/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Verify Email (response)", - "description": "Verify Email Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "verify_email": { - "title": "verify_email", - "description": "1 for success (secure code has been sent to the email address)", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["verify_email"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email (response)", + "description": "Verify Email Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "verify_email": { + "title": "verify_email", + "description": "1 for success (secure code has been sent to the email address)", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "verify_email" + ] + }, + "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/verify_email/send.json b/config/v3/verify_email/send.json index 4ac5fb3b..cf57c3e0 100644 --- a/config/v3/verify_email/send.json +++ b/config/v3/verify_email/send.json @@ -1,233 +1,240 @@ { - "$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 the email verification call.", - "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" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email (request)", + "description": "Verify an email address for various purposes. The system will send an email to the address containing a security code for verification.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "verify_email", + "type" + ], + "properties": { + "verify_email": { + "description": "Email address to be verified.", + "type": "string", + "pattern": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" + }, + "type": { + "description": "Purpose of email verification, request_email and reset_password are the only two types restricted from all unoffical apps", + "type": "string", + "enum": [ + "partner_account_opening", + "account_opening", + "reset_password", + "paymentagent_withdraw", + "payment_withdraw", + "trading_platform_dxtrade_password_reset", + "trading_platform_mt5_password_reset", + "trading_platform_investor_password_reset", + "request_email" + ] + }, + "url_parameters": { + "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", + "type": "object", + "additionalProperties": false, + "properties": { + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "pa_amount": { + "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", + "type": "number" + }, + "pa_currency": { + "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "pa_loginid": { + "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "pa_remarks": { + "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,100}$" + }, + "redirect_to": { + "description": "[Optional] The page ID to redirect to", + "type": "integer" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + } } - ] }, - "utm_adrollclk_id": { - "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 }, - "utm_campaign": { - "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_campaign_id": { - "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_content": { - "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_fbcl_id": { - "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_gl_client_id": { - "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/verify_email_cellxpert/example.json b/config/v3/verify_email_cellxpert/example.json index 60efd2d4..8e7a934c 100644 --- a/config/v3/verify_email_cellxpert/example.json +++ b/config/v3/verify_email_cellxpert/example.json @@ -1,4 +1,4 @@ { - "verify_email_cellxpert": "test@mailinator.com", - "type": "partner_account_opening" + "verify_email_cellxpert": "test@mailinator.com", + "type": "partner_account_opening" } diff --git a/config/v3/verify_email_cellxpert/receive.json b/config/v3/verify_email_cellxpert/receive.json index 3000a715..5a42a891 100644 --- a/config/v3/verify_email_cellxpert/receive.json +++ b/config/v3/verify_email_cellxpert/receive.json @@ -1,28 +1,36 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Verify Email Cellxpert (response)", - "description": "Verify Email Cellxpert Receive", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "verify_email_cellxpert": { - "title": "verify_email_cellxpert", - "description": "1 for success (secure code has been sent to the email address)", - "type": "integer", - "enum": [0, 1] - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["verify_email_cellxpert"] - }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email Cellxpert (response)", + "description": "Verify Email Cellxpert Receive", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "verify_email_cellxpert": { + "title": "verify_email_cellxpert", + "description": "1 for success (secure code has been sent to the email address)", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "verify_email_cellxpert" + ] + }, + "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/verify_email_cellxpert/send.json b/config/v3/verify_email_cellxpert/send.json index f380f544..c6667a2f 100644 --- a/config/v3/verify_email_cellxpert/send.json +++ b/config/v3/verify_email_cellxpert/send.json @@ -1,227 +1,236 @@ { - "$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" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Verify Email Cellxpert (request)", + "description": "Verify an email address for Cellxpert. The system will send an email to the address containing a security code for verification.", + "type": "object", + "auth_required": 0, + "additionalProperties": false, + "required": [ + "verify_email_cellxpert", + "type" + ], + "properties": { + "verify_email_cellxpert": { + "description": "Email address to be verified.", + "type": "string", + "pattern": "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,63}$" + }, + "type": { + "description": "Purpose of the email verification call.", + "type": "string", + "enum": [ + "partner_account_opening" + ] + }, + "url_parameters": { + "description": "[Optional] Extra parameters that can be attached to the verify email link URL.", + "type": "object", + "additionalProperties": false, + "properties": { + "affiliate_token": { + "description": "[Optional] Affiliate token, within 32 characters.", + "type": "string", + "pattern": "^[\\w-]{0,32}$" + }, + "bta": { + "description": "[Optional] Master affiliate Id.", + "type": "integer" + }, + "date_first_contact": { + "description": "[Optional] Date of first contact, format: yyyy-mm-dd in GMT timezone.", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" + }, + "gclid_url": { + "description": "[Optional] Google Click Identifier to track source.", + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + "pa_amount": { + "description": "[Optional] The amount to withdraw to the payment agent. Only allowed for payment agent withdraw.", + "type": "number" + }, + "pa_currency": { + "description": "[Optional] The currency code. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[a-zA-Z0-9]{2,20}$" + }, + "pa_loginid": { + "description": "[Optional] The payment agent loginid received from the `paymentagent_list` call. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "pa_remarks": { + "description": "[Optional] Remarks about the withdraw. Only letters, numbers, space, period, comma, - ' are allowed. Only allowed for payment agent withdraw.", + "type": "string", + "pattern": "^[0-9A-Za-z .,'-]{0,100}$" + }, + "redirect_to": { + "description": "[Optional] The page ID to redirect to", + "type": "integer" + }, + "signup_device": { + "description": "[Optional] Show whether user has used mobile or desktop.", + "type": "string", + "enum": [ + "desktop", + "mobile" + ] + }, + "utm_ad_id": { + "description": "[Optional] Identifier of particular ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adgroup_id": { + "description": "[Optional] Identifier of ad group in the campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_adrollclk_id": { + "description": "[Optional] Unique identifier of click on AdRoll ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign": { + "description": "[Optional] Identifies a specific product promotion or strategic campaign such as a spring sale or other promotions. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_campaign_id": { + "description": "[Optional] Identifier of paid ad campaign. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_content": { + "description": "[Optional] Used to differentiate similar content, or links within the same ad. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_fbcl_id": { + "description": "[Optional] Unique identifier of click on Facebook ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_gl_client_id": { + "description": "[Optional] Unique visitor identifier on Google Ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_medium": { + "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_msclk_id": { + "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_source": { + "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + }, + "utm_term": { + "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", + "anyOf": [ + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" + }, + { + "type": "string" + } + ] + } } - ] }, - "utm_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" - } - ] + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field. Maximum size is 3500 bytes.", + "type": "object", + "maxSize": 3500 }, - "utm_medium": { - "description": "[Optional] Identifies the medium the link was used upon such as: email, CPC, or other methods of sharing. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_msclk_id": { - "description": "[Optional] Unique click identifier on Microsoft Bing ads platform. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_source": { - "description": "[Optional] Identifies the source of traffic such as: search engine, newsletter, or other referral. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] - }, - "utm_term": { - "description": "[Optional] Used to send information related to the campaign term like paid search keywords. Value must match Regex pattern to be recorded", - "anyOf": [ - { - "type": "string", - "pattern": "^[a-zA-Z0-9\\s\\-\\.\\_]{0,100}$" - }, - { - "type": "string" - } - ] + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } - } - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" } - } } diff --git a/config/v3/website_status/example.json b/config/v3/website_status/example.json index 3a7f8dff..3bf38232 100644 --- a/config/v3/website_status/example.json +++ b/config/v3/website_status/example.json @@ -1,3 +1,3 @@ { - "website_status": 1 + "website_status": 1 } diff --git a/config/v3/website_status/receive.json b/config/v3/website_status/receive.json index 0c5c7178..f74d4523 100644 --- a/config/v3/website_status/receive.json +++ b/config/v3/website_status/receive.json @@ -1,483 +1,583 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Status (response)", - "description": "Server status alongside general settings like call limits, currencies information, supported languages, etc.", - "type": "object", - "required": ["echo_req", "msg_type"], - "properties": { - "website_status": { - "title": "website_status", - "description": "Server status and other information regarding general settings", - "type": "object", - "additionalProperties": false, - "required": ["api_call_limits", "currencies_config"], - "properties": { - "api_call_limits": { - "description": "Maximum number of API calls during specified period of time.", - "type": "object", - "additionalProperties": false, - "required": [ - "max_proposal_subscription", - "max_requestes_general", - "max_requests_outcome", - "max_requests_pricing" - ], - "properties": { - "max_proposal_subscription": { - "description": "Maximum subscription to proposal calls.", - "type": "object", - "additionalProperties": false, - "required": ["applies_to", "max"], - "properties": { - "applies_to": { - "description": "Describes which calls this limit applies to.", - "type": "string" - }, - "max": { - "description": "Maximum number of allowed calls.", - "type": "number" - } - } - }, - "max_requestes_general": { - "description": "Maximum number of general requests allowed during specified period of time.", - "type": "object", - "additionalProperties": false, - "required": ["applies_to", "hourly", "minutely"], - "properties": { - "applies_to": { - "description": "Describes which calls this limit applies to.", - "type": "string" - }, - "hourly": { - "description": "The maximum of allowed calls per hour.", - "type": "number" - }, - "minutely": { - "description": "The maximum of allowed calls per minute.", - "type": "number" - } - } - }, - "max_requests_outcome": { - "description": "Maximum number of outcome requests allowed during specified period of time.", - "type": "object", - "additionalProperties": false, - "required": ["applies_to", "hourly", "minutely"], - "properties": { - "applies_to": { - "description": "Describes which calls this limit applies to.", - "type": "string" - }, - "hourly": { - "description": "The maximum of allowed calls per hour.", - "type": "number" - }, - "minutely": { - "description": "The maximum of allowed calls per minute.", - "type": "number" - } - } - }, - "max_requests_pricing": { - "description": "Maximum number of pricing requests allowed during specified period of time.", - "type": "object", - "additionalProperties": false, - "required": ["applies_to", "hourly", "minutely"], - "properties": { - "applies_to": { - "description": "Describes which calls this limit applies to.", - "type": "string" - }, - "hourly": { - "description": "The maximum of allowed calls per hour.", - "type": "number" - }, - "minutely": { - "description": "The maximum of allowed calls per minute.", - "type": "number" - } - } - } - } - }, - "broker_codes": { - "description": "List of all available broker codes.", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "clients_country": { - "description": "Country code of connected IP", - "type": "string" - }, - "currencies_config": { - "description": "Available currencies and their information", - "type": "object", - "minProperties": 1, - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Currency code", - "type": "object", - "additionalProperties": false, - "required": [ - "fractional_digits", - "is_deposit_suspended", - "is_suspended", - "is_withdrawal_suspended", - "stake_default", - "transfer_between_accounts", - "type" - ], - "properties": { - "fractional_digits": { - "description": "Number of fractional digits.", - "type": "number" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Server Status (response)", + "description": "Server status alongside general settings like call limits, currencies information, supported languages, etc.", + "type": "object", + "required": [ + "echo_req", + "msg_type" + ], + "properties": { + "website_status": { + "title": "website_status", + "description": "Server status and other information regarding general settings", + "type": "object", + "additionalProperties": false, + "required": [ + "api_call_limits", + "currencies_config" + ], + "properties": { + "api_call_limits": { + "description": "Maximum number of API calls during specified period of time.", + "type": "object", + "additionalProperties": false, + "required": [ + "max_proposal_subscription", + "max_requestes_general", + "max_requests_outcome", + "max_requests_pricing" + ], + "properties": { + "max_proposal_subscription": { + "description": "Maximum subscription to proposal calls.", + "type": "object", + "additionalProperties": false, + "required": [ + "applies_to", + "max" + ], + "properties": { + "applies_to": { + "description": "Describes which calls this limit applies to.", + "type": "string" + }, + "max": { + "description": "Maximum number of allowed calls.", + "type": "number" + } + } + }, + "max_requestes_general": { + "description": "Maximum number of general requests allowed during specified period of time.", + "type": "object", + "additionalProperties": false, + "required": [ + "applies_to", + "hourly", + "minutely" + ], + "properties": { + "applies_to": { + "description": "Describes which calls this limit applies to.", + "type": "string" + }, + "hourly": { + "description": "The maximum of allowed calls per hour.", + "type": "number" + }, + "minutely": { + "description": "The maximum of allowed calls per minute.", + "type": "number" + } + } + }, + "max_requests_outcome": { + "description": "Maximum number of outcome requests allowed during specified period of time.", + "type": "object", + "additionalProperties": false, + "required": [ + "applies_to", + "hourly", + "minutely" + ], + "properties": { + "applies_to": { + "description": "Describes which calls this limit applies to.", + "type": "string" + }, + "hourly": { + "description": "The maximum of allowed calls per hour.", + "type": "number" + }, + "minutely": { + "description": "The maximum of allowed calls per minute.", + "type": "number" + } + } + }, + "max_requests_pricing": { + "description": "Maximum number of pricing requests allowed during specified period of time.", + "type": "object", + "additionalProperties": false, + "required": [ + "applies_to", + "hourly", + "minutely" + ], + "properties": { + "applies_to": { + "description": "Describes which calls this limit applies to.", + "type": "string" + }, + "hourly": { + "description": "The maximum of allowed calls per hour.", + "type": "number" + }, + "minutely": { + "description": "The maximum of allowed calls per minute.", + "type": "number" + } + } + } + } }, - "is_deposit_suspended": { - "description": "Current status for payment deposit for the currency", - "type": "number", - "enum": [0, 1] + "broker_codes": { + "description": "List of all available broker codes.", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true }, - "is_suspended": { - "description": "Current status for the currency", - "type": "number", - "enum": [0, 1] + "clients_country": { + "description": "Country code of connected IP", + "type": "string" }, - "is_withdrawal_suspended": { - "description": "Current status for payment withdrawal for the currency", - "type": "number", - "enum": [0, 1] + "currencies_config": { + "description": "Available currencies and their information", + "type": "object", + "minProperties": 1, + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Currency code", + "type": "object", + "additionalProperties": false, + "required": [ + "fractional_digits", + "is_deposit_suspended", + "is_suspended", + "is_withdrawal_suspended", + "stake_default", + "transfer_between_accounts", + "type" + ], + "properties": { + "fractional_digits": { + "description": "Number of fractional digits.", + "type": "number" + }, + "is_deposit_suspended": { + "description": "Current status for payment deposit for the currency", + "type": "number", + "enum": [ + 0, + 1 + ] + }, + "is_suspended": { + "description": "Current status for the currency", + "type": "number", + "enum": [ + 0, + 1 + ] + }, + "is_withdrawal_suspended": { + "description": "Current status for payment withdrawal for the currency", + "type": "number", + "enum": [ + 0, + 1 + ] + }, + "name": { + "description": "Name of the currency.", + "type": "string" + }, + "stake_default": { + "description": "Default stake value for the currency.", + "type": "number", + "minimum": 0 + }, + "transfer_between_accounts": { + "description": "Fees and range of allowed amount for transfer between accounts with different types of currencies.", + "type": "object", + "additionalProperties": false, + "required": [ + "fees", + "limits" + ], + "properties": { + "fees": { + "description": "The fee that applies for transfer between accounts with different types of currencies.", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9]{2,20}$": { + "description": "Currency code.", + "type": "number", + "maximum": 7, + "minimum": 0 + } + } + }, + "limits": { + "description": "Range of allowed amount for transfer between accounts.", + "oneOf": [ + { + "type": "object", + "required": [ + "min" + ], + "properties": { + "max": { + "description": "Maximum allowed amount for transfer between accounts with different types of currencies.", + "type": "number", + "minimum": 0 + }, + "min": { + "description": "Minimum allowed amount for transfer between accounts with different types of currencies.", + "type": "number", + "minimum": 0 + } + } + }, + { + "type": "null" + } + ] + }, + "limits_ctrader": { + "description": "Range of allowed amount for transfer between ctrader accounts.", + "type": "object" + }, + "limits_derivez": { + "description": "Range of allowed amount for transfer between derivez accounts.", + "type": "object" + }, + "limits_dxtrade": { + "description": "Range of allowed amount for transfer between dxtrade accounts.", + "type": "object" + }, + "limits_mt5": { + "description": "Range of allowed amount for transfer between mt5 accounts.", + "type": "object" + } + } + }, + "type": { + "description": "Type of the currency.", + "type": "string", + "enum": [ + "fiat", + "crypto" + ] + } + } + } + } }, - "name": { - "description": "Name of the currency.", - "type": "string" + "dxtrade_status": { + "description": "Suspension status of Dxtrade/DerivX API calls", + "type": "object", + "additionalProperties": false, + "minProperties": 3, + "properties": { + "all": { + "description": "Suspension of Dxtrade/DerivX API calls on all servers.", + "type": "integer" + }, + "demo": { + "description": "Suspension of Dxtrade/DerivX API calls on demo servers.", + "type": "integer" + }, + "real": { + "description": "Suspension of Dxtrade/DerivX API calls on real trading servers.", + "type": "integer" + } + } }, - "stake_default": { - "description": "Default stake value for the currency.", - "type": "number", - "minimum": 0 + "message": { + "description": "Text for site status banner, contains problem description. shown only if set by the system.", + "type": "string" }, - "transfer_between_accounts": { - "description": "Fees and range of allowed amount for transfer between accounts with different types of currencies.", - "type": "object", - "additionalProperties": false, - "required": ["fees", "limits"], - "properties": { - "fees": { - "description": "The fee that applies for transfer between accounts with different types of currencies.", - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9]{2,20}$": { - "description": "Currency code.", - "type": "number", - "maximum": 7, - "minimum": 0 + "mt5_status": { + "description": "Suspension status of MT5 API calls", + "type": "object", + "additionalProperties": false, + "minProperties": 2, + "properties": { + "demo": { + "description": "Suspension of MT5 API calls on demo servers.", + "type": "array" + }, + "real": { + "description": "Suspension of MT5 API calls on real trading servers.", + "type": "array" } - } - }, - "limits": { - "description": "Range of allowed amount for transfer between accounts.", - "oneOf": [ - { - "type": "object", - "required": ["min"], - "properties": { - "max": { - "description": "Maximum allowed amount for transfer between accounts with different types of currencies.", - "type": "number", - "minimum": 0 - }, - "min": { - "description": "Minimum allowed amount for transfer between accounts with different types of currencies.", - "type": "number", - "minimum": 0 + } + }, + "p2p_config": { + "description": "Peer-to-peer payment system settings.", + "type": "object", + "additionalProperties": false, + "required": [ + "adverts_active_limit", + "block_trade", + "cancellation_block_duration", + "cancellation_count_period", + "cancellation_grace_period", + "cancellation_limit", + "cross_border_ads_enabled", + "disabled", + "feature_level", + "fixed_rate_adverts", + "float_rate_adverts", + "float_rate_offset_limit", + "local_currencies", + "maximum_advert_amount", + "maximum_order_amount", + "order_daily_limit", + "order_payment_period", + "payment_methods_enabled", + "review_period", + "supported_currencies" + ], + "properties": { + "adverts_active_limit": { + "description": "Maximum number of active ads allowed by an advertiser per currency pair and advert type (buy or sell).", + "type": "integer" + }, + "adverts_archive_period": { + "description": "Adverts will be deactivated if no activity occurs within this period, in days.", + "type": "integer" + }, + "block_trade": { + "description": "Block trading settings", + "type": "object", + "additionalProperties": false, + "properties": { + "disabled": { + "description": "When 1, Block trading is unavailable.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "maximum_advert_amount": { + "description": "Maximum amount of a block trade advert, in USD.", + "type": "number" + } } - } }, - { - "type": "null" + "cancellation_block_duration": { + "description": "A buyer will be blocked for this duration after exceeding the cancellation limit, in hours.", + "type": "integer" + }, + "cancellation_count_period": { + "description": "The period within which to count buyer cancellations, in hours.", + "type": "integer" + }, + "cancellation_grace_period": { + "description": "A buyer may cancel an order within this period without negative consequences, in minutes after order creation.", + "type": "integer" + }, + "cancellation_limit": { + "description": "A buyer will be temporarily barred after marking this number of cancellations within cancellation_period.", + "type": "integer" + }, + "cross_border_ads_enabled": { + "description": "When 0, only exchanges in local currency are allowed for P2P advertiser.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "disabled": { + "description": "When 1, the P2P service is unavailable.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "feature_level": { + "description": "Indicates the availbility of certain backend features.", + "type": "integer" + }, + "fixed_rate_adverts": { + "description": "Availability of fixed rate adverts.", + "type": "string", + "enum": [ + "disabled", + "enabled", + "list_only" + ] + }, + "fixed_rate_adverts_end_date": { + "description": "Date on which fixed rate adverts will be deactivated.", + "type": "string" + }, + "float_rate_adverts": { + "description": "Availability of floating rate adverts.", + "type": "string", + "enum": [ + "disabled", + "enabled", + "list_only" + ] + }, + "float_rate_offset_limit": { + "description": "Maximum rate offset for floating rate adverts.", + "type": "number" + }, + "local_currencies": { + "description": "Available local currencies for p2p_advert_list request.", + "type": "array", + "items": { + "description": "Local currency details.", + "type": "object", + "additionalProperties": false, + "required": [ + "display_name", + "has_adverts", + "symbol" + ], + "properties": { + "display_name": { + "description": "Local currency name", + "type": "string" + }, + "has_adverts": { + "description": "Indicates that there are adverts available for this currency.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "is_default": { + "description": "Indicates that this is local currency for the current country.", + "type": "integer", + "enum": [ + 1 + ] + }, + "symbol": { + "description": "Local currency symbol", + "type": "string" + } + } + } + }, + "maximum_advert_amount": { + "description": "Maximum amount of an advert, in USD.", + "type": "number" + }, + "maximum_order_amount": { + "description": "Maximum amount of an order, in USD.", + "type": "number" + }, + "order_daily_limit": { + "description": "Maximum number of orders a user may create per day.", + "type": "integer" + }, + "order_payment_period": { + "description": "Time allowed for order payment, in minutes after order creation.", + "type": "integer" + }, + "override_exchange_rate": { + "description": "Local P2P exchange rate which should be used instead of those obtained from the `exchange_rates` call.", + "type": "string" + }, + "payment_methods_enabled": { + "description": "Indicates if the payment methods feature is enabled.", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "review_period": { + "description": "Time after successful order completion during which reviews can be created, in hours.", + "type": "number" + }, + "supported_currencies": { + "description": "List of currencies for which P2P is available", + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true } - ] - }, - "limits_derivez": { - "description": "Range of allowed amount for transfer between derivez accounts.", - "type": "object" - }, - "limits_dxtrade": { - "description": "Range of allowed amount for transfer between dxtrade accounts.", - "type": "object" - }, - "limits_mt5": { - "description": "Range of allowed amount for transfer between mt5 accounts.", - "type": "object" } - } }, - "type": { - "description": "Type of the currency.", - "type": "string", - "enum": ["fiat", "crypto"] - } - } - } - } - }, - "dxtrade_status": { - "description": "Suspension status of Dxtrade/DerivX API calls", - "type": "object", - "additionalProperties": false, - "minProperties": 3, - "properties": { - "all": { - "description": "Suspension of Dxtrade/DerivX API calls on all servers.", - "type": "integer" - }, - "demo": { - "description": "Suspension of Dxtrade/DerivX API calls on demo servers.", - "type": "integer" - }, - "real": { - "description": "Suspension of Dxtrade/DerivX API calls on real trading servers.", - "type": "integer" - } - } - }, - "message": { - "description": "Text for site status banner, contains problem description. shown only if set by the system.", - "type": "string" - }, - "mt5_status": { - "description": "Suspension status of MT5 API calls", - "type": "object", - "additionalProperties": false, - "minProperties": 2, - "properties": { - "demo": { - "description": "Suspension of MT5 API calls on demo servers.", - "type": "array" - }, - "real": { - "description": "Suspension of MT5 API calls on real trading servers.", - "type": "array" - } - } - }, - "p2p_config": { - "description": "Peer-to-peer payment system settings.", - "type": "object", - "additionalProperties": false, - "required": [ - "adverts_active_limit", - "cancellation_block_duration", - "cancellation_count_period", - "cancellation_grace_period", - "cancellation_limit", - "cross_border_ads_enabled", - "disabled", - "feature_level", - "fixed_rate_adverts", - "float_rate_adverts", - "float_rate_offset_limit", - "local_currencies", - "maximum_advert_amount", - "maximum_order_amount", - "order_daily_limit", - "order_payment_period", - "payment_methods_enabled", - "review_period", - "supported_currencies" - ], - "properties": { - "adverts_active_limit": { - "description": "Maximum number of active ads allowed by an advertiser per currency pair and advert type (buy or sell).", - "type": "integer" - }, - "adverts_archive_period": { - "description": "Adverts will be deactivated if no activity occurs within this period, in days.", - "type": "integer" - }, - "cancellation_block_duration": { - "description": "A buyer will be blocked for this duration after exceeding the cancellation limit, in hours.", - "type": "integer" - }, - "cancellation_count_period": { - "description": "The period within which to count buyer cancellations, in hours.", - "type": "integer" - }, - "cancellation_grace_period": { - "description": "A buyer may cancel an order within this period without negative consequences, in minutes after order creation.", - "type": "integer" - }, - "cancellation_limit": { - "description": "A buyer will be temporarily barred after marking this number of cancellations within cancellation_period.", - "type": "integer" - }, - "cross_border_ads_enabled": { - "description": "When 0, only exchanges in local currency are allowed for P2P advertiser.", - "type": "integer", - "enum": [0, 1] - }, - "disabled": { - "description": "When 1, the P2P service is unavailable.", - "type": "integer", - "enum": [0, 1] - }, - "feature_level": { - "description": "Indicates the availbility of certain backend features.", - "type": "integer" - }, - "fixed_rate_adverts": { - "description": "Availability of fixed rate adverts.", - "type": "string", - "enum": ["disabled", "enabled", "list_only"] - }, - "fixed_rate_adverts_end_date": { - "description": "Date on which fixed rate adverts will be deactivated.", - "type": "string" - }, - "float_rate_adverts": { - "description": "Availability of floating rate adverts.", - "type": "string", - "enum": ["disabled", "enabled", "list_only"] - }, - "float_rate_offset_limit": { - "description": "Maximum rate offset for floating rate adverts.", - "type": "number" - }, - "local_currencies": { - "description": "Available local currencies for p2p_advert_list request.", - "type": "array", - "items": { - "description": "Local currency details.", - "type": "object", - "additionalProperties": false, - "required": ["display_name", "has_adverts", "symbol"], - "properties": { - "display_name": { - "description": "Local currency name", - "type": "string" - }, - "has_adverts": { - "description": "Indicates that there are adverts available for this currency.", - "type": "integer", - "enum": [0, 1] - }, - "is_default": { - "description": "Indicates that this is local currency for the current country.", - "type": "integer", - "enum": [1] - }, - "symbol": { - "description": "Local currency symbol", + "payment_agents": { + "description": "Payments Agents system settings.", + "type": "object", + "additionalProperties": false, + "required": [ + "initial_deposit_per_country" + ], + "properties": { + "initial_deposit_per_country": { + "description": "Initial deposit requirement per country.", + "type": "object", + "patternProperties": { + "^([a-z]{2}|default)$": { + "description": "Country code or default setting", + "type": "number" + } + } + } + } + }, + "site_status": { + "description": "The current status of the website.", + "type": "string", + "enum": [ + "up", + "down", + "updating" + ] + }, + "supported_languages": { + "description": "Provides codes for languages supported.", + "type": "array", + "items": { + "type": "string" + } + }, + "terms_conditions_version": { + "description": "Latest terms and conditions version.", "type": "string" - } } - } - }, - "maximum_advert_amount": { - "description": "Maximum amount of an advert, in USD.", - "type": "number" - }, - "maximum_order_amount": { - "description": "Maximum amount of an order, in USD.", - "type": "number" - }, - "order_daily_limit": { - "description": "Maximum number of orders a user may create per day.", - "type": "integer" - }, - "order_payment_period": { - "description": "Time allowed for order payment, in minutes after order creation.", - "type": "integer" - }, - "override_exchange_rate": { - "description": "Local P2P exchange rate which should be used instead of those obtained from the `exchange_rates` call.", - "type": "string" - }, - "payment_methods_enabled": { - "description": "Indicates if the payment methods feature is enabled.", - "type": "integer", - "enum": [0, 1] - }, - "review_period": { - "description": "Time after successful order completion during which reviews can be created, in hours.", - "type": "number" - }, - "supported_currencies": { - "description": "List of currencies for which P2P is available", - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true } - } }, - "payment_agents": { - "description": "Payments Agents system settings.", - "type": "object", - "additionalProperties": false, - "required": ["initial_deposit_per_country"], - "properties": { - "initial_deposit_per_country": { - "description": "Initial deposit requirement per country.", - "type": "object", - "patternProperties": { - "^([a-z]{2}|default)$": { - "description": "Country code or default setting", - "type": "number" + "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" + ] } - } } - } }, - "site_status": { - "description": "The current status of the website.", - "type": "string", - "enum": ["up", "down", "updating"] + "echo_req": { + "description": "Echo of the request made.", + "type": "object" }, - "supported_languages": { - "description": "Provides codes for languages supported.", - "type": "array", - "items": { - "type": "string" - } + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": [ + "website_status" + ] }, - "terms_conditions_version": { - "description": "Latest terms and conditions version.", - "type": "string" - } - } - }, - "subscription": { - "title": "Subscription information", - "description": "For subscription requests only.", - "type": "object", - "additionalProperties": false, - "required": ["id"], - "properties": { - "id": { - "description": "A per-connection unique identifier. Can be passed to the `forget` API call to unsubscribe.", - "type": "string", - "examples": ["c84a793b-8a87-7999-ce10-9b22f7ceead3"] + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } - } - }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" - }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": ["website_status"] - }, - "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/website_status/send.json b/config/v3/website_status/send.json index 20b0000a..6e73446f 100644 --- a/config/v3/website_status/send.json +++ b/config/v3/website_status/send.json @@ -1,29 +1,37 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Server Status (request)", - "description": "Request server status.", - "type": "object", - "auth_required": 0, - "additionalProperties": false, - "required": ["website_status"], - "properties": { - "website_status": { - "description": "Must be `1`", - "type": "integer", - "enum": [1] - }, - "subscribe": { - "description": "[Optional] `1` to stream the server/website status updates.", - "type": "integer", - "enum": [0, 1] - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$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", + "maxSize": 3500 + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" + } } - } }