Introduction
The Platform API provides comprehensive access to the core functionalities of our trading platform, allowing users to execute and manage trades, access market data, and perform all actions on the platform directly through code. This API is designed to empower developers and traders by offering programmatic control over trading operations, enabling the automation of tasks, integration with other systems, and the development of custom trading solutions.
The API is RESTful and uses standard HTTP methods, making it straightforward to integrate into your existing workflows. Whether you’re automating trading strategies, building custom dashboards, or enhancing your trading systems, the Platform API provides the flexibility and power you need to achieve your goals efficiently.
What made this section unhelpful for you?
Base URL
Sandbox:
https://mtr-demo-prod.match-trader.com
Register
This API request is designed to create a new user account within the trading platform. By sending a POST request to the provided endpoint, you can register a user with specific credentials and associate them with a particular trading offer and partner.
When executing this request, you must provide key details such as the offerId
that your broker provided, which links the new account to a specific trading offer, the user's email
, and the password
for authentication. Additionally, the partnerId
helps categorize the user under a specific partner, ensuring proper organization within the system is also taken from the broker.
This endpoint is essential for onboarding new users, allowing them to quickly and efficiently access the trading platform under predefined conditions. Ensure that all required fields are accurately populated to avoid errors during the account creation process.
Header Parameters
Body Parameters
cannot be null
cannot be null
cannot be null, minimum 8 characters
cannot be null
optional id of parent account
YYYY-MM-DD format
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"token": "string"
}
Login
This API request logs a user into the platform and returns authentication tokens.
Upon a successful login, the response JSON contains critical information for subsequent API requests. Below is a breakdown of the key elements and how to use them:
Key Elements:
Header Parameters
Body Parameters
This parameter can be obtained directly from your broker.
Responses
Response Attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
What made this section unhelpful for you?
Response
{
"email": "",
"token": "",
"tradingAccounts": [
{
"tradingAccountId": "",
"offer": {
"uuid": "",
"partnerId": "",
"created": "",
"name": "",
"currency": "USD",
"description": "",
"initialDeposit": 10000,
"demo": false,
"hidden": false,
"branch": {
"uuid": ""
},
"system": {
"demo": false,
"name": "",
"uuid": "",
"active": false,
"systemType": "",
"tradingApiDomain": ""
},
"moneyManager": null,
"leverage": 100,
"verificationRequired": false,
"recordNumber": 7,
"mt5MamSystemType": null,
"offerType": ""
},
"tradingApiToken": "",
"tradingAccountToken": {
"token": "",
"expiration": "2024-09-14T03:47:13.384368Z"
},
"branchUuid": "",
"created": "",
"uuid": ""
}
],
"selectedTradingAccount": {
"tradingAccountId": "",
"offer": {
"uuid": "",
"partnerId": "",
"created": "",
"name": "",
"currency": "USD",
"description": "",
"initialDeposit": 10000,
"demo": false,
"hidden": true,
"branch": {
"uuid": ""
},
"system": {
"demo": false,
"name": "",
"uuid": "",
"active": true,
"systemType": "",
"tradingApiDomain": ""
},
"moneyManager": null,
"leverage": 100,
"verificationRequired": false,
"recordNumber": 7,
"mt5MamSystemType": null,
"offerType": ""
},
"tradingApiToken": "",
"tradingAccountToken": {
"token": "",
"expiration": "2024-09-14T03:47:13.384368Z"
},
"branchUuid": "",
"created": "2024-09-13T03:46:20.878Z",
"uuid": "",
"group": "",
"leverage": 100,
"isRetail": true,
"isProView": false
},
"accountInfo": {
"uuid": "",
"email": "",
"name": "",
"surname": "",
"dateOfBirth": null,
"phone": "",
"address": "",
"city": "",
"postCode": "",
"country": "",
"status": "NEW",
"branchUuid": "",
"partnerId": "",
"bankAddress": "",
"bankSwiftCode": "",
"bankAccount": "",
"bankName": "",
"state": "",
"role": "ROLE_USER",
"accountName": "",
"faxNumber": "",
"passportIdNumber": "",
"passportIdCountry": "",
"taxIdentificationNumber": "",
"citizenship": "",
"maritalStatus": "",
"guestAccount": false
},
"accessMode": "CLIENT",
"tfaProperties": {
"enabled": true,
"required": false
},
"tfaConfig": {
"isEnabledForSignIn": false
}
}
Refresh token
The Refresh Token request is used to renew an authentication token
initially received from the Login with One-Time Token request. By sending a POST
request with the current token as a query parameter, users can obtain a new token to maintain their session without needing to log in again. This ensures continued access to the platform without interruption, especially when the token is nearing expiration.
Header Parameters
Query Parameters
Responses
What made this section unhelpful for you?
Response
Login with one time token
The Login with One-Time Token request allows users to log in using a token
obtained from the Register request. Instead of traditional credentials, this method uses a single-use token for authentication. By sending a POST
request with the token in the payload, users can securely log in to the platform. This method is typically used when a temporary or quick login process is required.
Header Parameters
Body Parameters
Responses
Response Attributes
Show child attributes
What made this section unhelpful for you?
Response
{
"email": "",
"token": "",
"accounts": [
{
"tradingAccountId": "",
"offer": {
"uuid": "",
"partnerId": "0",
"created": "2023-12-17T11:06:41.917915Z",
"name": "",
"currency": "USD",
"description": "",
"initialDeposit": null,
"demo": true,
"hidden": true,
"branch": {
"uuid": ""
},
"system": {
"demo": false,
"name": "",
"uuid": "",
"active": true,
"systemType": "",
"tradingApiDomain": ""
},
"moneyManager": null,
"displayMMInLeaderboard": false,
"leverage": 100,
"verificationRequired": false,
"tradingAccountAutoCreation": true,
"recordNumber": null,
"mt5MamSystemType": null,
"offerRedirect": "NONE",
"qfxOfferProperties": null
},
"tradingApiToken": "",
"branchUuid": "",
"created": "",
"uuid": ""
}
]
}
Get Platform Details
The endpoint returns details about the trading platform associated with the authenticated user.
Header Parameters
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"partnerId": "0",
"platformUrl": "https://mtr-demo-prod.match-trader.com",
"brokerName": "Match-Trader Demo"
}
Market Watch
The Market Watch request retrieves the latest price of a specific trading symbol by sending a GET request. The request requires the systemUUID
, the tradingApiToken
, and the tradingAccountToken
(obtained from the login response) for secure access. By specifying the symbol in the query parameter, the API returns real-time market quotations for that symbol, allowing users to monitor current prices and make trading decisions.
Header Parameters
tradingApiToken
tradingAccountToken.token
Query Parameters
Here you past which symbol would you like to get
Responses
Response Attributes
What made this section unhelpful for you?
Response
[
{
"symbol": "EURUSD",
"alias": "EURUSD",
"bid": "1.10873",
"ask": "1.10877",
"change": "0.07",
"high": "1.10901",
"low": "1.10775",
"timestampSec": 1726200032,
"timestampMs": 1726200032067
}
]
Get balance
This request retrieves the user's current account balance on the Match-Trader platform. By sending a GET request to the balance endpoint with the required systemUUID
, tradingApiToken
, and tradingAccountToken
, the API provides real-time information about the user's available funds. The response includes details such as the total balance, equity, and any reserved margin, allowing users to monitor their account's financial status.
Header Parameters
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"balance": "10000.00",
"equity": "10000.00",
"freeMargin": "10000.00",
"marginLevel": "0",
"credit": "0.00",
"currency": "USD",
"margin": "0.00",
"profit": "0",
"netProfit": "0",
"currencyPrecision": 2
}
Position
In the Position section, you will find comprehensive information about the various positions held within the system. This section allows you to view, manage, and interact with trading positions efficiently. Here, you can explore details of opened positions, modify them, and initiate actions such as closing or partially closing positions. It serves as a central hub for managing positions throughout their lifecycle, from creation to closure.
A Position refers to a financial stake in a market instrument that a trader opens to speculate on price movements. Users can open positions based on their market analysis, and each position reflects the user’s exposure to an asset at a specific time.
Order
In the Order section, you will find detailed information and tools to manage various trading orders within the system. This section allows you to create, monitor, modify, and cancel pending orders, providing full control over your order management process. The Order section acts as a centralized hub for handling all aspects of order activity.
An Order represents an instruction to buy or sell a financial asset at specific conditions, such as price and quantity. Users can place pending orders, which remain open until the market conditions are met or the order is manually canceled.
Errors
In this section, you can find examples of error responses for each status code. Successful responses are available in the relevant sections of this documentation.
Responses
Response Attributes
What made this section unhelpful for you?
Response