Trading Platforms (MT4, MT5) Integration
Create Trading Platform Account
This guide explains how to use the Create_TP_Account_Json API endpoint to create a new trading platform (TP) account for an existing client in the Hyper ERP/CRM system.This function requires a POST request with a JSON payload and proper Bearer token authentication.
Request Body
The request must be sent with a `Content-Type: application/json` header. The JSON payload must contain the client's ID and their specific API password.| Parameter | Type | Description |
|---|---|---|
| ClientNumber | Integer |
Required. The unique ID of the client. This is the client's [hyp_Clients].[Client Number] .
|
| API_Password | String | Required. The client-specific API password. This password is provided by the system and is stored in the client's website extension record. |
{
"ClientNumber":500014,
"API_Password":"S0wUqUWvujCf"
}
Successful Response (HTTP 200)
A successful response will return a ResponseCode of 0 and an `account` object containing the details of the newly created trading platform account.The `account` object is based on the
[hyp_TPM Account Status]
table and includes the following fields:
| Field | Type | Description |
|---|---|---|
| Account Login | Integer | The new unique Login ID for the trading platform. |
| Data Source | String | The identifier for the trading data source (e.g., "R1"). |
| Platform | String | The name of the trading platform (e.g., "MT5"). |
| Status | String | The initial status of the account. ENUM: 'Unknown', 'Closed', 'Readonly', 'Active'. |
| Group | String | The trading group the account was assigned to. |
| Currency | String | The base currency of the trading account, by the group (e.g., "USD"). |
| Balance | Money | The initial balance of the account (typically 0.00). |
{
"ResponseCode":0,
"ResponseMsgEng":"Success",
"account":{
"AccountLogin":636400,
"DataSource":"R1",
"Platform":"MT4",
"Status":2,
"Group":"Basic_IL2",
"Currency":"USD",
"Balance":0.00
}
}
Error Responses
Account Already Exists (HTTP 200)
If a trading account already exists for this client, the API will return a ResponseCode of 1 and include the details of the existing account.
{
"ResponseCode":1,
"ResponseMsgEng":"TP account is already exist",
"account":{
"AccountLogin":55521,
"DataSource":"R1",
"Platform":"MT4",
"Status":3,
"Group":"Basic_IL2",
"Currency":"USD",
"Balance":18270.84
}
}
Bad Request / Server Errors
These errors occur for invalid input or internal server issues.
// HTTP 401 Unauthorized
{
"ResponseCode": 99,
"ResponseMsgEng": "Missing / Wrong Access Token"
}
// HTTP 401 Unauthorized (implied)
{
"ResponseCode": 11,
"ResponseMsgEng": "Incorrect API_Password"
}
// HTTP 400 Bad Request
// (e.g., missing JSON body, invalid ClientNumber)
{
"ResponseCode": 14,
"ResponseMsgEng": "Bad or missing input data."
}
// HTTP 500 Internal Server Error
// (e.g., failed to load client data from DB)
{
"ResponseCode": 4,
"ResponseMsgEng": "Internal server error."
}
// HTTP 500 Internal Server Error
// (The trading platform itself did not respond in time)
{
"ResponseCode": 5,
"ResponseMsgEng": "Timeout with no Answer from the Trading System"
}
Deposit of Fiat by Credit card or Bank Transfer
Use the function MT4_Deposit_Fiat_Json to Create a New Receipt doc + JE + Balance order to the MT4.There is no option to update or delete this action !
Here is an example for function input, then we explain all fields:
//===// Request
{
"ClientNumber":500155,
"API_Password":"eBt5yJD3uc12",
"Ticket_ID":"{F454E096-D080-40FD-A36B-156F4B999124}",
"BankEnum":1,
"MethodEnum":1,
"Currency":"ILS",
"Amount":3500,
"USD_ConvertRate":3.2,
"Time_Stamp":"2026-01-21 08:00:00",
"End_user_IP":"82.81.138.8"
}
//===// Response
{
"ResponseCode":0,
"ResponseMsgEng":"Success",
"Receipt_Num":1234
}
| Field | Data Type | Description |
|---|---|---|
| ClientNumber | Integer | Hyper client account number (starting from 500,000). |
| API_Password | String | Every account has it's own password. |
| Ticket_ID | String | 3rd party system unique ID, string GUID upto 50 chars. |
| BankEnum | Integer |
Bank account or credit card Row Number from Hyper's table.
Get updated table from "CC_Banking" object returned by the
Direct_Client_Entity_Json function.
מותג אשראי לא חשוב לנו כי התזרים שלכם זהה לכולם. אבל אם יום אחד יהיה חוזה אחר אז המותג מהטבלה הזאת קובע את יום התזרים. |
| MethodEnum | Integer |
1 = Credit Card
2 = Bank Transfer 7 = Bit / Paybox etc |
| Currency | String | Credit card debit Currency on client's side. Like ILS or USD etc. |
| Amount | Real number | Credit card debit Amount on client's side. |
| USD_ConvertRate | Real number | USD/ILS rate from Your bank! When the deposit is in USD, pass the value: 1. |
| Time_Stamp | Date + Time |
UTC value when the credit card transaction was made (does not have to be accurate).
Empty value will make hyper to use current time. |
| End_user_IP | String | We need the end (human) client IP address, in which the credit card form was submitted. |
| Voucher_Number | Integer | כאשר אתם תסלקו דרך שירות חיצוני. אני צריך את המספר להתאמות אשראי ותיעוד. |
Withdrawal of Fiat by Credit card or Bank Transfer
Use the function MT4_Withdrawal_Fiat_Json to Create a New Refund doc + JE + Balance order to the MT4.There is no option to update or delete this action !
זה אותו פורמט כמו מסמך קבלה - אבל אתעד לכם אחרי אישור בפגישה הקרובה