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.
What made this section unhelpful for you?
Get opened positions
This request retrieves all currently open trading positions, sends a GET
request to the open-positions
endpoint using the systemUUID
, tradingApiToken
, and tradingAccountToken
for authentication. The response provides details of each open position, including the position ID, trading symbol (e.g., "EURUSD"), volume, side (BUY/SELL), open price, stop-loss, take-profit levels, current price, and profit/loss information. This is essential for monitoring active trades and managing open positions.
Header Parameters
Responses
Response Attributes
Show child attributes
What made this section unhelpful for you?
Response
{
"positions": [
{
"id": "W6910422326264457",
"symbol": "EURUSD",
"alias": "EURUSD",
"volume": 0.01,
"side": "BUY",
"openTime": "2024-07-13T04:30:35",
"openTimeMillis": 1720845035000,
"openPrice": 1.10866,
"stopLoss": null,
"takeProfit": null,
"trailingDistance": null,
"swap": null,
"profit": -0.06,
"netProfit": -0.06,
"currentPrice": 1.1086,
"commission": null,
"positions": [
{
"id": "W6910422326264457",
"symbol": "EURUSD",
"alias": "EURUSD",
"volume": "0.01",
"oldPartialVolume": null,
"side": "BUY",
"openTime": "2024-07-13T04:30:35",
"openPrice": "1.10866",
"swap": "0.00",
"profit": "-0.06",
"netProfit": "-0.06",
"currentPrice": "1.10860",
"commission": "0.00"
}
]
}
]
}
Open position
This request is used to open a new trading position. By sending a POST
request with details such as the trading instrument (e.g., "EURUSD"), the order side (BUY or SELL), and the volume (lot size), the API places a new order. Optional parameters like stop-loss (slPrice
) and take-profit (tpPrice
) can also be set (for positions without SL or TP you need to provide 0 value for those fields). The request requires the systemUUID
, tradingApiToken
, and tradingAccountToken
for authentication. Upon success, the response returns a status of "OK"
and the orderId
for the newly opened position.
Header Parameters
Body Parameters
symbol
cannot be null (request 0 value)
cannot be null (request 0 value)
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"status": "OK",
"nativeCode": null,
"errorMessage": "",
"orderId": "W6910422926264484"
}
Edit position
This request allows you to modify an existing trading position. By providing the instrument
(e.g., "EURUSD"), orderId
, and details such as the orderSide
, volume
, and new stop-loss (slPrice
) and take-profit (tpPrice
) values, you can adjust the parameters of an open position. Authentication is handled with the tradingApiToken
and tradingAccountToken
. A successful response indicates that the position was updated, with a status of "OK"
and the updated orderId
.
Header Parameters
Body Parameters
cannot be null (request 0 value)
cannot be null (request 0 value)
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"status": "OK",
"nativeCode": null,
"errorMessage": "",
"orderId": "W168933563011635"
}
Partial Close
This request is used to partially close an existing trading position on the platform. By providing the positionId
, the volume
to close, and details like the instrument (e.g., "EURUSD") and order side (BUY or SELL), you can reduce the size of an open position. Authentication is managed via the systemUUID
, tradingApiToken
, and tradingAccountToken
.
Header Parameters
Body Parameters
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"status": "OK",
"nativeCode": null,
"errorMessage": "",
"orderId": "W6910422926265144"
}
Close positions
This request is used to close an existing trading position on the platform. By providing the positionId
, trading instrument (e.g., "EURUSD"), the order side (BUY or SELL), and the volume to close, the API will process the position closure. Authentication is handled via the systemUUID
, tradingApiToken
, and tradingAccountToken
. A successful response will return a status of "OK"
, confirming that the position has been closed successfully.
Header Parameters
Body Parameters
Responses
Response Attributes
What made this section unhelpful for you?
Response
{
"status": "OK",
"nativeCode": null,
"errorMessage": null,
"orderId": null
}
Get closed positions
This request retrieves the user's closed positions for a specific data range on the platform. By sending a POST
request to the closed-positions
endpoint with the required systemUUID
, data range from
and to
tradingApiToken
, and tradingAccountToken
, the API provides information about the user's closed positions. The response includes details such as the total time of opening position, open price, symbol, volume, time of closing position, profit, and more, allowing users to monitor their closed positions.
Header Parameters
Body Parameters
start date
end date
Responses
Response Attributes
Show child attributes
What made this section unhelpful for you?
Response
{
"operations": [
{
"openTime": "2024-07-13T05:14:27.934",
"openPrice": "1.10832",
"symbol": "EURUSD",
"alias": "EURUSD",
"id": "W6903422126225137",
"volume": "0.01",
"stopLoss": "0.00000",
"takeProfit": "0.00000",
"time": "2024-07-13T05:16:14.19",
"closePrice": "1.10825",
"commission": "0.00",
"swap": "0.00",
"profit": "-0.07",
"side": "BUY",
"netProfit": "-0.07",
"uid": "W6903422126225137_1725696134192224825",
"closingOrderID": "W69034223254228132",
"closeReason": "CLOSE_REASON_PARTIAL"
},
{
"openTime": "2024-07-13T05:14:27.934",
"openPrice": "1.10832",
"symbol": "EURUSD",
"alias": "EURUSD",
"id": "W6903422116265137",
"volume": "0.03",
"stopLoss": "0.00000",
"takeProfit": "0.00000",
"time": "2024-07-13T05:15:44.008",
"closePrice": "1.10828",
"commission": "0.00",
"swap": "0.00",
"profit": "-0.12",
"side": "BUY",
"netProfit": "-0.12",
"uid": "W6903422116265137_1725696134192069704",
"closingOrderID": "W6904422112785161",
"closeReason": "CLOSE_REASON_PARTIAL"
}
]
}
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