CRM Open API DocumentationCRM Open API Documentation
REST API
Webhooks
PSP Open API
External Exchange Rates
REST API
Webhooks
PSP Open API
External Exchange Rates
  • REST API Introduction
  • Authentication
  • Authentication V2
  • Clients API

    • Get List of Client
    • Get Client Information
    • Get Client Registration Details
    • Get Client KYC Details
    • Validate User's Credentials
    • Create Client
    • Get Uplines Information of client
    • Get Downlines Information of client
  • Leads API

    • Create Lead
  • Trading Servers Connections API

    • Get CRM Trading Platform Connections
  • MT4 API

    • Get MT4 Connection Information
    • Get MT4 Accounts
    • Create MT4 Account
    • Deposit into MT4 Account
    • Withdraw from MT4 Account
    • Get MT4 Trades
  • MT5 API

    • Get MT5 Connection Information
    • Get MT5 Accounts
    • Create MT5 Account
  • cTrader API

    • Get cTrader Connection Information
    • Get cTrader Accounts
  • Reports API

    • Get Fixed Commission Report
    • Get Flexible Commission Report
    • Get Transactions Report
  • Wallets API

    • Get Wallet Information
    • Update Wallet Balance
    • Get Update Wallet Balance Order status
  • Payments API

    • Get All Bankcards
  • Trading Competitions API

    • Get Trading Competition Leader Board
  • Requests API

    • Approve Withdrawal Requests
    • Reject Withdrawal Requests
  • Accounts API

    • Send Registration Request for OTP
    • Send Multi-Step Registration Request for Approval
  • Configurations API

    • Get Countries
    • Get States
    • Get Cities
  • Forms API

    • Get Trader Registration Form
    • Get User Kyc Form Collections
    • Get User Kyc Form
    • Get AWS S3 signature
  • TradingAccounts API

    • Get CRM Trading Account Types
  • Annex

    • Language Codes

Authentication

This section is critical, authentication is REQUIRED for accessing every open APIs.

Create API Key

  1. Navigate to CRM Back Office - Settings - Dev Space - Open API Keys Page
  2. Create an API Key

Note:

API Key will only display one time after creation. Please copy and save your API Key into a secure location. If you lose your API key, please delete and create another.

Warning

For data security, please ensure that the API key is kept safely.

Key Authentication

Requesting every API in this documentation requires authentication via the above API key. Please attach the API key as a http header of the request.

HTTP Headervalue
keyAPI Key created from CRM

Signature

Any POST/PATCH/PUT API that contains a request body will need to sign the request and provide the signature as a HTTP header.

HTTP Headervalue
signaturecalculated using the algorithm below

Signature Algorithm

  1. Set the request or return data as set M, and sort the parameters of non-empty parameter values in the set M according to the ASCII code of the parameter name from smallest to largest (dictionary order), using the URL key-value pair format (ie key1=value1&key2=value2... ) It is spliced into a string (String A).
  2. After the character transferred, splice API Key to obtain the string to be encrypted (StringB), perform SHA-1 operation on StringB, transfer the obtained value as a hexadecimal string, and finally convert all characters of the obtained string to uppercase to obtain the signature.

Note

The encrypted set M is all the parameters of the request, including fields with empty values. However, it is recommended to exclude empty fields in the request body first.

Sample JavaScript code to obtain the signature

js
let query = Object.keys(data)
   .sort()
   .reduce((result, key) => result + key + '=' + data[key] + '&', "")
   .slice(0, -1);

let sign = crypto.createHash('sha1').update(query + key).digest('hex').toUpperCase();
python
query = '&'.join([f"{key}={data[key]}" for key in sorted(data)])

sign = hashlib.sha1((query + key).encode('utf-8')).hexdigest().upper()

Error Codes

HTTP CodeError TypeDescription
403invalid_api_keyAPI key is not exist or invalid
403invalid_signatureSignature does not match
Last Updated:: 10/16/24, 7:13 AM
Prev
REST API Introduction
Next
Authentication V2