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.

The request limit is 500 requests/minute.

Was this section helpful?

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

Acceptstring
Content-Typestring

Body Parameters

offerIdstring

cannot be null

emailstring

cannot be null

passwordstring

cannot be null, minimum 8 characters

partnerIdstring

cannot be null

namestring
countrystring
parentTradingAccountUuidstring

optional id of parent account

surnamestring
dateOfBirthstring

YYYY-MM-DD format

phonestring
citystring
postCodestring
addressstring
statestring

Responses

200
Object

Response Attributes

tokenstring
Was this section helpful?

What made this section unhelpful for you?

POST

/manager/user

Select
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 curl --location 'https://mtr-demo-prod.match-trader.com/manager/user' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "offerId": "", "email": "", "password": "", "partnerId": "", "name": "", "country": "", "parentTradingAccountUuid": "", "surname": "", "dateOfBirth": "", "phone": "", "city": "", "postCode": "", "address": "", "state": "" }'

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:

tradingApiToken: This token is required to authenticate further actions with the trading API. Use this token in the header Auth-trading-api for all subsequent trading-related API requests.

token: This token is used as a cookie in subsequent requests to maintain the session state. This token is passed as a Cookie in further API requests to maintain session authenticity.

Header Parameters

Content-Typestring Required

Body Parameters

emailstring Required
passwordstring Required
brokerIdstring Required

This parameter can be obtained directly from your broker.

Responses

200
Object

Response Attributes

emailstring
tokenstring
tradingAccountsarray

Show child attributes

selectedTradingAccountobject

Show child attributes

accountInfoobject

Show child attributes

accessModestring
tfaPropertiesobject

Show child attributes

tfaConfigobject

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

POST

/mtr-backend/login

Select
1 2 3 4 5 6 7 curl --location 'https://mtr-demo-prod.match-trader.com/mtr-backend/login' \ --header 'Content-Type: application/json' \ --data '{ "email": "", "password": "", "brokerId": "" }'

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

Acceptstring
Content-Typestring

Query Parameters

rtstring Required

Responses

200
Object
Was this section helpful?

What made this section unhelpful for you?

POST

/manager/refresh-token?rt={token}

Select
1 2 3 curl --location --globoff --request POST 'https://mtr-demo-prod.match-trader.com/manager/refresh-token?rt={token}' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'

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

Acceptstring Required
Content-Typestring Required

Body Parameters

tokenstring Required

Responses

200
Object

Response Attributes

emailstring
tokenstring
accountsarray

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

POST

/manager/login/co/with-token

Select
1 2 3 4 5 6 curl --location 'https://mtr-demo-prod.match-trader.com/manager/login/co/with-token' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "token": "{token}" }'

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

Acceptstring Required
Auth-trading-apistring Required
Cookiestring Required

Responses

200
Object

Response Attributes

partnerIdstring
platformUrlstring
brokerNamestring
Was this section helpful?

What made this section unhelpful for you?

GET

/manager/platform-details

Select
1 2 3 4 curl --location 'https://mtr-demo-prod.match-trader.com/manager/platform-details' \ --header 'Accept: application/json' \ --header 'Auth-trading-api: {tradingApiToken}' \ --header 'Cookie: co-auth={token}' \

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

Auth-trading-apistring Required

tradingApiToken

Cookiestring Required

tradingAccountToken.token

Query Parameters

symbolsstring Required

Here you past which symbol would you like to get

Responses

200
Object

Response Attributes

symbolstring
aliasstring
bidstring
askstring
changestring
highstring
lowstring
timestampSecnumber
timestampMsnumber
Was this section helpful?

What made this section unhelpful for you?

GET

/mtr-api/SYSTEM_UUID/quotations?symbols=

Select
1 2 3 curl --location 'https://mtr-demo-prod.match-trader.com/mtr-api/SYSTEM_UUID/quotations?symbols=' \ --header 'Auth-trading-api: {tradingApiToken}' \ --header 'Cookie: co-auth={token}' \

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

Acceptstring Required
Auth-trading-apistring Required
Cookiestring Required

Responses

200
Object

Response Attributes

balancestring
equitystring
freeMarginstring
marginLevelstring
creditstring
currencystring
marginstring
profitstring
netProfitstring
currencyPrecisionnumber
Was this section helpful?

What made this section unhelpful for you?

GET

/mtr-api/SYSTEM_UUID/balance

Select
1 2 3 4 curl --location 'https://mtr-demo-prod.match-trader.com/mtr-api/SYSTEM_UUID/balance' \ --header 'Accept: application/json' \ --header 'Auth-trading-api: {tradingApiToken}' \ --header 'Cookie: co-auth={token}' \

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

400
Object
401
Object
Unauthorized

Response Attributes

statusnumber
titlestring
detailstring
pathstring
timestampstring
410
Object
Gone
Was this section helpful?

What made this section unhelpful for you?

Response