├── .github ├── actions │ ├── build_and_push_docker_image │ │ └── action.yml │ ├── build_jekyll_site │ │ └── action.yml │ ├── bundle_install │ │ └── action.yml │ ├── invalidate_master_cache │ │ └── action.yml │ ├── publish_to_pages_production │ │ └── action.yml │ ├── publish_to_pages_staging │ │ └── action.yml │ ├── setup_node │ │ └── action.yml │ └── versioning │ │ └── action.yml └── workflows │ ├── build.yml │ ├── release-production.yml │ └── release-staging.yml ├── .gitignore ├── Dockerfile ├── Gemfile ├── README.md ├── _config.yml ├── _data └── v3.yml ├── _includes ├── api-playground-field.html ├── api-selector.html ├── demos │ ├── clojure.clj │ ├── coffeescript.coffee │ ├── csharp.cs │ ├── elixir.exs │ ├── go.go │ ├── java.java │ ├── javascript.js │ ├── perl.pl │ ├── php.php │ ├── python.py │ ├── ruby.rb │ ├── rust.rs │ ├── scala.scala │ └── swift.swift ├── examples │ └── website_status.js ├── footer.html ├── head.html ├── header.html ├── mobile-page-selector.html ├── sidebar.html └── token-input.html ├── _layouts ├── default.html └── page.html ├── _pages ├── api.html ├── applications.html ├── careers.html ├── copytrading.html ├── demos.html ├── endpoint.html ├── faq.html ├── guide.html ├── open-source.html ├── schemas.html ├── security.html ├── server-status-updates.html └── websockets.html ├── _sass ├── _base.scss ├── _layout.scss ├── _syntax-highlighting.scss └── monokai.css ├── code.js ├── config └── v3 │ ├── account_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── active_symbols │ ├── example.json │ ├── receive.json │ └── send.json │ ├── api_token │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_delete │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_get │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_markup_details │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_markup_statistics │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_register │ ├── example.json │ ├── receive.json │ └── send.json │ ├── app_update │ ├── example.json │ ├── receive.json │ └── send.json │ ├── asset_index │ ├── example.json │ ├── receive.json │ └── send.json │ ├── authorize │ ├── example.json │ ├── receive.json │ └── send.json │ ├── balance │ ├── example.json │ ├── receive.json │ └── send.json │ ├── buy │ ├── example.json │ ├── receive.json │ └── send.json │ ├── buy_contract_for_multiple_accounts │ ├── example.json │ ├── receive.json │ └── send.json │ ├── cancel │ ├── example.json │ ├── receive.json │ └── send.json │ ├── cashier │ ├── example.json │ ├── receive.json │ └── send.json │ ├── confirm_email │ ├── example.json │ ├── receive.json │ └── send.json │ ├── contract_update │ ├── example.json │ ├── receive.json │ └── send.json │ ├── contract_update_history │ ├── example.json │ ├── receive.json │ └── send.json │ ├── contracts_for │ ├── example.json │ ├── receive.json │ └── send.json │ ├── contracts_for_company │ ├── example.json │ ├── receive.json │ └── send.json │ ├── copy_start │ ├── example.json │ ├── receive.json │ └── send.json │ ├── copy_stop │ ├── example.json │ ├── receive.json │ └── send.json │ ├── copytrading_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── copytrading_statistics │ ├── example.json │ ├── receive.json │ └── send.json │ ├── crypto_config │ ├── example.json │ ├── receive.json │ └── send.json │ ├── crypto_estimations │ ├── example.json │ ├── receive.json │ └── send.json │ ├── document_upload │ ├── example.json │ ├── receive.json │ └── send.json │ ├── economic_calendar │ ├── example.json │ ├── receive.json │ └── send.json │ ├── exchange_rates │ ├── example.json │ ├── receive.json │ └── send.json │ ├── exchange_verification_code │ ├── example.json │ ├── receive.json │ └── send.json │ ├── financial_assessment_questions │ ├── example.json │ ├── receive.json │ └── send.json │ ├── forget │ ├── example.json │ ├── receive.json │ └── send.json │ ├── forget_all │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_account_status │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_financial_assessment │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_limits │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_self_exclusion │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_settings │ ├── example.json │ ├── receive.json │ └── send.json │ ├── get_third_party_redirect │ ├── example.json │ ├── receive.json │ └── send.json │ ├── identity_verification_document_add │ ├── example.json │ ├── receive.json │ └── send.json │ ├── kyc_auth_status │ ├── example.json │ ├── receive.json │ └── send.json │ ├── landing_company │ ├── example.json │ ├── receive.json │ └── send.json │ ├── landing_company_details │ ├── example.json │ ├── receive.json │ └── send.json │ ├── login_history │ ├── example.json │ ├── receive.json │ └── send.json │ ├── logout │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_deposit │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_get_settings │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_login_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_new_account │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_password_change │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_password_check │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_password_reset │ ├── example.json │ ├── receive.json │ └── send.json │ ├── mt5_withdrawal │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_account_check_duplicate_name_and_dob │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_account_check_duplicate_phone_and_dob │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_account_maltainvest │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_account_real │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_account_virtual │ ├── example.json │ ├── receive.json │ └── send.json │ ├── new_partner_account │ ├── example.json │ ├── receive.json │ └── send.json │ ├── oauth_apps │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advert_create │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advert_info │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advert_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advert_update │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_adverts │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_create │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_info │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_payment_methods │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_relations │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_advertiser_update │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_chat_create │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_country_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_cancel │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_confirm │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_create │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_dispute │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_info │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_order_review │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_payment_methods │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_ping │ ├── example.json │ ├── receive.json │ └── send.json │ ├── p2p_settings │ ├── example.json │ ├── receive.json │ └── send.json │ ├── partner_account_creation │ ├── example.json │ ├── receive.json │ └── send.json │ ├── partner_account_creation_status │ ├── example.json │ ├── receive.json │ └── send.json │ ├── partner_accounts │ ├── example.json │ ├── receive.json │ └── send.json │ ├── partner_settings │ ├── example.json │ ├── receive.json │ └── send.json │ ├── partner_settings_update │ ├── example.json │ ├── receive.json │ └── send.json │ ├── payment_methods │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_create │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_details │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_transfer │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_withdraw │ ├── example.json │ ├── receive.json │ └── send.json │ ├── paymentagent_withdraw_justification │ ├── example.json │ ├── receive.json │ └── send.json │ ├── payout_currencies │ ├── example.json │ ├── receive.json │ └── send.json │ ├── ping │ ├── example.json │ ├── receive.json │ └── send.json │ ├── portfolio │ ├── example.json │ ├── receive.json │ └── send.json │ ├── profit_table │ ├── example.json │ ├── receive.json │ └── send.json │ ├── proposal │ ├── example.json │ ├── receive.json │ └── send.json │ ├── proposal_open_contract │ ├── example.json │ ├── receive.json │ └── send.json │ ├── reality_check │ ├── example.json │ ├── receive.json │ └── send.json │ ├── residence_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── revoke_oauth_app │ ├── example.json │ ├── receive.json │ └── send.json │ ├── sell │ ├── example.json │ ├── receive.json │ └── send.json │ ├── sell_contract_for_multiple_accounts │ ├── example.json │ ├── receive.json │ └── send.json │ ├── sell_expired │ ├── example.json │ ├── receive.json │ └── send.json │ ├── set_account_currency │ ├── example.json │ ├── receive.json │ └── send.json │ ├── set_financial_assessment │ ├── example.json │ ├── receive.json │ └── send.json │ ├── set_self_exclusion │ ├── example.json │ ├── receive.json │ └── send.json │ ├── set_settings │ ├── example.json │ ├── receive.json │ └── send.json │ ├── statement │ ├── example.json │ ├── receive.json │ └── send.json │ ├── states_list │ ├── example.json │ ├── receive.json │ └── send.json │ ├── ticks │ ├── example.json │ ├── receive.json │ └── send.json │ ├── ticks_batch │ ├── example.json │ ├── receive.json │ └── send.json │ ├── ticks_history │ ├── example.json │ ├── receive.json │ └── send.json │ ├── time │ ├── example.json │ ├── receive.json │ └── send.json │ ├── tin_validations │ ├── example.json │ ├── receive.json │ └── send.json │ ├── tnc_approval │ ├── example.json │ ├── receive.json │ └── send.json │ ├── topup_virtual │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_durations │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_platform_investor_password_reset │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_platform_password_reset │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_platform_status │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_servers │ ├── example.json │ ├── receive.json │ └── send.json │ ├── trading_times │ ├── example.json │ ├── receive.json │ └── send.json │ ├── transaction │ ├── example.json │ ├── receive.json │ └── send.json │ ├── transfer_between_accounts │ ├── example.json │ ├── receive.json │ └── send.json │ ├── unsubscribe_email │ ├── example.json │ ├── receive.json │ └── send.json │ ├── verify_email │ ├── example.json │ ├── receive.json │ └── send.json │ ├── website_config │ ├── example.json │ ├── receive.json │ └── send.json │ └── website_status │ ├── example.json │ ├── receive.json │ └── send.json ├── css ├── all-hallows-eve.css ├── blackboard.css ├── dreamweaver.css ├── github.css ├── main.scss ├── monokai.css ├── obsidian.css ├── select2.min.css ├── solarized-dark.css ├── solarized-light.css ├── sunburst.css ├── tomorrow-night.css └── tricolore.css ├── developers.com.conf ├── docson ├── box.html ├── docson.css ├── docson.js └── signature.html ├── index.html ├── lib ├── binary-live-api.js ├── handlebars.js ├── highlight.js ├── jquery.js ├── jsonpointer.js ├── language │ ├── c.js │ ├── coffeescript.js │ ├── csharp.js │ ├── css.js │ ├── d.js │ ├── generic.js │ ├── go.js │ ├── haskell.js │ ├── html.js │ ├── java.js │ ├── javascript.js │ ├── lua.js │ ├── php.js │ ├── python.js │ ├── r.js │ ├── ruby.js │ ├── scheme.js │ ├── shell.js │ └── smalltalk.js ├── marked.js ├── rainbow.js ├── require.js ├── select2.min.js └── traverse.js └── static └── data └── v3.yml /.github/actions/build_jekyll_site/action.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | description: "Build Jekyll site" 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Building Jekyll site 7 | shell: bash 8 | run: bundle exec jekyll build --incremental 9 | -------------------------------------------------------------------------------- /.github/actions/bundle_install/action.yml: -------------------------------------------------------------------------------- 1 | name: bundle_install 2 | description: Bundle Install 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Bundle modules cache restore 7 | id: cache-modules 8 | uses: actions/cache/restore@v3 9 | with: 10 | path: ./modules 11 | key: bundle-v1-{{ checksum "Gemfile" }} 12 | 13 | - name: Bundle install 14 | if: steps.cache-modules.outputs.cache-hit != 'true' 15 | shell: bash 16 | run: bundle install --path ./modules 17 | 18 | -------------------------------------------------------------------------------- /.github/actions/invalidate_master_cache/action.yml: -------------------------------------------------------------------------------- 1 | name: invalidate_npm_cache 2 | description: Invalidate the Master NPM cache 3 | runs: 4 | using: composite 5 | steps: 6 | - name: save_cache 7 | uses: actions/cache/save@v3 8 | with: 9 | path: ./modules 10 | key: v1-deps-{{ checksum "Gemfile" }} 11 | -------------------------------------------------------------------------------- /.github/actions/publish_to_pages_production/action.yml: -------------------------------------------------------------------------------- 1 | name: publish_to_pages_production 2 | description: Publish to cloudflare pages (production) 3 | inputs: 4 | CLOUDFLARE_ACCOUNT_ID: 5 | description: 'Cloudflare account id' 6 | required: true 7 | CLOUDFLARE_API_TOKEN: 8 | description: 'Cloudflare token' 9 | required: true 10 | runs: 11 | using: composite 12 | steps: 13 | - name: Publish to cloudflare pages (production) 14 | env: 15 | CLOUDFLARE_ACCOUNT_ID: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }} 16 | CLOUDFLARE_API_TOKEN: ${{ inputs.CLOUDFLARE_API_TOKEN }} 17 | run: | 18 | cd _site 19 | npx wrangler pages publish . --project-name=websockets-pages --branch=main 20 | echo "New website - http://cf-pages-websockets.binary.com" 21 | shell: bash 22 | -------------------------------------------------------------------------------- /.github/actions/publish_to_pages_staging/action.yml: -------------------------------------------------------------------------------- 1 | name: publish_to_pages_staging 2 | description: Publish to cloudflare pages (staging) 3 | inputs: 4 | CLOUDFLARE_ACCOUNT_ID: 5 | description: 'Cloudflare account id' 6 | required: true 7 | CLOUDFLARE_API_TOKEN: 8 | description: 'Cloudflare token' 9 | required: true 10 | runs: 11 | using: composite 12 | steps: 13 | - name: Publish to cloudflare pages (staging) 14 | env: 15 | CLOUDFLARE_ACCOUNT_ID: ${{ inputs.CLOUDFLARE_ACCOUNT_ID }} 16 | CLOUDFLARE_API_TOKEN: ${{ inputs.CLOUDFLARE_API_TOKEN }} 17 | run: | 18 | cd _site 19 | npx wrangler pages publish . --project-name=websockets-pages --branch=staging 20 | echo "New staging website - http://staging.cf-pages-websockets.binary.com" 21 | shell: bash 22 | -------------------------------------------------------------------------------- /.github/actions/setup_node/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup Node 2 | description: Setup Node.js environment 3 | runs: 4 | using: composite 5 | steps: 6 | - name: Use Node.js 18.x 7 | uses: actions/setup-node@v3 8 | with: 9 | node-version: 18.x 10 | -------------------------------------------------------------------------------- /.github/actions/versioning/action.yml: -------------------------------------------------------------------------------- 1 | name: versioning 2 | description: Versioning 3 | inputs: 4 | RELEASE_TYPE: 5 | description: Release Type 6 | required: false 7 | outputs: 8 | version: 9 | description: Version 10 | 11 | runs: 12 | using: composite 13 | steps: 14 | - name: Tag build 15 | run: echo "${GITHUB_REF#refs/heads/} $(date -u +'%Y-%m-%dT%H:%M:%SZ')" > _site/version 16 | shell: bash 17 | - name: Set Version 18 | id: set_version 19 | run: | 20 | echo "version=${GITHUB_REF#refs/heads/} $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT" 21 | shell: bash 22 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Websocket Build Workflow 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build_test_and_publish: 8 | name: Build Websocket Application 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v4 13 | - uses: ruby/setup-ruby@v1 14 | with: 15 | ruby-version: 2.7 16 | - name: Bundle Install 17 | uses: ./.github/actions/bundle_install 18 | - name: Build Jekyll site 19 | uses: ./.github/actions/build_jekyll_site 20 | -------------------------------------------------------------------------------- /.github/workflows/release-staging.yml: -------------------------------------------------------------------------------- 1 | name: Websocket Staging Workflow 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build_test_and_publish: 8 | name: Build, Test and Publish to Staging 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v4 13 | - uses: ruby/setup-ruby@v1 14 | with: 15 | ruby-version: 2.7 16 | - name: Bundle Install 17 | uses: ./.github/actions/bundle_install 18 | - name: Build Jekyll site 19 | uses: ./.github/actions/build_jekyll_site 20 | - name: Versioning 21 | uses: ./.github/actions/versioning 22 | with: 23 | release_type: staging 24 | - name: Publish to Cloudflare Pages Staging 25 | uses: "./.github/actions/publish_to_pages_staging" 26 | with: 27 | CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} 28 | CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | .jekyll-metadata 3 | .sass-cache 4 | .idea/ 5 | Gemfile.lock 6 | .env 7 | .env.* 8 | *.env 9 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | COPY ./_site /usr/share/nginx/html 3 | COPY ./developers.com.conf /etc/nginx/conf.d/default.conf 4 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "jekyll", "3.8.4" 4 | 5 | group :jekyll_plugins do 6 | gem "jekyll-feed", "~> 0.9.2" 7 | end 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Binary.com Developers Portal 2 | This repository is the source for [developers.binary.com](https://developers.binary.com) 3 | 4 | [Get help with implementing Binary Websockets API](https://binary.vanillacommunity.com) 5 | 6 | ## Development 7 | 8 | ### Testing your changes locally 9 | Please follow the steps described [here](https://help.github.com/en/github/working-with-github-pages/testing-your-github-pages-site-locally-with-jekyll). 10 | 11 | ### Deploy to gh-pages 12 | - Please change your repo name to `websockets-dev` 13 | - On the setting page of your fork on github, specify `gh-pages` branch as the source for "GitHub Pages". 14 | - Push your local development branch to the remote `gh-pages` branch on your fork. (e.g. `git push origin my_dev_branch:gh-pages`) 15 | - Your changes would be available on `https://my-user-name.github.io/websockets-dev/`. (You can use a CNAME instead). 16 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Site settings 2 | title: Binary.com Developers 3 | url: "https://developers.binary.com" 4 | twitter_username: binarydotcom 5 | github_username: binary-com 6 | 7 | # Build settings 8 | markdown: kramdown 9 | 10 | collections: 11 | pages: 12 | output: true 13 | permalink: /:path/ 14 | exclude: 15 | - Gemfile 16 | - Gemfile.lock 17 | - modules 18 | - Dockerfile 19 | - developers.com.conf 20 | -------------------------------------------------------------------------------- /_includes/api-playground-field.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |

5 | 6 | 20 | Reset Connection 21 |

22 |
23 |

You are not authenticated.

24 |
25 |
26 | Scroll To Bottom 27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /_includes/api-selector.html: -------------------------------------------------------------------------------- 1 |
2 | 13 |
14 | -------------------------------------------------------------------------------- /_includes/demos/clojure.clj: -------------------------------------------------------------------------------- 1 | (ns binaryws.core 2 | (:require [gniazdo.core :as ws]) ;; [stylefruits/gniazdo "0.4.0"] 3 | (:require [cheshire.core :refer :all]) ;; [cheshire "5.5.0"] 4 | (:gen-class)) 5 | (defn -main 6 | [& args] 7 | (def socket 8 | (ws/connect 9 | "wss://ws.binaryws.com/websockets/v3?app_id=1089" 10 | :on-receive #(prn (parse-string %)))) 11 | (ws/send-msg socket (generate-string {:ticks "R_100"})) 12 | (Thread/sleep Long/MAX_VALUE) 13 | (ws/close socket) 14 | ) 15 | -------------------------------------------------------------------------------- /_includes/demos/coffeescript.coffee: -------------------------------------------------------------------------------- 1 | ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=1089') 2 | 3 | ws.onopen = (evt) -> 4 | ws.send JSON.stringify(ticks: 'R_100') 5 | 6 | ws.onmessage = (msg) -> 7 | data = JSON.parse(msg.data) 8 | console.log 'ticks update: %o', data 9 | -------------------------------------------------------------------------------- /_includes/demos/elixir.exs: -------------------------------------------------------------------------------- 1 | # Build as an escript, cf https://elixirschool.com/en/lessons/advanced/escripts/ 2 | # Depends on: [{:socket, "~> 0.3"}, {:poison, "~> 4.0"}] 3 | defmodule BinaryWS do 4 | def main(_args) do 5 | {:ok, omsg} = Poison.encode(%{"ticks" => "R_100"}) 6 | socket = Socket.Web.connect! "ws.binaryws.com", 443, 7 | [{:secure, true}, {:path, "/websockets/v3?app_id=1089"}] 8 | socket |> Socket.Web.send!({:text, omsg}) 9 | spawn_link(fn -> loop(socket) end) 10 | :timer.sleep(:infinity) 11 | socket |> Socket.Web.close 12 | end 13 | 14 | # Start receiving updates in another process until main process wakes up. 15 | defp loop(socket) do 16 | case socket |> Socket.Web.recv! do 17 | {:text, imsg} -> 18 | IO.puts "ticks update: " <> imsg 19 | loop(socket) 20 | _ -> exit(:normal) 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /_includes/demos/go.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | 7 | "golang.org/x/net/websocket" 8 | ) 9 | 10 | func receive(ticks chan string, ws *websocket.Conn) { 11 | defer close(ticks) 12 | var msg string 13 | for { 14 | if err := websocket.Message.Receive(ws, &msg); err != nil { 15 | log.Fatalln("recv:", err) 16 | } 17 | ticks <- msg 18 | } 19 | } 20 | 21 | func main() { 22 | origin := "http://localhost" 23 | url := "wss://ws.binaryws.com/websockets/v3?app_id=1089" 24 | 25 | ws, err := websocket.Dial(url, "", origin) 26 | if err != nil { 27 | log.Fatalln("dial:", err) 28 | } 29 | defer ws.Close() 30 | 31 | var ticks = make(chan string) 32 | go receive(ticks, ws) 33 | 34 | if err = websocket.Message.Send(ws, `{"ticks": "R_100"}`); err != nil { 35 | log.Fatalln("send:", err) 36 | } 37 | 38 | for { 39 | select { 40 | case tick := <-ticks: 41 | fmt.Println("ticks update:", tick) 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /_includes/demos/java.java: -------------------------------------------------------------------------------- 1 | import java.net.URI; 2 | import java.io.IOException; 3 | import java.lang.InterruptedException; 4 | import javax.websocket.*; 5 | 6 | @ClientEndpoint 7 | public class WSClient { 8 | 9 | @OnOpen 10 | public void onOpen(Session session) throws java.io.IOException 11 | { 12 | session.getBasicRemote().sendText("{\"ticks\": \"R_100\"}"); 13 | } 14 | 15 | @OnMessage 16 | public void onMessage(String message) 17 | { 18 | System.out.println("ticks update: " + message); 19 | } 20 | 21 | public static void main(String[] args) 22 | throws IOException, DeploymentException, InterruptedException 23 | { 24 | WebSocketContainer container = ContainerProvider.getWebSocketContainer(); 25 | URI apiUri = URI.create("wss://ws.binaryws.com/websockets/v3?app_id=1089"); 26 | Session session = container.connectToServer(WSClient.class, apiUri); 27 | while (session.isOpen()) { 28 | // receive ticks 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /_includes/demos/javascript.js: -------------------------------------------------------------------------------- 1 | var ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?app_id=1089'); 2 | 3 | ws.onopen = function(evt) { 4 | ws.send(JSON.stringify({ticks:'R_100'})); 5 | }; 6 | 7 | ws.onmessage = function(msg) { 8 | var data = JSON.parse(msg.data); 9 | console.log('ticks update: %o', data); 10 | }; 11 | -------------------------------------------------------------------------------- /_includes/demos/perl.pl: -------------------------------------------------------------------------------- 1 | use strict; 2 | use warnings; 3 | use v5.10; 4 | use Mojo::UserAgent; 5 | use Data::Dumper; 6 | 7 | my $ua = Mojo::UserAgent->new; 8 | $ua->websocket('wss://ws.binaryws.com/websockets/v3?app_id=1089' => sub { 9 | my ($ua, $tx) = @_; 10 | unless($tx->is_websocket) { 11 | say 'WebSocket handshake failed!'; 12 | return; 13 | } 14 | 15 | $tx->on(json => sub { 16 | my ($tx, $data) = @_; 17 | say "ticks update: " . Dumper(\$data); 18 | }); 19 | 20 | $tx->send({json => { 21 | ticks => 'R_100' 22 | }}); 23 | }); 24 | Mojo::IOLoop->start unless Mojo::IOLoop->is_running; 25 | -------------------------------------------------------------------------------- /_includes/demos/php.php: -------------------------------------------------------------------------------- 1 | require __DIR__ . '/vendor/autoload.php'; 2 | 3 | $loop = \React\EventLoop\Factory::create(); 4 | $connector = new \Ratchet\Client\Connector($loop); 5 | 6 | $connector('wss://ws.binaryws.com/websockets/v3?app_id=1089')->then(function ($conn) { 7 | $conn->on('message', function ($msg) { 8 | echo "ticks update: {$msg}\n"; 9 | }); 10 | 11 | $conn->send("{\"ticks\": \"R_100\"}"); 12 | }); 13 | 14 | $loop->run(); 15 | -------------------------------------------------------------------------------- /_includes/demos/python.py: -------------------------------------------------------------------------------- 1 | import websocket 2 | import json 3 | 4 | def on_open(ws): 5 | json_data = json.dumps({'ticks':'R_100'}) 6 | ws.send(json_data) 7 | 8 | def on_message(ws, message): 9 | print('ticks update: %s' % message) 10 | 11 | if __name__ == "__main__": 12 | apiUrl = "wss://ws.binaryws.com/websockets/v3?app_id=1089" 13 | ws = websocket.WebSocketApp(apiUrl, on_message = on_message, on_open = on_open) 14 | ws.run_forever() 15 | -------------------------------------------------------------------------------- /_includes/demos/ruby.rb: -------------------------------------------------------------------------------- 1 | gem install faye-websocket 2 | 3 | require 'faye/websocket' 4 | require 'eventmachine' 5 | require 'json' 6 | 7 | EM.run { 8 | ws = Faye::WebSocket::Client.new('wss://ws.binaryws.com/websockets/v3?app_id=1089') 9 | 10 | ws.on :open do |event| 11 | p [:open] 12 | ws.send(JSON.generate({ticks:'R_100'})) 13 | end 14 | 15 | ws.on :message do |event| 16 | p [:message, event.data] 17 | end 18 | } 19 | -------------------------------------------------------------------------------- /_includes/demos/rust.rs: -------------------------------------------------------------------------------- 1 | extern crate env_logger; 2 | extern crate ws; 3 | 4 | use ws::{connect, CloseCode}; 5 | 6 | fn main() { 7 | env_logger::init(); 8 | println!("Starting connection"); 9 | connect( 10 | "wss://frontend.binaryws.com/websockets/v3?app_id=1089", 11 | |out| { 12 | println!("Connection established"); 13 | out.send("{\"ticks\": \"R_100\"}").unwrap(); 14 | 15 | move |msg| { 16 | println!("Got message: {}", msg); 17 | out.close(CloseCode::Normal) 18 | } 19 | }, 20 | ) 21 | .unwrap(); 22 | println!("Event loop ended"); 23 | } 24 | -------------------------------------------------------------------------------- /_includes/demos/scala.scala: -------------------------------------------------------------------------------- 1 | package com.binary.ws 2 | 3 | import com.github.andyglow.websocket._ 4 | 5 | object BinaryWS extends App { 6 | val uri = "wss://ws.binaryws.com/websockets/v3?app_id=1089" 7 | val cli = WebsocketClient[String](uri) { 8 | case str => 9 | println("ticks update: " + str) 10 | } 11 | val ws = cli.open() 12 | 13 | ws ! "{\"ticks\":\"R_100\"}" 14 | } 15 | -------------------------------------------------------------------------------- /_includes/demos/swift.swift: -------------------------------------------------------------------------------- 1 | let ws = WebSocket("wss://ws.binaryws.com/websockets/v3?app_id=1089") 2 | 3 | ws.event.open = { 4 | ws.send("{\"ticks\":\"R_100\"}") 5 | } 6 | 7 | ws.event.message = { 8 | var obj: AnyObject? = NSJSONSerialization.JSONObjectWithData( 9 | source.dataUsingEncoding(NSUTF8StringEncoding)!, 10 | options: nil, 11 | error: &err 12 | ) 13 | print(obj) 14 | } 15 | -------------------------------------------------------------------------------- /_includes/examples/website_status.js: -------------------------------------------------------------------------------- 1 | const WebSocket = require('ws'); 2 | const ws = new WebSocket('wss://ws.binaryws.com/websockets/v3?l=EN&app_id=1089'); 3 | 4 | ws.on('open', function open() { 5 | ws.send(JSON.stringify({ 6 | website_status: 1, 7 | subscribe: 1 8 | })); 9 | }); 10 | 11 | ws.on('message', function incoming(data) { 12 | data = JSON.parse(data); 13 | console.log('website status: %s', data.website_status.site_status); 14 | if (data.website_status.message) { 15 | console.log('status message: %s', data.website_status.message); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Binary.com Developers

5 | 6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /_includes/mobile-page-selector.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /_includes/sidebar.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /_includes/token-input.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 | Get your API token 7 |
8 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% assign branch = site.baseurl %} 5 | {% if site.baseurl == '/websockets' %} 6 | {% assign branch = '' %} 7 | {% endif %} 8 | 9 | {% include head.html %} 10 | 11 | 12 | 13 | {% include header.html %} 14 | 15 |
16 | 17 | {{ content }} 18 |
19 | 20 | {% include footer.html %} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {% assign branch = site.baseurl %} 6 | {% if site.baseurl == '/websockets' %} 7 | {% assign branch = '' %} 8 | {% endif %} 9 | 10 | {% include mobile-page-selector.html %} 11 | 12 |
13 | {% include sidebar.html %} 14 |
15 | {{ content }} 16 |
17 |
18 | -------------------------------------------------------------------------------- /_pages/api.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | permalink: api/ 4 | --- 5 |
6 |
7 |
8 | {% include api-selector.html %} 9 | 10 |
11 |
12 |
13 |
14 | {% include token-input.html %} 15 | {% include api-playground-field.html %} 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /_pages/careers.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | permalink: careers/ 4 | --- 5 | 6 |

Careers

7 | 8 |

9 | We are expanding rapidly and are constantly on the lookout for talented software engineers to join our team. 10 |

11 | 12 |

13 | Learn more about working with deriv.com. 14 |

15 | -------------------------------------------------------------------------------- /_pages/copytrading.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | permalink: copytrading/ 4 | --- 5 | 6 |

Copy trading facilities

7 | 8 |

9 | What is it? 10 |

11 |

12 | Copy Trading is becoming popular in the financial markets; it allows a client (the Copier) to automatically copy the trades of another client (the Trader). 13 |

14 | 15 |

16 | Becoming a Trader 17 |

18 |

19 | To become a Trader (i.e. to allow others to follow your trades), set the “allow_copiers” setting via the set settings call. 20 |

21 |

22 | The Trader then creates a read-only API token and provides it to the Copier. 23 |

24 |

25 | Enabling the allow_copiers setting will also make the copytrading statistics call work. The statistics API call provides the information about an account (this is so that potential copiers have an idea about the trader’s past performance). 26 |

27 | 28 |

29 | Becoming a Copier 30 |

31 |

32 | To become a copier, use the copy start call. 33 | To stop copying, use the copy stop call. 34 |

35 | -------------------------------------------------------------------------------- /_pages/demos.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Code samples" 4 | permalink: demos/ 5 | --- 6 |

{{ page.title }}

7 | 8 |

Please refer to https://api.deriv.com/docs/category/javascript-examples.

9 | -------------------------------------------------------------------------------- /_pages/endpoint.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | permalink: endpoint/ 4 | --- 5 |
6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 |
25 | 26 |

27 | 28 | 32 |

33 |
34 | 35 |
36 | -------------------------------------------------------------------------------- /_pages/schemas.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "JSON Schemas" 4 | permalink: schemas/ 5 | --- 6 |

{{ page.title }}

7 | 8 |

Binary.com Websockets API is defined by JSON Schema files. 9 | Browse the JSON Schemas of the API.

10 | 11 |

View the changes in the JSON Schemas by looking for commits titled "JSON Schema Update" in the 12 | changelog.

13 | 14 |

Useful tools:

15 | 16 |

JSON Editor with JSON Schema support

17 |

Generate JSON Schema from TypeScript

18 |

Generate JSON Schema from JSON Object

19 |

JSON Schema Validator

20 | -------------------------------------------------------------------------------- /_pages/security.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | permalink: security/ 4 | --- 5 | 6 |

Security

7 | 8 |

Binary.com invests considerable time and effort into website security.

9 |

Should you encounter what you believe to be any security issue whilst coding against the API, please report it on HackerOne.

10 | -------------------------------------------------------------------------------- /_pages/server-status-updates.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Server status updates" 4 | permalink: server-status-updates/ 5 | --- 6 | 7 |

{{ page.title }}

8 | 9 |

What is it?

10 | 11 |

The API provides a way to let clients check on whether the website is online or not through the website status call.

12 | 13 |

Subscribing to server status notifications

14 | 15 |

Here is a JavaScript code snippet that opens a websocket and makes a subscription for server status notifications. On receipt of a message, it emits the website status as well a message about the status, if available:

16 | 17 |
{% include examples/website_status.js %}
18 | -------------------------------------------------------------------------------- /_pages/websockets.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | permalink: websockets/ 4 | --- 5 | 6 |

Quickstart

7 | 8 |

Please refer to https://api.deriv.com/docs/core-concepts/websocket.

9 | -------------------------------------------------------------------------------- /_sass/monokai.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Monokai theme 3 | * 4 | * Adapted from Wimer Hazenberg's TextMate theme of the same name 5 | * 6 | * @author Wimer Hazenberg 7 | * @author Michael Fasani 8 | * @author Craig Campbell 9 | * @version 1.0.0 10 | */ 11 | pre { 12 | background: #272822; 13 | word-wrap: break-word; 14 | margin: 0px; 15 | padding: 10px; 16 | color: #fff; 17 | font-size: 14px; 18 | margin-bottom: 20px; 19 | } 20 | 21 | pre, code { 22 | font-family: 'Monaco', courier, monospace; 23 | } 24 | 25 | pre .comment { 26 | color: #75715E; 27 | } 28 | 29 | pre .constant { 30 | color: #AE81FF; 31 | } 32 | 33 | pre .storage { 34 | color: #66D9EF; 35 | } 36 | 37 | pre .string, pre .comment.docstring { 38 | color: #E6DB74; 39 | } 40 | 41 | pre .support.tag { 42 | color: #fff; 43 | } 44 | 45 | pre .keyword { 46 | /* @todo some keywords use this light blue, most use the pink */ 47 | /*color: #66D9EF;*/ 48 | color: #F92672; 49 | } 50 | 51 | pre .selector { 52 | color: #F92672; 53 | } 54 | 55 | pre .inherited-class { 56 | font-style: italic; 57 | } 58 | 59 | pre .operator, pre .support.tag-name , pre .entity.tag { 60 | color: #F92672; 61 | } 62 | 63 | pre .entity, pre .support.attribute, pre .entity.attribute { 64 | color: #A6E22E; 65 | } 66 | 67 | pre .support, *[data-language="c"] .function.call { 68 | color: #66D9EF; 69 | } 70 | 71 | *[data-language="html"] .support.operator { 72 | color: #fff; 73 | } 74 | 75 | pre .css-property, pre .storage.function { 76 | font-style: italic; 77 | } 78 | 79 | pre .variable.global, pre .variable.class, pre .variable.instance { 80 | color: #A6E22E; 81 | } 82 | -------------------------------------------------------------------------------- /config/v3/account_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "account_list": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/account_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Account List (request)", 4 | "description": "Returns all accounts belonging to the authorized user.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "account_list" 13 | ], 14 | "properties": { 15 | "account_list": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "passthrough": { 23 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 24 | "type": "object" 25 | }, 26 | "req_id": { 27 | "description": "[Optional] Used to map request to response.", 28 | "type": "integer" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /config/v3/active_symbols/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "active_symbols": "brief", 3 | "product_type": "basic" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/api_token/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_token": 1, 3 | "new_token": "Token example", 4 | "new_token_scopes": [ 5 | "admin", 6 | "read", 7 | "trade" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /config/v3/app_delete/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_delete": 1234 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/app_delete/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Application: Delete (response)", 4 | "description": "The result of delete application request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "app_delete": { 12 | "title": "app_delete", 13 | "description": "1 on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "app_delete" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/app_delete/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Application: Delete (request)", 4 | "description": "The request for deleting an application.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "app_delete" 13 | ], 14 | "properties": { 15 | "app_delete": { 16 | "description": "Application app_id", 17 | "type": "integer" 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/app_get/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_get": 1234 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/app_get/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Application: Get Details (request)", 4 | "description": "To get the information of the OAuth application specified by 'app_id'", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "app_get" 13 | ], 14 | "properties": { 15 | "app_get": { 16 | "description": "Application app_id", 17 | "type": "integer" 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/app_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_list": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/app_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Application: List (request)", 4 | "description": "List all of the account's OAuth applications", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "app_list" 13 | ], 14 | "properties": { 15 | "app_list": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/app_markup_details/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_markup_details": 1, 3 | "description": 1, 4 | "app_id": 1234, 5 | "client_loginid": "CR12345", 6 | "date_from": "2017-08-01 00:00:00", 7 | "date_to": "2017-08-31 23:59:59", 8 | "limit": 100, 9 | "offset": 0, 10 | "sort": "ASC", 11 | "sort_fields": [ 12 | "app_id", 13 | "client_loginid", 14 | "transaction_time" 15 | ], 16 | "passthrough": {}, 17 | "req_id": 3 18 | } 19 | -------------------------------------------------------------------------------- /config/v3/app_markup_statistics/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_markup_statistics": 1, 3 | "date_from": "2022-01-01 00:00:00", 4 | "date_to": "2022-01-31 23:59:59", 5 | "passthrough": {}, 6 | "req_id": 4 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/app_register/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_register": 1, 3 | "appstore": "https://itunes.apple.com/test_app", 4 | "github": "https://github.com/test_org/app", 5 | "googleplay": "https://play.google.com/store/apps/details?id=test.app", 6 | "homepage": "https://test.example.com/", 7 | "name": "Test Application", 8 | "redirect_uri": "https://test.example.com/redirect", 9 | "scopes": [ 10 | "read", 11 | "trade" 12 | ], 13 | "verification_uri": "https://test.example.com/verify" 14 | } 15 | -------------------------------------------------------------------------------- /config/v3/app_update/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_update": 999, 3 | "appstore": "https://itunes.apple.com/test_app", 4 | "github": "https://github.com/test_org/app", 5 | "googleplay": "https://play.google.com/store/apps/details?id=test.app", 6 | "homepage": "https://test.example.com/", 7 | "name": "Test Application", 8 | "redirect_uri": "https://test.example.com/redirect", 9 | "scopes": [ 10 | "read", 11 | "trade" 12 | ], 13 | "verification_uri": "https://test.example.com/verify" 14 | } 15 | -------------------------------------------------------------------------------- /config/v3/asset_index/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "asset_index": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/asset_index/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Asset Index (response)", 4 | "description": "A message with Asset Index", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "asset_index": { 12 | "title": "asset_index", 13 | "description": "List of underlyings by their display name and symbol followed by their available contract types and duration boundaries.", 14 | "type": "array" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "asset_index" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/authorize/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "authorize": "uw2mk7no3oktoRVVsB4Dz7TQncfABuFDgO95dlxfMxRuPUDz" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/balance/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "balance": 1, 3 | "subscribe": 1 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/buy/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "buy": "uw2mk7no3oktoRVVsB4Dz7TQnFfABuFDgO95dlxfMxRuPUsz", 3 | "price": 100 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/buy_contract_for_multiple_accounts/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "buy_contract_for_multiple_accounts": "AE79667A-3561-11E6-880B-19CE0BCBE464", 3 | "price": 2.57, 4 | "tokens": [ 5 | "EWHdv7feGJRmMf1kqv79lgfPiGjLLGV9GHTZFQ345FzJSfNE", 6 | "ONqj76yAnVKnPtc", 7 | "oSpp7ohpGf50tP6", 8 | "uz6OSIcFIcPKK5T" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /config/v3/cancel/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "cancel": 11542203588 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/cancel/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Cancel a Contract (request)", 4 | "description": "Cancel contract with contract id", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "trade" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "cancel" 13 | ], 14 | "properties": { 15 | "cancel": { 16 | "description": "Value should be the `contract_id` which received from the `portfolio` call.", 17 | "type": "integer" 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/cashier/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "cashier": "deposit", 3 | "provider": "doughflow", 4 | "verification_code": "my_verification_code" 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/confirm_email/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "confirm_email": 1, 3 | "created_for": "account_opening", 4 | "email_consent": 1, 5 | "verification_code": "ExampleVerificationCode" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/confirm_email/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Confirm Email Through Verification Code (response)", 4 | "description": "Confirm Email Response", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "confirm_email": { 12 | "title": "confirm_email", 13 | "description": "1 for success (The verification code has been successfully verified)", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "confirm_email" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/contract_update/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_update": 1, 3 | "contract_id": 123, 4 | "limit_order": { 5 | "take_profit": 1 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/contract_update_history/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "contract_update_history": 1, 3 | "contract_id": 123 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/contract_update_history/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Update Contract History (request)", 4 | "description": "Request for contract update history.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "contract_update_history", 13 | "contract_id" 14 | ], 15 | "properties": { 16 | "contract_update_history": { 17 | "description": "Must be `1`", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "contract_id": { 24 | "description": "Internal unique contract identifier.", 25 | "type": "integer" 26 | }, 27 | "limit": { 28 | "description": "[Optional] Maximum number of historical updates to receive.", 29 | "type": "number", 30 | "default": 500, 31 | "maximum": 999, 32 | "minimum": 1 33 | }, 34 | "loginid": { 35 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 36 | "type": "string", 37 | "pattern": "^[A-Za-z]+[0-9]+$" 38 | }, 39 | "passthrough": { 40 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 41 | "type": "object" 42 | }, 43 | "req_id": { 44 | "description": "[Optional] Used to map request to response.", 45 | "type": "integer" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /config/v3/contracts_for/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "contracts_for": "R_50", 3 | "currency": "USD", 4 | "landing_company": "svg", 5 | "product_type": "basic" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/contracts_for_company/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "contracts_for_company": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/copy_start/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "copy_start": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/copy_start/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Copy Trading: Start (response)", 4 | "description": "A message with results is received", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "copy_start": { 12 | "title": "copy_start", 13 | "description": "Copy start confirmation. Returns 1 is success.", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "copy_start" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/copy_stop/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "copy_stop": "uw2mk7no3oktoRVVsB4Dz7TQnFgrthg" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/copy_stop/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Copy Trading: Stop (response)", 4 | "description": "A message with results is received", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "copy_stop": { 12 | "title": "copy_stop", 13 | "description": "Copy stopping confirmation. Returns 1 is success.", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "copy_stop" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/copy_stop/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Copy Trading: Stop (request)", 4 | "description": "Stop copy trader bets", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "trade" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "copy_stop" 13 | ], 14 | "properties": { 15 | "copy_stop": { 16 | "description": "API tokens identifying the accounts which needs not to be copied", 17 | "type": "string", 18 | "pattern": "^[\\w\\s-]{15,32}$", 19 | "sensitive": 1 20 | }, 21 | "loginid": { 22 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 23 | "type": "string", 24 | "pattern": "^[A-Za-z]+[0-9]+$" 25 | }, 26 | "passthrough": { 27 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 28 | "type": "object" 29 | }, 30 | "req_id": { 31 | "description": "[Optional] Used to map request to response.", 32 | "type": "integer" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /config/v3/copytrading_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "copytrading_list": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/copytrading_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Copy Trading: List (request)", 4 | "description": "Retrieves a list of active copiers and/or traders for Copy Trading", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "copytrading_list" 13 | ], 14 | "properties": { 15 | "copytrading_list": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/copytrading_statistics/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "copytrading_statistics": 1, 3 | "trader_id": "CR1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/copytrading_statistics/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Copy Trading: Statistics (request)", 4 | "description": "Retrieve performance, trading, risk and copiers statistics of trader.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "copytrading_statistics", 10 | "trader_id" 11 | ], 12 | "properties": { 13 | "copytrading_statistics": { 14 | "description": "Must be `1`", 15 | "type": "integer", 16 | "enum": [ 17 | 1 18 | ] 19 | }, 20 | "trader_id": { 21 | "description": "The ID of the target trader.", 22 | "type": "string", 23 | "pattern": "^[A-Za-z]+[0-9]+$" 24 | }, 25 | "passthrough": { 26 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 27 | "type": "object" 28 | }, 29 | "req_id": { 30 | "description": "[Optional] Used to map request to response.", 31 | "type": "integer" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /config/v3/crypto_config/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "crypto_config": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/crypto_config/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Cryptocurrency configurations (request)", 4 | "description": "The request for cryptocurrencies configuration.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "crypto_config" 10 | ], 11 | "properties": { 12 | "crypto_config": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "currency_code": { 20 | "description": "[Optional] Cryptocurrency code. Sending request with currency_code provides crypto config for the sent cryptocurrency code only.", 21 | "type": "string", 22 | "pattern": "^[a-zA-Z0-9]{2,20}$" 23 | }, 24 | "loginid": { 25 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 26 | "type": "string", 27 | "pattern": "^[A-Za-z]+[0-9]+$" 28 | }, 29 | "passthrough": { 30 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 31 | "type": "object" 32 | }, 33 | "req_id": { 34 | "description": "[Optional] Used to map request to response.", 35 | "type": "integer" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/v3/crypto_estimations/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "crypto_estimations": 1, 3 | "currency_code": "BTC" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/document_upload/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "document_upload": 1, 3 | "document_format": "JPG", 4 | "document_type": "bankstatement", 5 | "expected_checksum": "1a79a4d60de6718e8e5b326e338ae533", 6 | "file_size": 12345 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/economic_calendar/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "economic_calendar": 1, 3 | "currency": "USD", 4 | "end_date": 1471996799, 5 | "start_date": 1469491200 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/economic_calendar/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Economic Calendar (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "economic_calendar" 10 | ], 11 | "properties": { 12 | "economic_calendar": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "currency": { 20 | "description": "[Optional] Currency symbol.", 21 | "type": "string", 22 | "pattern": "^[a-zA-Z0-9]{2,20}$" 23 | }, 24 | "end_date": { 25 | "description": "[Optional] End date.", 26 | "type": "integer", 27 | "maximum": 9999999999, 28 | "minimum": 1 29 | }, 30 | "start_date": { 31 | "description": "[Optional] Start date.", 32 | "type": "integer", 33 | "maximum": 9999999999, 34 | "minimum": 1 35 | }, 36 | "passthrough": { 37 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 38 | "type": "object" 39 | }, 40 | "req_id": { 41 | "description": "[Optional] Used to map request to response.", 42 | "type": "integer" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /config/v3/exchange_rates/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "exchange_rates": 1, 3 | "base_currency": "USD" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/exchange_verification_code/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "exchange_verification_code": "1", 3 | "type": "account_opening", 4 | "verification_code": "abCD0123" 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/exchange_verification_code/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Exchange Verification Code (response)", 4 | "description": "Exchange Verification Code Response", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "exchange_verification_code": { 12 | "title": "exchange_verification_code", 13 | "description": "Exchange Verification Code details", 14 | "type": "object", 15 | "additionalProperties": false, 16 | "required": [ 17 | "new_verification_code" 18 | ], 19 | "properties": { 20 | "new_verification_code": { 21 | "description": "The new code generated after successful verification", 22 | "type": "string" 23 | } 24 | } 25 | }, 26 | "echo_req": { 27 | "description": "Echo of the request made.", 28 | "type": "object" 29 | }, 30 | "msg_type": { 31 | "description": "Action name of the request made.", 32 | "type": "string", 33 | "enum": [ 34 | "exchange_verification_code" 35 | ] 36 | }, 37 | "req_id": { 38 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/exchange_verification_code/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Exchange Verification Code (request)", 4 | "description": "Verifies the code and returns a new code if verification is successful", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "exchange_verification_code", 10 | "verification_code" 11 | ], 12 | "properties": { 13 | "exchange_verification_code": { 14 | "description": "Must be `1`", 15 | "type": "integer", 16 | "enum": [ 17 | 1 18 | ] 19 | }, 20 | "type": { 21 | "description": "[Optional] Purpose of the token exchange.", 22 | "type": "string", 23 | "default": "account_opening", 24 | "enum": [ 25 | "account_opening" 26 | ] 27 | }, 28 | "verification_code": { 29 | "description": "Email verification code (received from a `verify_email` call which must be done first).", 30 | "type": "string", 31 | "pattern": "^\\w{8,128}$", 32 | "sensitive": 1 33 | }, 34 | "passthrough": { 35 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 36 | "type": "object" 37 | }, 38 | "req_id": { 39 | "description": "[Optional] Used to map request to response.", 40 | "type": "integer" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /config/v3/financial_assessment_questions/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "financial_assessment_questions": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/forget/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "forget": "d1ee7d0d-3ca9-fbb4-720b-5312d487185b" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/forget/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Forget (response)", 4 | "description": "The result of forget request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "forget": { 12 | "title": "forget", 13 | "description": "If set to 1, stream exited and stopped. If set to 0, stream did not exist.", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "forget" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/forget/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Forget (request)", 4 | "description": "Immediately cancel the real-time stream of messages with a specific ID.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "forget" 10 | ], 11 | "properties": { 12 | "forget": { 13 | "description": "ID of the real-time stream of messages to cancel.", 14 | "type": "string", 15 | "pattern": "^[\\w-]{32,128}$" 16 | }, 17 | "passthrough": { 18 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 19 | "type": "object" 20 | }, 21 | "req_id": { 22 | "description": "[Optional] Used to map request to response.", 23 | "type": "integer" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /config/v3/forget_all/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "forget_all": "ticks" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/forget_all/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Forget All (response)", 4 | "description": "The result of forget all request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "forget_all": { 12 | "title": "forget_all", 13 | "description": "IDs of the cancelled streams", 14 | "type": "array" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "forget_all" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/get_account_status/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_account_status": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/get_account_status/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Account Status (request)", 4 | "description": "Get Account Status", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_account_status" 13 | ], 14 | "properties": { 15 | "get_account_status": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/get_financial_assessment/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_financial_assessment": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/get_financial_assessment/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Get Financial Assessment (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_financial_assessment" 13 | ], 14 | "properties": { 15 | "get_financial_assessment": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/get_limits/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_limits": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/get_limits/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Account Limits (request)", 4 | "description": "Trading and Withdrawal Limits for a given user", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_limits" 13 | ], 14 | "properties": { 15 | "get_limits": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/get_self_exclusion/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_self_exclusion": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/get_self_exclusion/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Get Self-Exclusion (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_self_exclusion" 13 | ], 14 | "properties": { 15 | "get_self_exclusion": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/get_settings/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_settings": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/get_settings/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Get Account Settings (request)", 4 | "description": "Get User Settings (email, date of birth, address etc)", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_settings" 13 | ], 14 | "properties": { 15 | "get_settings": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/get_third_party_redirect/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "get_third_party_redirect": 1, 3 | "name": "dynamicworks" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/get_third_party_redirect/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Third Party Redirect Login SSO URL (response)", 4 | "description": "The result for Third Party Redirect URL for sso login.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "redirect_url": { 12 | "description": "Redirect URL for sso login.", 13 | "type": "string" 14 | }, 15 | "echo_req": { 16 | "description": "Echo of the request made.", 17 | "type": "object" 18 | }, 19 | "msg_type": { 20 | "description": "Action name of the request made.", 21 | "type": "string", 22 | "enum": [ 23 | "get_third_party_redirect" 24 | ] 25 | }, 26 | "req_id": { 27 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 28 | "type": "integer" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /config/v3/get_third_party_redirect/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Third Party Redirect Login SSO URL (request)", 4 | "description": "Get Third Party Redirect URL for sso login.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "get_third_party_redirect", 13 | "name" 14 | ], 15 | "properties": { 16 | "get_third_party_redirect": { 17 | "description": "Must be `1`", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "name": { 24 | "description": "The name of third party platform for redirect URL.", 25 | "type": "string", 26 | "enum": [ 27 | "dynamicworks" 28 | ] 29 | }, 30 | "loginid": { 31 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 32 | "type": "string", 33 | "pattern": "^[A-Za-z]+[0-9]+$" 34 | }, 35 | "passthrough": { 36 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 37 | "type": "object" 38 | }, 39 | "req_id": { 40 | "description": "[Optional] Used to map request to response.", 41 | "type": "integer" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /config/v3/identity_verification_document_add/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "identity_verification_document_add": 1, 3 | "document_additional": "123456789ABCDEF", 4 | "document_number": "12345678", 5 | "document_type": "passport", 6 | "issuing_country": "in" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/identity_verification_document_add/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Identity Verification Add Document (response)", 4 | "description": "Adds document information such as issuing country, id and type for identity verification processes.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "identity_verification_document_add": { 12 | "title": "identity_verification_document_add", 13 | "description": "1 on success", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "echo_req": { 20 | "description": "Echo of the request made.", 21 | "type": "object" 22 | }, 23 | "msg_type": { 24 | "description": "Action name of the request made.", 25 | "type": "string", 26 | "enum": [ 27 | "identity_verification_document_add" 28 | ] 29 | }, 30 | "req_id": { 31 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 32 | "type": "integer" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /config/v3/kyc_auth_status/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "kyc_auth_status": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/landing_company/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "landing_company": "id" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/landing_company/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Landing Company (request)", 4 | "description": "The company has a number of licensed subsidiaries in various jurisdictions, which are called Landing Companies. This call will return the appropriate Landing Company for clients of a given country. The landing company may differ for derived contracts (Synthetic Indices) and Financial contracts (Forex, Stock Indices, Commodities).", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "landing_company" 10 | ], 11 | "properties": { 12 | "landing_company": { 13 | "title": "Landing Company", 14 | "description": "Client's 2-letter country code (obtained from `residence_list` call).", 15 | "type": "string", 16 | "pattern": "^\\w\\w$" 17 | }, 18 | "passthrough": { 19 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 20 | "type": "object" 21 | }, 22 | "req_id": { 23 | "description": "[Optional] Used to map request to response.", 24 | "type": "integer" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /config/v3/landing_company_details/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "landing_company_details": "svg" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/login_history/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "login_history": 1, 3 | "limit": 25 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/login_history/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Login History (request)", 4 | "description": "Retrieve a summary of login history for user.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "login_history" 13 | ], 14 | "properties": { 15 | "login_history": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "limit": { 23 | "description": "[Optional] Apply limit to count of login history records.", 24 | "type": "integer", 25 | "default": 10, 26 | "maximum": 50, 27 | "minimum": 0 28 | }, 29 | "loginid": { 30 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 31 | "type": "string", 32 | "pattern": "^[A-Za-z]+[0-9]+$" 33 | }, 34 | "passthrough": { 35 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 36 | "type": "object" 37 | }, 38 | "req_id": { 39 | "description": "[Optional] Used to map request to response.", 40 | "type": "integer" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /config/v3/logout/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "logout": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/logout/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Log Out (response)", 4 | "description": "The response of logout request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "logout": { 12 | "title": "logout", 13 | "description": "The result of logout request which is 1", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "echo_req": { 20 | "description": "Echo of the request made.", 21 | "type": "object" 22 | }, 23 | "msg_type": { 24 | "description": "Action name of the request made.", 25 | "type": "string", 26 | "enum": [ 27 | "logout" 28 | ] 29 | }, 30 | "req_id": { 31 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 32 | "type": "integer" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /config/v3/logout/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Log Out (request)", 4 | "description": "Logout the session", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "logout" 10 | ], 11 | "properties": { 12 | "logout": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/mt5_deposit/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_deposit": 1, 3 | "amount": 1000, 4 | "from_binary": "CR100001", 5 | "to_mt5": "MTR1000" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/mt5_deposit/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Deposit (response)", 4 | "description": "The result of MT5 deposit request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "mt5_deposit": { 12 | "title": "mt5_deposit", 13 | "description": "1 on success", 14 | "type": "integer" 15 | }, 16 | "binary_transaction_id": { 17 | "description": "Withdrawal reference ID of Binary account", 18 | "type": "integer" 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "mt5_deposit" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/mt5_get_settings/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_get_settings": 1, 3 | "login": "MTR1000" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/mt5_get_settings/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Get Setting (request)", 4 | "description": "Get MT5 user account settings", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "mt5_get_settings", 13 | "login" 14 | ], 15 | "properties": { 16 | "mt5_get_settings": { 17 | "description": "Must be `1`", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "login": { 24 | "description": "MT5 user login", 25 | "type": "string", 26 | "pattern": "^MT[DR]?[0-9]+$" 27 | }, 28 | "loginid": { 29 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 30 | "type": "string", 31 | "pattern": "^[A-Za-z]+[0-9]+$" 32 | }, 33 | "passthrough": { 34 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 35 | "type": "object" 36 | }, 37 | "req_id": { 38 | "description": "[Optional] Used to map request to response.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/mt5_login_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_login_list": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/mt5_login_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Accounts List (request)", 4 | "description": "Get list of MT5 accounts for client", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "mt5_login_list" 13 | ], 14 | "properties": { 15 | "mt5_login_list": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/mt5_new_account/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_new_account": 1, 3 | "account_type": "demo", 4 | "address": "Dummy address", 5 | "city": "Valletta", 6 | "company": "Deriv Limited", 7 | "country": "mt", 8 | "email": "test@mailinator.com", 9 | "investPassword": "Anoth3r_p4ssword", 10 | "leverage": 100, 11 | "mainPassword": "C0rrect_p4ssword", 12 | "mt5_account_category": "conventional", 13 | "mt5_account_type": "financial", 14 | "name": "Peter Pan", 15 | "phone": "+6123456789", 16 | "phonePassword": "AbcDv1234", 17 | "state": "Valleta", 18 | "zipCode": "VLT 1117" 19 | } 20 | -------------------------------------------------------------------------------- /config/v3/mt5_password_change/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_password_change": 1, 3 | "login": "MTR1000", 4 | "new_password": "C0rrect_p4ssword", 5 | "old_password": "Abc1234", 6 | "password_type": "main" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/mt5_password_change/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Password Change (response)", 4 | "description": "MT5 user password change receive", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "mt5_password_change": { 12 | "title": "mt5_password_change", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "mt5_password_change" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/mt5_password_check/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_password_check": 1, 3 | "login": "MTR1000", 4 | "password": "abc1234", 5 | "password_type": "main" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/mt5_password_check/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Password Check (response)", 4 | "description": "MT5 user password check receive", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "mt5_password_check": { 12 | "title": "mt5_password_check", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "mt5_password_check" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/mt5_password_reset/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_password_reset": 1, 3 | "login": "MTD1000", 4 | "new_password": "C0rrect_p4ssword", 5 | "password_type": "main", 6 | "verification_code": "O8eZ2xMq" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/mt5_password_reset/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Password Reset (response)", 4 | "description": "MT5 user password reset receive", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "mt5_password_reset": { 12 | "title": "mt5_password_reset", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "mt5_password_reset" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/mt5_withdrawal/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "mt5_withdrawal": 1, 3 | "amount": 1000, 4 | "from_mt5": "MTR1000", 5 | "to_binary": "CR100001" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/mt5_withdrawal/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "MT5: Withdrawal (response)", 4 | "description": "The result of MT5 withdrawal request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "mt5_withdrawal": { 12 | "title": "mt5_withdrawal", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "binary_transaction_id": { 17 | "description": "Deposit reference ID of Binary account.", 18 | "type": "integer" 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "mt5_withdrawal" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/new_account_check_duplicate_name_and_dob/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "new_account_check_duplicate_name_and_dob": 1, 3 | "date_of_birth": "1980-01-31", 4 | "first_name": "Peter", 5 | "last_name": "Pan" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/new_account_check_duplicate_phone_and_dob/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "new_account_check_duplicate_phone_and_dob": 1, 3 | "date_of_birth": "1980-01-31", 4 | "phone_number": "+67212312312" 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/new_account_real/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "new_account_real": 1, 3 | "account_opening_reason": "Speculative", 4 | "account_turnover": "Less than $25,000", 5 | "address_city": "Melbourne", 6 | "address_line_1": "20 Broadway Av", 7 | "address_line_2": "East Melbourne VIC", 8 | "address_postcode": "3002", 9 | "address_state": "Victoria", 10 | "calling_country_code": "61", 11 | "date_of_birth": "1980-01-31", 12 | "fatca_declaration": 1, 13 | "first_name": "Peter", 14 | "last_name": "Pan", 15 | "non_pep_declaration": 1, 16 | "phone": "23456789", 17 | "place_of_birth": "id", 18 | "residence": "au", 19 | "salutation": "Mr", 20 | "secret_answer": "Jones", 21 | "secret_question": "Mother's maiden name", 22 | "tax_identification_number": "012142545", 23 | "tax_residence": "ar,sg", 24 | "tin_skipped": 0, 25 | "tnc_acceptance": 1 26 | } 27 | -------------------------------------------------------------------------------- /config/v3/new_account_virtual/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "new_account_virtual": 1, 3 | "type": "trading", 4 | "client_password": "C0rrect_p4ssword", 5 | "residence": "id", 6 | "verification_code": "uoJvVuQ6" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/new_partner_account/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "new_partner_account": 1, 3 | "address_city": "Melbourne", 4 | "address_line_1": "20 Broadway Av", 5 | "address_line_2": "East Melbourne VIC", 6 | "address_postcode": "3002", 7 | "address_state": "Victoria", 8 | "calling_country_code": "61", 9 | "currency": "USD", 10 | "date_of_birth": "1980-01-31", 11 | "first_name": "Peter", 12 | "last_name": "Pan", 13 | "partner_type": "individual", 14 | "phone": "10023456789", 15 | "provider": "myaffiliate", 16 | "residence": "au", 17 | "salutation": "Mr", 18 | "secret_answer": "Jones", 19 | "secret_question": "Mother's maiden name", 20 | "website": "xyz.com" 21 | } 22 | -------------------------------------------------------------------------------- /config/v3/oauth_apps/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "oauth_apps": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/oauth_apps/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "OAuth Applications (request)", 4 | "description": "List all my used OAuth applications.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "oauth_apps" 13 | ], 14 | "properties": { 15 | "oauth_apps": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/p2p_advert_create/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advert_create": 1, 3 | "description": "Please transfer to account number 1234", 4 | "type": "buy", 5 | "amount": 100, 6 | "max_order_amount": 50, 7 | "min_order_amount": 20, 8 | "payment_method": "bank_transfer", 9 | "rate": 4.25 10 | } 11 | -------------------------------------------------------------------------------- /config/v3/p2p_advert_info/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advert_info": 1, 3 | "id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_advert_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advert_list": 1, 3 | "counterparty_type": "buy" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_advert_update/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advert_update": 1, 3 | "id": 1234, 4 | "is_active": 0 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_adverts/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_adverts": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_create/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_create": 1, 3 | "name": "your_name" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_info/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_info": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_list": 1, 3 | "trade_partners": 1 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_payment_methods/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_payment_methods": 1, 3 | "create": [ 4 | { 5 | "account": "1234", 6 | "bank_name": "some_bank", 7 | "method": "bank_transfer" 8 | } 9 | ], 10 | "delete": [ 11 | 101, 12 | 102 13 | ], 14 | "update": { 15 | "103": { 16 | "instructions": "phone first" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_relations/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_relations": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_advertiser_update/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_advertiser_update": 1, 3 | "is_listed": 0 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_chat_create/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_chat_create": 1, 3 | "order_id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_chat_create/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Chat Create (response)", 4 | "description": "Information of the created P2P chat.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "p2p_chat_create": { 12 | "title": "p2p_chat_create", 13 | "description": "Information of the P2P chat.", 14 | "type": "object", 15 | "additionalProperties": false, 16 | "required": [ 17 | "channel_url", 18 | "order_id" 19 | ], 20 | "properties": { 21 | "channel_url": { 22 | "description": "The URL to be used to initialise the chat for the requested order.", 23 | "type": "string" 24 | }, 25 | "order_id": { 26 | "description": "The unique identifier for the order that the chat belongs to.", 27 | "type": "string" 28 | } 29 | } 30 | }, 31 | "echo_req": { 32 | "description": "Echo of the request made.", 33 | "type": "object" 34 | }, 35 | "msg_type": { 36 | "description": "Action name of the request made.", 37 | "type": "string", 38 | "enum": [ 39 | "p2p_chat_create" 40 | ] 41 | }, 42 | "req_id": { 43 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 44 | "type": "integer" 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /config/v3/p2p_chat_create/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Chat Create (request)", 4 | "description": "Creates a P2P chat for the specified order.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_chat_create", 13 | "order_id" 14 | ], 15 | "properties": { 16 | "p2p_chat_create": { 17 | "description": "Must be 1", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "order_id": { 24 | "description": "The unique identifier for the order to create the chat for.", 25 | "type": "string", 26 | "pattern": "^[0-9]{1,18}$" 27 | }, 28 | "loginid": { 29 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 30 | "type": "string", 31 | "pattern": "^[A-Za-z]+[0-9]+$" 32 | }, 33 | "passthrough": { 34 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 35 | "type": "object" 36 | }, 37 | "req_id": { 38 | "description": "[Optional] Used to map request to response.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/p2p_country_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_country_list": 1, 3 | "country": "id" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_country_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Country List (request)", 4 | "description": "List all or specific country and its payment methods.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_country_list" 13 | ], 14 | "properties": { 15 | "p2p_country_list": { 16 | "description": "Must be 1", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "country": { 23 | "description": "[Optional] 2-letter country code. If not provided all countries are returned.", 24 | "type": "string", 25 | "pattern": "^([a-z]{2})?$" 26 | }, 27 | "loginid": { 28 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 29 | "type": "string", 30 | "pattern": "^[A-Za-z]+[0-9]+$" 31 | }, 32 | "passthrough": { 33 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 34 | "type": "object" 35 | }, 36 | "req_id": { 37 | "description": "[Optional] Used to map request to response.", 38 | "type": "integer" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /config/v3/p2p_order_cancel/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_cancel": 1, 3 | "id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_order_cancel/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Order Cancel (response)", 4 | "description": "Result of the P2P order cancellation.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "p2p_order_cancel": { 12 | "description": "Cancellation details", 13 | "type": "object", 14 | "additionalProperties": false, 15 | "required": [ 16 | "id", 17 | "status" 18 | ], 19 | "properties": { 20 | "id": { 21 | "description": "The unique identifier for the order.", 22 | "type": "string" 23 | }, 24 | "status": { 25 | "description": "The new status of the order.", 26 | "type": "string", 27 | "enum": [ 28 | "cancelled" 29 | ] 30 | } 31 | } 32 | }, 33 | "echo_req": { 34 | "description": "Echo of the request made.", 35 | "type": "object" 36 | }, 37 | "msg_type": { 38 | "description": "Action name of the request made.", 39 | "type": "string", 40 | "enum": [ 41 | "p2p_order_cancel" 42 | ] 43 | }, 44 | "req_id": { 45 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 46 | "type": "integer" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /config/v3/p2p_order_cancel/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Order Cancel (request)", 4 | "description": "Cancel a P2P order.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_order_cancel", 13 | "id" 14 | ], 15 | "properties": { 16 | "p2p_order_cancel": { 17 | "description": "Must be 1", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "id": { 24 | "description": "The unique identifier for this order.", 25 | "type": "string", 26 | "pattern": "^[0-9]{1,18}$" 27 | }, 28 | "loginid": { 29 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 30 | "type": "string", 31 | "pattern": "^[A-Za-z]+[0-9]+$" 32 | }, 33 | "passthrough": { 34 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 35 | "type": "object" 36 | }, 37 | "req_id": { 38 | "description": "[Optional] Used to map request to response.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/p2p_order_confirm/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_confirm": 1, 3 | "id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_order_create/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_create": 1, 3 | "advert_id": "1234", 4 | "amount": 100 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/p2p_order_dispute/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_dispute": 1, 3 | "dispute_reason": "seller_not_released", 4 | "id": "1234" 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/p2p_order_info/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_info": 1, 3 | "id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_order_info/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Order Information (request)", 4 | "description": "Retrieves the information about a P2P order.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_order_info", 13 | "id" 14 | ], 15 | "properties": { 16 | "p2p_order_info": { 17 | "description": "Must be 1", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "id": { 24 | "description": "The unique identifier for the order.", 25 | "type": "string", 26 | "pattern": "^[0-9]{1,18}$" 27 | }, 28 | "subscribe": { 29 | "description": "[Optional] If set to 1, will send updates whenever there is an update to order", 30 | "type": "integer", 31 | "enum": [ 32 | 1 33 | ] 34 | }, 35 | "loginid": { 36 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 37 | "type": "string", 38 | "pattern": "^[A-Za-z]+[0-9]+$" 39 | }, 40 | "passthrough": { 41 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 42 | "type": "object" 43 | }, 44 | "req_id": { 45 | "description": "[Optional] Used to map request to response.", 46 | "type": "integer" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /config/v3/p2p_order_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_list": 1, 3 | "advert_id": "1234" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/p2p_order_review/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_order_review": 1, 3 | "order_id": "1234", 4 | "rating": 4, 5 | "recommended": 1 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/p2p_payment_methods/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_payment_methods": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_payment_methods/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Payment Methods (request)", 4 | "description": "List all P2P payment methods.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_payment_methods" 13 | ], 14 | "properties": { 15 | "p2p_payment_methods": { 16 | "description": "Must be 1", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/p2p_ping/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_ping": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_ping/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Ping (response)", 4 | "description": "The response of P2P ping request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "p2p_ping": { 12 | "description": "Will return 'pong'", 13 | "type": "string", 14 | "enum": [ 15 | "pong" 16 | ] 17 | }, 18 | "echo_req": { 19 | "description": "Echo of the request made.", 20 | "type": "object" 21 | }, 22 | "msg_type": { 23 | "description": "Action name of the request made.", 24 | "type": "string", 25 | "enum": [ 26 | "p2p_ping" 27 | ] 28 | }, 29 | "req_id": { 30 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 31 | "type": "integer" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /config/v3/p2p_ping/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Ping (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_ping" 13 | ], 14 | "properties": { 15 | "p2p_ping": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/p2p_settings/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "p2p_settings": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/p2p_settings/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "P2P Settings (request)", 4 | "description": "Request P2P Settings information.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "p2p_settings" 13 | ], 14 | "properties": { 15 | "p2p_settings": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "subscribe": { 23 | "description": "[Optional] If set to `1`, will send updates whenever there is an update to P2P settings.", 24 | "type": "integer", 25 | "enum": [ 26 | 1 27 | ] 28 | }, 29 | "loginid": { 30 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 31 | "type": "string", 32 | "pattern": "^[A-Za-z]+[0-9]+$" 33 | }, 34 | "passthrough": { 35 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 36 | "type": "object" 37 | }, 38 | "req_id": { 39 | "description": "[Optional] Used to map request to response.", 40 | "type": "integer" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /config/v3/partner_account_creation/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "partner_account_creation": 1, 3 | "address_city": "Melbourne", 4 | "address_line_1": "20 Broadway Av", 5 | "address_line_2": "East Melbourne VIC", 6 | "address_postcode": "3002", 7 | "address_state": "Victoria", 8 | "calling_country_code": 971, 9 | "citizen": "au", 10 | "company_name": "Deriv Limited", 11 | "currency": "USD", 12 | "date_of_birth": "1980-01-31", 13 | "email": "test@mailinator.com", 14 | "first_name": "Peter", 15 | "last_name": "Pan", 16 | "partner_type": "individual", 17 | "phone": "23456789", 18 | "provider": "myaffiliate", 19 | "residence": "au", 20 | "salutation": "Mr", 21 | "tnc_acceptance": 1, 22 | "website": "xyz.com" 23 | } 24 | -------------------------------------------------------------------------------- /config/v3/partner_account_creation_status/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "partner_account_creation_status": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/partner_account_creation_status/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Partner Account Creation Status (request)", 4 | "description": "This call polls the state machine and returns the completion status for each step.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "partner_account_creation_status" 13 | ], 14 | "properties": { 15 | "partner_account_creation_status": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. If left unspecified, it defaults to the initial authorized token's login id.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/partner_accounts/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "partner_accounts": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/partner_accounts/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Get Partner Account Details (request)", 4 | "description": "Get All Partner Accounts (Partner account details like website, provider, company details)", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "partner_accounts" 13 | ], 14 | "properties": { 15 | "partner_accounts": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the partner account. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/partner_settings/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "partner_settings": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/partner_settings/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Get Partner-Specific Account Settings (request)", 4 | "description": "Get Partner Settings (Partner Type, Company Details etc)", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "partner_settings" 13 | ], 14 | "properties": { 15 | "partner_settings": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the partner account. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/partner_settings_update/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "partner_settings_update": 1, 3 | "company_name": "XYZ New Corp", 4 | "company_registration_no": "ABC322", 5 | "partner_type": "company", 6 | "provider": "dynamicworks", 7 | "website": "www.newxyz.com" 8 | } 9 | -------------------------------------------------------------------------------- /config/v3/partner_settings_update/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Set Partner Account Settings (response)", 4 | "description": "A message with Partner Settings", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "partner_settings_update": { 12 | "title": "partner_settings_update", 13 | "description": "1 on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "partner_settings_update" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/payment_methods/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "payment_methods": 1, 3 | "country": "id" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/payment_methods/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment Methods (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "payment_methods" 10 | ], 11 | "properties": { 12 | "payment_methods": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "country": { 20 | "description": "[Optional] 2-letter country code (ISO standard).", 21 | "type": "string", 22 | "pattern": "^[a-z]{0,2}$" 23 | }, 24 | "loginid": { 25 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 26 | "type": "string", 27 | "pattern": "^[A-Za-z]+[0-9]+$" 28 | }, 29 | "passthrough": { 30 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 31 | "type": "object" 32 | }, 33 | "req_id": { 34 | "description": "[Optional] Used to map request to response.", 35 | "type": "integer" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/v3/paymentagent_create/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_create": 1, 3 | "affiliate_id": "1231234", 4 | "code_of_conduct_approval": 1, 5 | "commission_deposit": 2, 6 | "commission_withdrawal": 3, 7 | "email": "joe@joy.com", 8 | "information": "The best person you can find", 9 | "payment_agent_name": "Joe Joy", 10 | "phone_numbers": [ 11 | { 12 | "phone_number": "923222313" 13 | } 14 | ], 15 | "supported_payment_methods": [ 16 | { 17 | "payment_method": "MasterCard" 18 | }, 19 | { 20 | "payment_method": "Visa" 21 | } 22 | ], 23 | "urls": [ 24 | { 25 | "url": "https://abc.com" 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /config/v3/paymentagent_create/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment agent create (response)", 4 | "description": "Sets client's payment agent details.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "echo_req": { 12 | "description": "Echo of the request made.", 13 | "type": "object" 14 | }, 15 | "msg_type": { 16 | "description": "Action name of the request made.", 17 | "type": "string", 18 | "enum": [ 19 | "paymentagent_create" 20 | ] 21 | }, 22 | "req_id": { 23 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 24 | "type": "integer" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /config/v3/paymentagent_details/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_details": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/paymentagent_details/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment agent details (request)", 4 | "description": "Gets client's payment agent details.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "paymentagent_details" 13 | ], 14 | "properties": { 15 | "paymentagent_details": { 16 | "description": "Must be 1", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/paymentagent_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_list": "id" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/paymentagent_transfer/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_transfer": 1, 3 | "amount": 1000, 4 | "currency": "USD", 5 | "transfer_to": "CR100001" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/paymentagent_transfer/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment Agent: Transfer (response)", 4 | "description": "The result of transfer request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "paymentagent_transfer": { 12 | "title": "paymentagent_transfer", 13 | "description": "If set to `1`, transfer success. If set to `2`, dry-run success.", 14 | "type": "integer", 15 | "enum": [ 16 | 1, 17 | 2 18 | ] 19 | }, 20 | "client_to_full_name": { 21 | "description": "The `transfer_to` client full name", 22 | "type": "string" 23 | }, 24 | "client_to_loginid": { 25 | "description": "The `transfer_to` client loginid", 26 | "type": "string" 27 | }, 28 | "transaction_id": { 29 | "description": "Reference ID of transfer performed", 30 | "type": "integer" 31 | }, 32 | "echo_req": { 33 | "description": "Echo of the request made.", 34 | "type": "object" 35 | }, 36 | "msg_type": { 37 | "description": "Action name of the request made.", 38 | "type": "string", 39 | "enum": [ 40 | "paymentagent_transfer" 41 | ] 42 | }, 43 | "req_id": { 44 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 45 | "type": "integer" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /config/v3/paymentagent_withdraw/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_withdraw": 1, 3 | "amount": 1000, 4 | "currency": "USD", 5 | "paymentagent_loginid": "CR100001", 6 | "verification_code": "my_verification_code" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/paymentagent_withdraw/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment Agent: Withdraw (response)", 4 | "description": "The result of payment agent withdrawal request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "paymentagent_withdraw": { 12 | "title": "paymentagent_withdraw", 13 | "description": "If set to `1`, withdrawal success. If set to `2`, dry-run success.", 14 | "type": "integer", 15 | "enum": [ 16 | 1, 17 | 2 18 | ] 19 | }, 20 | "paymentagent_name": { 21 | "description": "Payment agent name.", 22 | "type": "string" 23 | }, 24 | "transaction_id": { 25 | "description": "Reference ID of withdrawal performed.", 26 | "type": "integer" 27 | }, 28 | "echo_req": { 29 | "description": "Echo of the request made.", 30 | "type": "object" 31 | }, 32 | "msg_type": { 33 | "description": "Action name of the request made.", 34 | "type": "string", 35 | "enum": [ 36 | "paymentagent_withdraw" 37 | ] 38 | }, 39 | "req_id": { 40 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 41 | "type": "integer" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /config/v3/paymentagent_withdraw_justification/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "paymentagent_withdraw_justification": 1, 3 | "message": "my justification" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/paymentagent_withdraw_justification/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment Agent: Withdraw justification (response)", 4 | "description": "The result of payment agent withdrawal justification request made.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "paymentagent_withdraw_justification": { 12 | "description": "1 on success", 13 | "type": "integer" 14 | }, 15 | "echo_req": { 16 | "description": "Echo of the request made.", 17 | "type": "object" 18 | }, 19 | "msg_type": { 20 | "description": "Action name of the request made.", 21 | "type": "string", 22 | "enum": [ 23 | "paymentagent_withdraw_justification" 24 | ] 25 | }, 26 | "req_id": { 27 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 28 | "type": "integer" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /config/v3/paymentagent_withdraw_justification/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payment Agent: Withdraw justification (request)", 4 | "description": "Provide justification to perform withdrawal using a Payment Agent.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "payments" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "paymentagent_withdraw_justification" 13 | ], 14 | "properties": { 15 | "paymentagent_withdraw_justification": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "message": { 23 | "description": "Reasons for needing to withdraw using a Payment Agent.", 24 | "type": "string", 25 | "maxLength": 500, 26 | "minLength": 1 27 | }, 28 | "loginid": { 29 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 30 | "type": "string", 31 | "pattern": "^[A-Za-z]+[0-9]+$" 32 | }, 33 | "passthrough": { 34 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 35 | "type": "object" 36 | }, 37 | "req_id": { 38 | "description": "[Optional] Used to map request to response.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/payout_currencies/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "payout_currencies": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/payout_currencies/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payout Currencies (response)", 4 | "description": "List of available payout currencies.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "payout_currencies": { 12 | "title": "payout_currencies", 13 | "description": "Available payout currencies. Note: if a user is logged in, only the currency available for the account will be returned.", 14 | "type": "array", 15 | "items": { 16 | "description": "Available payout currency.", 17 | "type": "string", 18 | "examples": [ 19 | "USD" 20 | ] 21 | } 22 | }, 23 | "echo_req": { 24 | "description": "Echo of the request made.", 25 | "type": "object" 26 | }, 27 | "msg_type": { 28 | "description": "Action name of the request made.", 29 | "type": "string", 30 | "enum": [ 31 | "payout_currencies" 32 | ] 33 | }, 34 | "req_id": { 35 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 36 | "type": "integer" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/v3/payout_currencies/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Payout Currencies (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "payout_currencies" 10 | ], 11 | "properties": { 12 | "payout_currencies": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/ping/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "ping": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/ping/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Ping (response)", 4 | "description": "The response of ping request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "ping": { 12 | "title": "ping", 13 | "description": "Will return 'pong'", 14 | "type": "string", 15 | "enum": [ 16 | "pong" 17 | ] 18 | }, 19 | "echo_req": { 20 | "description": "Echo of the request made.", 21 | "type": "object" 22 | }, 23 | "msg_type": { 24 | "description": "Action name of the request made.", 25 | "type": "string", 26 | "enum": [ 27 | "ping" 28 | ] 29 | }, 30 | "req_id": { 31 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 32 | "type": "integer" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /config/v3/ping/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Ping (request)", 4 | "description": "To send the ping request to the server. Mostly used to test the connection or to keep it alive.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "ping" 10 | ], 11 | "properties": { 12 | "ping": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "passthrough": { 20 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 21 | "type": "object" 22 | }, 23 | "req_id": { 24 | "description": "[Optional] Used to map request to response.", 25 | "type": "integer" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /config/v3/portfolio/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "portfolio": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/profit_table/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "profit_table": 1, 3 | "description": 1, 4 | "limit": 25, 5 | "offset": 25, 6 | "sort": "ASC" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/proposal/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "proposal": 1, 3 | "amount": 100, 4 | "barrier": "+0.1", 5 | "basis": "payout", 6 | "contract_type": "CALL", 7 | "currency": "USD", 8 | "duration": 60, 9 | "duration_unit": "s", 10 | "symbol": "R_100" 11 | } 12 | -------------------------------------------------------------------------------- /config/v3/proposal_open_contract/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "proposal_open_contract": 1, 3 | "contract_id": 11111111, 4 | "subscribe": 1 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/reality_check/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "reality_check": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/reality_check/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Reality Check (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read", 9 | "trading_information" 10 | ], 11 | "additionalProperties": false, 12 | "required": [ 13 | "reality_check" 14 | ], 15 | "properties": { 16 | "reality_check": { 17 | "description": "Must be `1`", 18 | "type": "integer", 19 | "enum": [ 20 | 1 21 | ] 22 | }, 23 | "loginid": { 24 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 25 | "type": "string", 26 | "pattern": "^[A-Za-z]+[0-9]+$" 27 | }, 28 | "passthrough": { 29 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 30 | "type": "object" 31 | }, 32 | "req_id": { 33 | "description": "[Optional] Used to map request to response.", 34 | "type": "integer" 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /config/v3/residence_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "residence_list": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/revoke_oauth_app/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "revoke_oauth_app": 1234 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/revoke_oauth_app/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Revoke Oauth Application (response)", 4 | "description": "A message with revoking a used application", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "revoke_oauth_app": { 12 | "title": "revoke_oauth_app", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "revoke_oauth_app" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/revoke_oauth_app/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Revoke Oauth Application (request)", 4 | "description": "Used for revoking access of particular app.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "revoke_oauth_app" 13 | ], 14 | "properties": { 15 | "revoke_oauth_app": { 16 | "description": "The application ID to revoke.", 17 | "type": "integer" 18 | }, 19 | "loginid": { 20 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 21 | "type": "string", 22 | "pattern": "^[A-Za-z]+[0-9]+$" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/sell/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "sell": 11542203588, 3 | "price": 500 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/sell/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Sell Contract (request)", 4 | "description": "Sell a Contract as identified from a previous `portfolio` call.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "trade" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "sell", 13 | "price" 14 | ], 15 | "properties": { 16 | "sell": { 17 | "description": "Pass contract_id received from the `portfolio` call.", 18 | "type": "integer" 19 | }, 20 | "price": { 21 | "description": "Minimum price at which to sell the contract, or `0` for 'sell at market'.", 22 | "type": "number" 23 | }, 24 | "loginid": { 25 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 26 | "type": "string", 27 | "pattern": "^[A-Za-z]+[0-9]+$" 28 | }, 29 | "passthrough": { 30 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 31 | "type": "object" 32 | }, 33 | "req_id": { 34 | "description": "[Optional] Used to map request to response.", 35 | "type": "integer" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/v3/sell_contract_for_multiple_accounts/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "sell_contract_for_multiple_accounts": 1, 3 | "price": 500, 4 | "shortcode": "CALL_R_50_5_1488181433_1488181553_S0P_0", 5 | "tokens": [ 6 | "FrvservuIFEf1", 7 | "JUBibibkebiuwbeCNEc" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /config/v3/sell_expired/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "sell_expired": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/sell_expired/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Sell Expired Contracts (response)", 4 | "description": "The result of sell expired contract", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "sell_expired": { 12 | "title": "sell_expired", 13 | "description": "Sell expired contract object containing count of contracts sold", 14 | "type": "object", 15 | "additionalProperties": false, 16 | "properties": { 17 | "count": { 18 | "description": "The number of contracts that has been sold.", 19 | "type": "integer", 20 | "examples": [ 21 | 10 22 | ] 23 | } 24 | } 25 | }, 26 | "echo_req": { 27 | "description": "Echo of the request made.", 28 | "type": "object" 29 | }, 30 | "msg_type": { 31 | "description": "Action name of the request made.", 32 | "type": "string", 33 | "enum": [ 34 | "sell_expired" 35 | ] 36 | }, 37 | "req_id": { 38 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 39 | "type": "integer" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /config/v3/sell_expired/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Sell Expired Contracts (request)", 4 | "description": "This call will try to sell any expired contracts and return the number of sold contracts.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "trade" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "sell_expired" 13 | ], 14 | "properties": { 15 | "sell_expired": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/set_account_currency/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "set_account_currency": "USD" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/set_account_currency/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Set Account Currency (response)", 4 | "description": "Status of set account currency call", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "set_account_currency": { 12 | "title": "set_account_currency", 13 | "description": "`1`: success, `0`: no change", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "set_account_currency" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/set_account_currency/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Set Account Currency (request)", 4 | "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.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "set_account_currency" 13 | ], 14 | "properties": { 15 | "set_account_currency": { 16 | "description": "Currency of the account. List of supported currencies can be acquired with `payout_currencies` call.", 17 | "type": "string", 18 | "pattern": "^[a-zA-Z0-9]{2,20}$" 19 | }, 20 | "loginid": { 21 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 22 | "type": "string", 23 | "pattern": "^[A-Za-z]+[0-9]+$" 24 | }, 25 | "passthrough": { 26 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 27 | "type": "object" 28 | }, 29 | "req_id": { 30 | "description": "[Optional] Used to map request to response.", 31 | "type": "integer" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /config/v3/set_self_exclusion/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "set_self_exclusion": 1, 3 | "exclude_until": "2020-01-01", 4 | "max_30day_deposit": 1000, 5 | "max_30day_losses": 100000, 6 | "max_30day_turnover": 1000, 7 | "max_7day_deposit": 100, 8 | "max_7day_losses": 100000, 9 | "max_7day_turnover": 1000, 10 | "max_deposit": 10, 11 | "max_losses": 100000, 12 | "max_turnover": 1000, 13 | "session_duration_limit": 3600, 14 | "timeout_until": 1497357184 15 | } 16 | -------------------------------------------------------------------------------- /config/v3/set_self_exclusion/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Set Self-Exclusion (response)", 4 | "description": "A message with User Self-Exclusion", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "set_self_exclusion": { 12 | "title": "set_self_exclusion", 13 | "description": "`1` on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "set_self_exclusion" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/set_settings/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "set_settings": 1, 3 | "account_opening_reason": "Speculative", 4 | "address_city": "Test City", 5 | "address_line_1": "Test Address Line 1", 6 | "address_line_2": "Test Address Line 2", 7 | "address_postcode": "123456", 8 | "allow_copiers": 1, 9 | "calling_country_code": "154", 10 | "email_consent": 0, 11 | "employment_status": "Employed", 12 | "phone": "17543010", 13 | "place_of_birth": "ar", 14 | "preferred_language": "EN", 15 | "request_professional_status": 1, 16 | "tax_identification_number": "987654321", 17 | "tax_residence": "hk", 18 | "tin_skipped": 0 19 | } 20 | -------------------------------------------------------------------------------- /config/v3/set_settings/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Set Account Settings (response)", 4 | "description": "A message with User Settings", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "set_settings": { 12 | "title": "set_settings", 13 | "description": "1 on success", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "set_settings" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/statement/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "statement": 1, 3 | "description": 1, 4 | "limit": 100, 5 | "offset": 25 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/states_list/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "states_list": "id" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/states_list/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "States List (response)", 4 | "description": "A message with States List", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "states_list": { 12 | "title": "states_list", 13 | "description": "List of states.", 14 | "type": "array", 15 | "items": { 16 | "type": "object", 17 | "additionalProperties": false, 18 | "properties": { 19 | "text": { 20 | "description": "The state name.", 21 | "type": "string" 22 | }, 23 | "value": { 24 | "description": "The state code.", 25 | "type": "string" 26 | } 27 | } 28 | } 29 | }, 30 | "echo_req": { 31 | "description": "Echo of the request made.", 32 | "type": "object" 33 | }, 34 | "msg_type": { 35 | "description": "Action name of the request made.", 36 | "type": "string", 37 | "enum": [ 38 | "states_list" 39 | ] 40 | }, 41 | "req_id": { 42 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 43 | "type": "integer" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /config/v3/states_list/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "States List (request)", 4 | "description": "For a given country, returns a list of States of that country. This is useful to populate the account opening form.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "states_list" 10 | ], 11 | "properties": { 12 | "states_list": { 13 | "title": "States list", 14 | "description": "Client's 2-letter country code (obtained from `residence_list` call)", 15 | "type": "string", 16 | "pattern": "^\\w\\w$" 17 | }, 18 | "passthrough": { 19 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 20 | "type": "object" 21 | }, 22 | "req_id": { 23 | "description": "[Optional] Used to map request to response.", 24 | "type": "integer" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /config/v3/ticks/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticks": "R_50", 3 | "subscribe": 1 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/ticks/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Ticks Stream (request)", 4 | "description": "Initiate a continuous stream of spot price updates for a given symbol.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "ticks" 10 | ], 11 | "properties": { 12 | "ticks": { 13 | "description": "The short symbol name or array of symbols (obtained from `active_symbols` call).", 14 | "oneOf": [ 15 | { 16 | "type": "string", 17 | "pattern": "^\\w{2,30}$" 18 | }, 19 | { 20 | "type": "array", 21 | "items": { 22 | "type": "string", 23 | "pattern": "^\\w{2,30}$" 24 | } 25 | } 26 | ] 27 | }, 28 | "subscribe": { 29 | "description": "[Optional] If set to 1, will send updates whenever a new tick is received.", 30 | "type": "integer", 31 | "enum": [ 32 | 1 33 | ] 34 | }, 35 | "passthrough": { 36 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 37 | "type": "object" 38 | }, 39 | "req_id": { 40 | "description": "[Optional] Used to map request to response.", 41 | "type": "integer" 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /config/v3/ticks_batch/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticks_batch": 1, 3 | "market": "forex", 4 | "subscribe": 1 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/ticks_batch/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Ticks Batch Stream (request)", 4 | "description": "Initiate a continuous stream of spot price updates for a group symbols.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "ticks_batch", 10 | "market" 11 | ], 12 | "properties": { 13 | "ticks_batch": { 14 | "description": "Must be `1`", 15 | "type": "integer", 16 | "enum": [ 17 | 1 18 | ] 19 | }, 20 | "market": { 21 | "description": "The short market name.", 22 | "type": "string", 23 | "enum": [ 24 | "forex", 25 | "indices", 26 | "commodities", 27 | "stocks", 28 | "cryptocurrency", 29 | "synthetic_index" 30 | ] 31 | }, 32 | "subscribe": { 33 | "description": "[Optional] If set to 1, will send updates in batches by market.", 34 | "type": "integer", 35 | "enum": [ 36 | 1 37 | ] 38 | }, 39 | "passthrough": { 40 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 41 | "type": "object" 42 | }, 43 | "req_id": { 44 | "description": "[Optional] Used to map request to response.", 45 | "type": "integer" 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /config/v3/ticks_history/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "ticks_history": "R_50", 3 | "adjust_start_time": 1, 4 | "count": 10, 5 | "end": "latest", 6 | "start": 1, 7 | "style": "ticks" 8 | } 9 | -------------------------------------------------------------------------------- /config/v3/time/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "time": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/time/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Server Time (response)", 4 | "description": "The result of server time request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "time": { 12 | "title": "time", 13 | "description": "Epoch of server time.", 14 | "type": "integer" 15 | }, 16 | "echo_req": { 17 | "description": "Echo of the request made.", 18 | "type": "object" 19 | }, 20 | "msg_type": { 21 | "description": "Action name of the request made.", 22 | "type": "string", 23 | "enum": [ 24 | "time" 25 | ] 26 | }, 27 | "req_id": { 28 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 29 | "type": "integer" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/v3/time/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Server Time (request)", 4 | "description": "Request back-end server epoch time.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "time" 10 | ], 11 | "properties": { 12 | "time": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "passthrough": { 20 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 21 | "type": "object" 22 | }, 23 | "req_id": { 24 | "description": "[Optional] Used to map request to response.", 25 | "type": "integer" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /config/v3/tin_validations/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "tin_validations": 1, 3 | "tax_residence": "ke" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/tin_validations/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Tax Identification Number Validations (request)", 4 | "description": "Get the validations for Tax Identification Numbers (TIN)", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "tin_validations", 10 | "tax_residence" 11 | ], 12 | "properties": { 13 | "tin_validations": { 14 | "description": "Must be `1`", 15 | "type": "integer", 16 | "enum": [ 17 | 1 18 | ] 19 | }, 20 | "tax_residence": { 21 | "description": "The tax residence selected by the client.", 22 | "type": "string" 23 | }, 24 | "passthrough": { 25 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 26 | "type": "object" 27 | }, 28 | "req_id": { 29 | "description": "[Optional] Used to map request to response.", 30 | "type": "integer" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /config/v3/tnc_approval/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "tnc_approval": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/tnc_approval/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Terms and Conditions Approval (response)", 4 | "description": "The result of T&C approval request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "tnc_approval": { 12 | "title": "tnc_approval", 13 | "description": "Set terms and conditions 1: success", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "echo_req": { 20 | "description": "Echo of the request made.", 21 | "type": "object" 22 | }, 23 | "msg_type": { 24 | "description": "Action name of the request made.", 25 | "type": "string", 26 | "enum": [ 27 | "tnc_approval" 28 | ] 29 | }, 30 | "req_id": { 31 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 32 | "type": "integer" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /config/v3/tnc_approval/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Terms and Conditions Approval (request)", 4 | "description": "To approve the latest version of terms and conditions.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "admin" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "tnc_approval" 13 | ], 14 | "properties": { 15 | "tnc_approval": { 16 | "description": "Must be `1`", 17 | "type": "number", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/topup_virtual/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "topup_virtual": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/topup_virtual/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Top Up Virtual-Money Account (response)", 4 | "description": "The result of virtual money top up", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "topup_virtual": { 12 | "title": "topup_virtual", 13 | "description": "The information regarding a successful top up for a virtual money account", 14 | "type": "object", 15 | "additionalProperties": false, 16 | "properties": { 17 | "amount": { 18 | "description": "Top up amount", 19 | "type": "number" 20 | }, 21 | "currency": { 22 | "description": "Top up currency string", 23 | "type": "string" 24 | } 25 | } 26 | }, 27 | "echo_req": { 28 | "description": "Echo of the request made.", 29 | "type": "object" 30 | }, 31 | "msg_type": { 32 | "description": "Action name of the request made.", 33 | "type": "string", 34 | "enum": [ 35 | "topup_virtual" 36 | ] 37 | }, 38 | "req_id": { 39 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 40 | "type": "integer" 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /config/v3/topup_virtual/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Top Up Virtual-Money Account (request)", 4 | "description": "When a virtual-money's account balance becomes low, it can be topped up using this call.", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "trade" 9 | ], 10 | "additionalProperties": false, 11 | "required": [ 12 | "topup_virtual" 13 | ], 14 | "properties": { 15 | "topup_virtual": { 16 | "description": "Must be `1`", 17 | "type": "integer", 18 | "enum": [ 19 | 1 20 | ] 21 | }, 22 | "loginid": { 23 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 24 | "type": "string", 25 | "pattern": "^[A-Za-z]+[0-9]+$" 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/trading_durations/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_durations": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/trading_platform_investor_password_reset/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_platform_investor_password_reset": 1, 3 | "account_id": "MTR1000", 4 | "new_password": "InvestPwd123@!", 5 | "platform": "mt5", 6 | "verification_code": "abCD0199" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/trading_platform_investor_password_reset/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Trading Platform: Investor Password Reset (response)", 4 | "description": "The result of the Trading Platform investor password reset.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "trading_platform_password_reset": { 12 | "title": "trading_platform_investor_password_reset", 13 | "description": "If set to 1, the investor password has been reset.", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "trading_platform_investor_password_reset" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/trading_platform_password_reset/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_platform_password_reset": 1, 3 | "new_password": "C0rrect_p4ssword", 4 | "platform": "dxtrade", 5 | "verification_code": "abCD0199" 6 | } 7 | -------------------------------------------------------------------------------- /config/v3/trading_platform_password_reset/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Trading Platform: Password Reset (response)", 4 | "description": "The result of the Trading Platform password reset.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "trading_platform_password_reset": { 12 | "title": "trading_platform_password_reset", 13 | "description": "If set to 1, the password has been reset.", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "trading_platform_password_reset" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/trading_platform_status/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_platform_status": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/trading_platform_status/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Trading Platform Status (request)", 4 | "description": "Request trading platform status", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "trading_platform_status" 10 | ], 11 | "properties": { 12 | "trading_platform_status": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "passthrough": { 20 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 21 | "type": "object" 22 | }, 23 | "req_id": { 24 | "description": "[Optional] Used to map request to response.", 25 | "type": "integer" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /config/v3/trading_servers/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_servers": 1, 3 | "platform": "mt5" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/trading_times/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "trading_times": "2015-09-14" 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/trading_times/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Trading Times (request)", 4 | "description": "Receive a list of market opening times for a given date.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "trading_times" 10 | ], 11 | "properties": { 12 | "trading_times": { 13 | "description": "Date to receive market opening times for. (`yyyy-mm-dd` format. `today` can also be specified).", 14 | "type": "string", 15 | "pattern": "^([0-9]{4}-[0-9]{1,2}-[0-9]{1,2}|today)$" 16 | }, 17 | "passthrough": { 18 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 19 | "type": "object" 20 | }, 21 | "req_id": { 22 | "description": "[Optional] Used to map request to response.", 23 | "type": "integer" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /config/v3/transaction/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "transaction": 1, 3 | "subscribe": 1 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/transaction/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Transactions Stream (request)", 4 | "description": "Subscribe to transaction notifications", 5 | "type": "object", 6 | "auth_required": 1, 7 | "auth_scopes": [ 8 | "read", 9 | "trading_information" 10 | ], 11 | "additionalProperties": false, 12 | "required": [ 13 | "transaction", 14 | "subscribe" 15 | ], 16 | "properties": { 17 | "transaction": { 18 | "description": "Must be `1`", 19 | "type": "integer", 20 | "enum": [ 21 | 1 22 | ] 23 | }, 24 | "subscribe": { 25 | "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.", 26 | "type": "integer", 27 | "enum": [ 28 | 1 29 | ] 30 | }, 31 | "loginid": { 32 | "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", 33 | "type": "string", 34 | "pattern": "^[A-Za-z]+[0-9]+$" 35 | }, 36 | "passthrough": { 37 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 38 | "type": "object" 39 | }, 40 | "req_id": { 41 | "description": "[Optional] Used to map request to response.", 42 | "type": "integer" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /config/v3/transfer_between_accounts/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "transfer_between_accounts": 1, 3 | "account_from": "MLT100", 4 | "account_to": "MF100", 5 | "amount": 1000, 6 | "currency": "EUR" 7 | } 8 | -------------------------------------------------------------------------------- /config/v3/unsubscribe_email/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "unsubscribe_email": 1, 3 | "binary_user_id": "90000216", 4 | "checksum": "93917bec9d69a81e47987d6c4c0c7168456e86a12e1d66e2cd75e477258b86e4" 5 | } 6 | -------------------------------------------------------------------------------- /config/v3/unsubscribe_email/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Unsubscribe Email (response)", 4 | "description": "The result of the unsubscribe email request.", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "binary_user_id": { 12 | "description": "Customer User ID.", 13 | "type": "number" 14 | }, 15 | "email_unsubscribe_status": { 16 | "title": "Email Unsubscription Status", 17 | "description": "`1`: email notification unsubscribed sucssesfully, `0`: failed to unsubscribed email notification", 18 | "type": "integer", 19 | "enum": [ 20 | 0, 21 | 1 22 | ] 23 | }, 24 | "echo_req": { 25 | "description": "Echo of the request made.", 26 | "type": "object" 27 | }, 28 | "msg_type": { 29 | "description": "Action name of the request made.", 30 | "type": "string", 31 | "enum": [ 32 | "unsubscribe_email" 33 | ] 34 | }, 35 | "req_id": { 36 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 37 | "type": "integer" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /config/v3/unsubscribe_email/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Unsubscribe Email (request)", 4 | "description": "It unsubscribe user from the email subscription.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "unsubscribe_email", 10 | "binary_user_id", 11 | "checksum" 12 | ], 13 | "properties": { 14 | "unsubscribe_email": { 15 | "description": "Must be `1`", 16 | "type": "integer", 17 | "enum": [ 18 | 1 19 | ] 20 | }, 21 | "binary_user_id": { 22 | "description": "Customer User ID.", 23 | "type": "number" 24 | }, 25 | "checksum": { 26 | "description": "The generated checksum for the customer.", 27 | "type": "string" 28 | }, 29 | "passthrough": { 30 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 31 | "type": "object" 32 | }, 33 | "req_id": { 34 | "description": "[Optional] Used to map request to response.", 35 | "type": "integer" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/v3/verify_email/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "verify_email": "test@mailinator.com", 3 | "type": "account_opening" 4 | } 5 | -------------------------------------------------------------------------------- /config/v3/verify_email/receive.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Verify Email (response)", 4 | "description": "Verify Email Receive", 5 | "type": "object", 6 | "required": [ 7 | "echo_req", 8 | "msg_type" 9 | ], 10 | "properties": { 11 | "verify_email": { 12 | "title": "verify_email", 13 | "description": "1 for success (secure code has been sent to the email address)", 14 | "type": "integer", 15 | "enum": [ 16 | 0, 17 | 1 18 | ] 19 | }, 20 | "echo_req": { 21 | "description": "Echo of the request made.", 22 | "type": "object" 23 | }, 24 | "msg_type": { 25 | "description": "Action name of the request made.", 26 | "type": "string", 27 | "enum": [ 28 | "verify_email" 29 | ] 30 | }, 31 | "req_id": { 32 | "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /config/v3/website_config/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "website_config": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/website_config/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Server Config (request)", 4 | "description": "Request server config.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "website_config" 10 | ], 11 | "properties": { 12 | "website_config": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "passthrough": { 20 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 21 | "type": "object" 22 | }, 23 | "req_id": { 24 | "description": "[Optional] Used to map request to response.", 25 | "type": "integer" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /config/v3/website_status/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "website_status": 1 3 | } 4 | -------------------------------------------------------------------------------- /config/v3/website_status/send.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Server Status (request)", 4 | "description": "Request server status.", 5 | "type": "object", 6 | "auth_required": 0, 7 | "additionalProperties": false, 8 | "required": [ 9 | "website_status" 10 | ], 11 | "properties": { 12 | "website_status": { 13 | "description": "Must be `1`", 14 | "type": "integer", 15 | "enum": [ 16 | 1 17 | ] 18 | }, 19 | "subscribe": { 20 | "description": "[Optional] `1` to stream the server/website status updates.", 21 | "type": "integer", 22 | "enum": [ 23 | 0, 24 | 1 25 | ] 26 | }, 27 | "passthrough": { 28 | "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", 29 | "type": "object" 30 | }, 31 | "req_id": { 32 | "description": "[Optional] Used to map request to response.", 33 | "type": "integer" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /css/all-hallows-eve.css: -------------------------------------------------------------------------------- 1 | /** 2 | * All Hallows Eve theme 3 | * 4 | * Adapted from Ultraviolet RubyGem 5 | * 6 | * @author Flinn Mueller 7 | * @version 1.0.1 8 | */ 9 | pre { 10 | background: #000; 11 | word-wrap: break-word; 12 | margin: 0px; 13 | padding: 10px; 14 | color: #fff; 15 | font-size: 14px; 16 | margin-bottom: 20px; 17 | } 18 | 19 | pre, code { 20 | font-family: 'Monaco', courier, monospace; 21 | } 22 | 23 | pre .comment { 24 | color: #9933CC; 25 | } 26 | 27 | pre .constant { 28 | color: #3387CC; 29 | } 30 | 31 | pre .storage { 32 | color: #CC7833; 33 | } 34 | 35 | pre .string { 36 | color: #66CC33; 37 | } 38 | 39 | pre .keyword, pre .selector { 40 | color: #CC7833; 41 | } 42 | 43 | pre .inherited-class { 44 | font-style: italic; 45 | } 46 | 47 | pre .support { 48 | color: #C83730; 49 | } 50 | -------------------------------------------------------------------------------- /css/blackboard.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Blackboard theme 3 | * 4 | * Adapted from Domenico Carbotta's TextMate theme of the same name 5 | * 6 | * @author Domenico Carbotta 7 | * @author Craig Campbell 8 | * @version 1.0.2 9 | */ 10 | pre { 11 | background: #0B1022; 12 | word-wrap: break-word; 13 | margin: 0px; 14 | padding: 10px; 15 | color: #fff; 16 | font-size: 14px; 17 | margin-bottom: 20px; 18 | } 19 | 20 | pre, code { 21 | font-family: 'Monaco', courier, monospace; 22 | } 23 | 24 | pre .comment { 25 | color: #727272; 26 | } 27 | 28 | pre .constant { 29 | color: #D8FA3C; 30 | } 31 | 32 | pre .storage { 33 | color: #FBDE2D; 34 | } 35 | 36 | pre .string, pre .comment.docstring { 37 | color: #61CE3C; 38 | } 39 | 40 | pre .string.regexp, pre .support.tag.script, pre .support.tag.style { 41 | color: #fff; 42 | } 43 | 44 | pre .keyword, pre .selector { 45 | color: #FBDE2D; 46 | } 47 | 48 | pre .inherited-class { 49 | font-style: italic; 50 | } 51 | 52 | pre .entity { 53 | color: #FF6400; 54 | } 55 | 56 | pre .support, *[data-language="c"] .function.call { 57 | color: #8DA6CE; 58 | } 59 | 60 | pre .variable.global, pre .variable.class, pre .variable.instance { 61 | color: #FF6400; 62 | } 63 | -------------------------------------------------------------------------------- /css/monokai.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Monokai theme 3 | * 4 | * Adapted from Wimer Hazenberg's TextMate theme of the same name 5 | * 6 | * @author Wimer Hazenberg 7 | * @author Michael Fasani 8 | * @author Craig Campbell 9 | * @version 1.0.0 10 | */ 11 | pre { 12 | background: #272822; 13 | word-wrap: break-word; 14 | margin: 0px; 15 | padding: 10px; 16 | color: #fff; 17 | font-size: 14px; 18 | margin-bottom: 20px; 19 | } 20 | 21 | pre, code { 22 | font-family: 'Monaco', courier, monospace; 23 | } 24 | 25 | pre .comment { 26 | color: #75715E; 27 | } 28 | 29 | pre .constant { 30 | color: #AE81FF; 31 | } 32 | 33 | pre .storage { 34 | color: #66D9EF; 35 | } 36 | 37 | pre .string, pre .comment.docstring { 38 | color: #E6DB74; 39 | } 40 | 41 | pre .support.tag { 42 | color: #fff; 43 | } 44 | 45 | pre .keyword { 46 | /* @todo some keywords use this light blue, most use the pink */ 47 | /*color: #66D9EF;*/ 48 | color: #F92672; 49 | } 50 | 51 | pre .selector { 52 | color: #F92672; 53 | } 54 | 55 | pre .inherited-class { 56 | font-style: italic; 57 | } 58 | 59 | pre .operator, pre .support.tag-name , pre .entity.tag { 60 | color: #F92672; 61 | } 62 | 63 | pre .entity, pre .support.attribute, pre .entity.attribute { 64 | color: #A6E22E; 65 | } 66 | 67 | pre .support, *[data-language="c"] .function.call { 68 | color: #66D9EF; 69 | } 70 | 71 | *[data-language="html"] .support.operator { 72 | color: #fff; 73 | } 74 | 75 | pre .css-property, pre .storage.function { 76 | font-style: italic; 77 | } 78 | 79 | pre .variable.global, pre .variable.class, pre .variable.instance { 80 | color: #A6E22E; 81 | } 82 | -------------------------------------------------------------------------------- /css/obsidian.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Obsidian theme 3 | * 4 | * Adapted from a theme based on: 5 | * http://studiostyl.es/schemes/son-of-obsidian 6 | * 7 | * @author Dan Stewart 8 | * @version 1.0 9 | */ 10 | pre { 11 | background: #22282A; 12 | word-wrap: break-word; 13 | margin: 0px; 14 | padding: 10px; 15 | color: #F1F2F3; 16 | font-size: 14px; 17 | margin-bottom: 20px; 18 | } 19 | 20 | pre, code { 21 | font-family: 'Monaco', courier, monospace; 22 | } 23 | 24 | pre .comment { 25 | color: #66747B; 26 | } 27 | 28 | pre .constant { 29 | color: #EC7600; 30 | } 31 | 32 | pre .storage { 33 | color: #EC7600; 34 | } 35 | 36 | pre .string, pre .comment.docstring { 37 | color: #EC7600; 38 | } 39 | 40 | pre .string.regexp, pre .support.tag.script, pre .support.tag.style { 41 | color: #fff; 42 | } 43 | 44 | 45 | pre .keyword, pre .selector { 46 | color: #93C763; 47 | } 48 | 49 | pre .inherited-class { 50 | font-style: italic; 51 | } 52 | 53 | pre .entity { 54 | color: #93C763; 55 | } 56 | 57 | pre .integer { 58 | color: #FFCD22; 59 | } 60 | 61 | pre .support, *[data-language="csharp"] .function.call { 62 | color: #FACD22; 63 | } 64 | 65 | pre .variable.global, pre .variable.class, pre .variable.instance { 66 | color: #CCC; 67 | } 68 | 69 | /* C# specific rule */ 70 | pre .preprocessor { 71 | color: #66747B; 72 | } 73 | -------------------------------------------------------------------------------- /css/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Tomorrow Night theme 3 | * 4 | * @author Chris Kempson 5 | * @author skim 6 | * @version 1.0.0 7 | */ 8 | pre { 9 | background-color: #1d1f21; 10 | word-wrap: break-word; 11 | margin: 0px; 12 | padding: 10px; 13 | color: #c5c8c6; 14 | font-size: 14px; 15 | margin-bottom: 20px; 16 | } 17 | 18 | pre, code { 19 | font-family: 'Monaco', courier, monospace; 20 | } 21 | 22 | pre .comment { 23 | color: #969896; 24 | } 25 | 26 | pre .variable.global, pre .variable.class, pre .variable.instance { 27 | color: #cc6666; /* red */ 28 | } 29 | 30 | pre .constant.numeric, pre .constant.language, pre .constant.hex-color, pre .keyword.unit { 31 | color: #de935f; /* orange */ 32 | } 33 | 34 | pre .constant, pre .entity, pre .entity.class, pre .support { 35 | color: #f0c674; /* yellow */ 36 | } 37 | 38 | pre .constant.symbol, pre .string { 39 | color: #b5bd68; /* green */ 40 | } 41 | 42 | pre .entity.function, pre .support.css-property, pre .selector { 43 | color: #81a2be; /* blue */ 44 | } 45 | 46 | pre .keyword, pre .storage { 47 | color: #b294bb; /* purple */ 48 | } 49 | -------------------------------------------------------------------------------- /css/tricolore.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Tricolore theme 3 | * 4 | * @author Jean Nicolas 5 | * @version 1.0.1 6 | */ 7 | pre { 8 | background: #FFF; 9 | word-wrap: break-word; 10 | margin: 0px; 11 | padding: 10px; 12 | color: #000; 13 | font-size: 12px; 14 | margin-bottom: 20px; 15 | line-height: 16px; 16 | } 17 | 18 | pre, code { 19 | font-family: 'Monaco', 'Consolas', monospace; 20 | } 21 | 22 | pre .comment { 23 | color: #7E7E7E; 24 | font-style: italic; 25 | } 26 | 27 | pre .constant { 28 | color: #18838A; 29 | font-weight: bold; 30 | } 31 | 32 | pre .storage { 33 | color: #0000A1; 34 | } 35 | 36 | pre .string { 37 | color: #8E0022; 38 | } 39 | 40 | pre .keyword, pre .selector { 41 | color: #0000A1; 42 | font-weight: bold; 43 | } 44 | 45 | pre .inherited-class { 46 | font-style: italic; 47 | } 48 | 49 | pre .entity { 50 | color: #3E853F; 51 | } 52 | 53 | pre .support { 54 | color: #192140; 55 | } 56 | 57 | pre .variable.global, pre .variable.class, pre .variable.instance { 58 | color: #3E853F; 59 | } 60 | -------------------------------------------------------------------------------- /developers.com.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | add_header Cache-Control "public, max-age=7200, s-maxage=600, must-revalidate"; 6 | charset UTF-8; 7 | 8 | error_page 404 /404.html; 9 | 10 | location @custom_error_503 { 11 | return 503; 12 | } 13 | 14 | location ~ /\.git { 15 | return 404; 16 | } 17 | 18 | location / { 19 | root /usr/share/nginx/html; 20 | index index.html index.htm; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 |

Welcome to the Binary.com API

6 | 7 |

The Binary.com API allows developers to build applications and trading interfaces that interact with our Binary.com system.

8 | 9 |

The API allows for most of the read and write methods that you will need to support your application. If you have uses or needs that are not currently supported by the API, visit our dev forum and let us know!

10 | 11 |

Starting with the API is easy:

12 | 13 | 19 | 20 |

We also provide a high-level API library to help you use our service easier.
Get binary-live-api from GitHub!

21 | 22 |

Have more questions?

23 |

24 | Visit dev forum or email api-support@binary.com 25 |

26 | -------------------------------------------------------------------------------- /lib/language/lua.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Lua patterns 3 | * 4 | * @author Javier Aguirre 5 | * @version 1.0.1 6 | */ 7 | Rainbow.extend('lua', [ 8 | { 9 | 'matches': { 10 | 1: { 11 | 'name': 'keyword.operator', 12 | 'pattern': /\=/g 13 | }, 14 | 2: { 15 | 'name': 'string', 16 | 'matches': { 17 | 'name': 'constant.character.escape', 18 | 'pattern': /\\('|"){1}/g 19 | } 20 | } 21 | }, 22 | 'pattern': /(\(|\s|\[|\=)(('|")([^\\\1]|\\.)*?(\3))/gm 23 | }, 24 | { 25 | 'name': 'comment', 26 | 'pattern': /\-{2}\[{2}\-{2}[\s\S]*?\-{2}\]{2}\-{2}|(\-{2})[\s\S]*?$/gm 27 | }, 28 | { 29 | 'name': 'constant.numeric', 30 | 'pattern': /\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi 31 | }, 32 | { 33 | 'matches': { 34 | 1: 'keyword' 35 | }, 36 | 'pattern': /\b((a|e)nd|in|repeat|break|local|return|do|for|then|else(if)?|function|not|if|or|until|while)(?=\(|\b)/gi 37 | }, 38 | { 39 | 'name': 'constant.language', 40 | 'pattern': /true|false|nil/g 41 | }, 42 | { 43 | 'name': 'keyword.operator', 44 | 'pattern': /\+|\!|\-|&(gt|lt|amp);|\||\*|\=|#|\.{2}/g 45 | }, 46 | { 47 | 'matches': { 48 | 1: 'storage.function', 49 | 2: 'entity.name.function' 50 | }, 51 | 'pattern': /(function)\s+(\w+[\:|\.]?\w+?)(?=\()/g 52 | }, 53 | { 54 | 'matches': { 55 | 1: 'support.function' 56 | }, 57 | 'pattern': /\b(print|require|module|\w+\.\w+)(?=\()/g 58 | } 59 | ], true); 60 | -------------------------------------------------------------------------------- /lib/language/shell.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Shell patterns 3 | * 4 | * @author Matthew King 5 | * @author Craig Campbell 6 | * @version 1.0.3 7 | */ 8 | Rainbow.extend('shell', [ 9 | /** 10 | * This handles the case where subshells contain quotes. 11 | * For example: `"$(resolve_link "$name" || true)"`. 12 | * 13 | * Caveat: This really should match balanced parentheses, but cannot. 14 | * @see http://stackoverflow.com/questions/133601/can-regular-expressions-be-used-to-match-nested-patterns 15 | */ 16 | { 17 | 'name': 'shell', 18 | 'matches': { 19 | 1: { 20 | 'language': 'shell' 21 | } 22 | }, 23 | 'pattern': /\$\(([\s\S]*?)\)/gm 24 | }, 25 | { 26 | 'matches': { 27 | 2: 'string' 28 | }, 29 | 'pattern': /(\(|\s|\[|\=)(('|")[\s\S]*?(\3))/gm 30 | }, 31 | { 32 | 'name': 'keyword.operator', 33 | 'pattern': /<|>|&/g 34 | }, 35 | { 36 | 'name': 'comment', 37 | 'pattern': /\#[\s\S]*?$/gm 38 | }, 39 | { 40 | 'name': 'storage.function', 41 | 'pattern': /(.+?)(?=\(\)\s{0,}\{)/g 42 | }, 43 | /** 44 | * Environment variables 45 | */ 46 | { 47 | 'name': 'support.command', 48 | 'pattern': /\b(echo|rm|ls|(mk|rm)dir|cd|find|cp|exit|pwd|exec|trap|source|shift|unset)/g 49 | }, 50 | { 51 | 'matches': { 52 | 1: 'keyword' 53 | }, 54 | 'pattern': /\b(break|case|continue|do|done|elif|else|esac|eval|export|fi|for|function|if|in|local|return|set|then|unset|until|while)(?=\(|\b)/g 55 | } 56 | ], true); 57 | -------------------------------------------------------------------------------- /lib/language/smalltalk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Smalltalk patterns 3 | * 4 | * @author Frank Shearar 5 | * @version 1.0 6 | */ 7 | Rainbow.extend('smalltalk', [ 8 | { 9 | 'name': 'keyword.pseudovariable', 10 | 'pattern': /self|thisContext/g 11 | }, 12 | { 13 | 'name': 'keyword.constant', 14 | 'pattern': /false|nil|true/g 15 | }, 16 | { 17 | 'name': 'string', 18 | 'pattern': /'([^']|'')*'/g 19 | }, 20 | { 21 | 'name': 'string.symbol', 22 | 'pattern': /#\w+|#'([^']|'')*'/g 23 | }, 24 | { 25 | 'name': 'string.character', 26 | 'pattern': /\$\w+/g 27 | }, 28 | { 29 | 'name': 'comment', 30 | 'pattern': /"([^"]|"")*"/g 31 | }, 32 | { 33 | 'name': 'constant.numeric', 34 | 'pattern': /-?\d+(\.\d+)?((r-?|s)[A-Za-z0-9]+|e-?[0-9]+)?/g 35 | }, 36 | { 37 | 'name': 'entity.name.class', 38 | 'pattern': /\b[A-Z]\w*/g 39 | }, 40 | { 41 | 'name': 'entity.name.function', 42 | 'pattern': /\b[a-z]\w*:?/g 43 | }, 44 | { 45 | 'name': 'entity.name.binary', 46 | 'pattern': /(<|>|&|[=~\|\\\/!@*\-_+])+/g 47 | }, 48 | { 49 | 'name': 'operator.delimiter', 50 | 'pattern': /;[\(\)\[\]\{\}]|#\[|#\(^\./g 51 | } 52 | ], true); 53 | --------------------------------------------------------------------------------