# How to integrate Match-Trader

This instruction describes how to create a platform and product that are required for enabling Match-Trader via the Back Office, as well as how to create Match-Trader trading accounts for your clients.

For managing live and demo trading accounts, it is required to configure two separate platforms and products.

{% hint style="info" %}
Before you start configuring Match-Trader platforms and products in the Back Office, make sure that a connection to Match-Trader has already been set up by your account manager who is assigned the permissions to manage external connections.
{% endhint %}

## How to create a platform for Match-Trader

To create a platform for Match-Trader:

{% stepper %}
{% step %}
Navigate to **Products** > **Platforms**.
{% endstep %}

{% step %}
Click the **Create** in the upper-right page corner, and then select **MatchTrader** in the dropdown.
{% endstep %}

{% step %}
In the **Create platform** popup, fill in the following fields:

* In the **Name** field, enter a name that you want to use for the platform.
* In the **Caption** field, enter a caption that will be applied to the platform in the Back Office (such as **MatchTrader** or **MatchTrader Demo**).
* In the **Available connection providers** dropdown, select **MatchTrader**.
* In the **Connection** dropdown, select **MatchTrader**.
  {% endstep %}

{% step %}
Click **Save** to proceed.
{% endstep %}

{% step %}
On the **Edit platform** page, specify the following settings:

* In the **Short caption** field, you can optionally specify a short platform name.
* If you configure a demo platform for Match-Trader, select **Yes** in the **Demo** dropdown; otherwise, make sure that **No** is selected.
* In the **Status** dropdown, select **Enabled**.
  {% endstep %}

{% step %}
Click **Test connection** to validate the connection settings.

The checkmark displayed on the **Test connection** button indicates that the connection has been configured properly.
{% endstep %}

{% step %}
After the connection settings have been successfully validated, click **Save**.
{% endstep %}
{% endstepper %}

## How to create a product for Match-Trader

To create a product for Match-Trader:

{% stepper %}
{% step %}
Navigate to **Products** > **Products**.
{% endstep %}

{% step %}
Click **Create** in the upper-right page corner, and then select:

* **MatchTrader** — if you create a product for managing live accounts
* **MatchTrader Demo** — if you create a product for managing demo accounts
  {% endstep %}

{% step %}
In the **Create product** popup, fill in the following fields:

* In the **Platform Group** dropdown, select **Fiat**.
* In the **Currency** dropdown, select one or more currencies that you want to enable for the product.
* In the **Name** field, enter a name that you want to use for the product.
* In the **Group** dropdown, select the appropriate group that has been previously configured in **Products** > **Groups**.
* In the **Type** dropdown, select:
  * **Trade** — if you create a product for managing live accounts
  * **Demo** — if you create a product for managing demo accounts
    {% endstep %}

{% step %}
Click **Save** to proceed.
{% endstep %}

{% step %}
On the **Edit product** page, specify the following product settings:

* In the **Rights** and **Default account rights** dropdowns, select the required permissions that will be applied to the product (such as `Enabled`, `Visible`, `Trade enabled`, `Transfer deposit`, and `Transfer withdraw`).
* In the **Max accounts** field, enter an integer value to define the maximum number of accounts that clients can create when using this product.
  * To set no limit on the number of accounts, specify **-1**.
  * To forbid clients to create accounts, specify **0**.
* In the **Start amount** field, specify the amount that will be automatically deposited to demo trading accounts upon their opening.
* In the **Auto creation on login** dropdown, select either of the two values:
  * **Yes** — to automatically create trading accounts based on the product settings for all clients upon their first sign in to the B2CORE UI.
  * **No** — to create trading accounts manually.
* In the **Status** dropdown, select **Enabled**.
* If you want to enable additional currencies for the product, add them on the **Currencies** tab.

You may also want to configure the other product settings available on the **Edit product** page.
{% endstep %}

{% step %}
Click **Save** to create the product.
{% endstep %}
{% endstepper %}

All settings changes made on the **Edit product** page will directly impact how the product is displayed and functions in the B2CORE UI for clients.

## How to create Match-Trader accounts for clients

To create a Match-Trade trading account for a client via the Back Office:

{% stepper %}
{% step %}
Navigate to **Clients** > **Accounts**.
{% endstep %}

{% step %}
Click **+Create** in the upper-right page corner, and then select a client for whom you want to create the account.
{% endstep %}

{% step %}
On the **Create account** page, specify the following settings:

* In the **Product group** dropdown, select **Fiat**.
* In the **Product** dropdown, select:
  * **MatchTrader** — to create a live trading account.
  * **MatchTrader Demo** — to create a demo account.
* In the **Currency** dropdown, select a currency in which the account must be denominated.
* In the **Leverage** dropdown, select a leverage ratio to be assigned to the account.
  {% endstep %}

{% step %}
To create an account in B2CORE using the trading account that already exists on the Match-Trade platform, select the option **Create account that already exists on external platform**, and then specify the existing Match-Trader account number in the **External account number** field.
{% endstep %}

{% step %}
Click **Save** to create the account.
{% endstep %}
{% endstepper %}

The created Match-Trader account is available to the client upon navigating to **Platforms** > **MatchTrader** in the B2CORE UI.

To start trading on the Match-Trader platform, deposit or transfer funds to the newly created Match-Trader account. This can be done by the admin via the Back Office (for details, refer to [How to create a deposit](https://docs.b2core.b2broker.com/how-to-articles/manage-finances/how-to-create-a-deposit), [How to create a transfer](https://docs.b2core.b2broker.com/how-to-articles/manage-finances/how-to-create-a-transfer), and [How to create a payout](https://docs.b2core.b2broker.com/how-to-articles/manage-finances/how-to-create-a-payout)) or by a client via the B2CORE UI.

## How to archive Match-Trader accounts

Match-Trader trading accounts can be archived via the Back Office.

{% hint style="info" %}
Only the accounts with zero balances can be archived.
{% endhint %}

If there are available funds on a trading account, transfer them to another client account denominated in the same currency as an archived account.

To archive a Match-Trader account:

{% stepper %}
{% step %}
Navigate to **Clients** > **Accounts**.
{% endstep %}

{% step %}
Select a Match-Trader account that you want to archive and click the **Edit** button located in the account row.
{% endstep %}

{% step %}
On the **Edit account** page, click the **Actions** button, and then select **Archive**.
{% endstep %}

{% step %}
Click **Save** to apply the changes.
{% endstep %}
{% endstepper %}

The account has been marked with **A**, indicating that it is archived and hidden from the client in the B2CORE UI. The archived accounts are unavailable for trading and depositing.

The archived accounts can be restored so that clients can use them again. To do this, click the **Actions** button, and then select **Unarchive**.
