# BitMEX

This guide provides instructions on how to connect BitMEX exchange to the ATAS platform.&#x20;

***

If you do not have an account yet, you can sign up on the exchange at the [following link](https://www.bitmex.com/app/register). You can register a demo account using the [following link](https://testnet.bitmex.com).&#x20;

1\. To connect your account in ATAS, you need to create an API key. You can do this in your personal account by following [this link](https://www.bitmex.com/app/apiKeys).

2\. Connect your account using the generated keys in ATAS. To do this, in the platform's main window, click on ***Connections - Add - BitMEX***, and then click the ***Next button:***

<figure><img src="https://3095753190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhMlO74lsSnDKFkMvdN10%2Fuploads%2FGiUBumzsFNKPxUnG8mT5%2F1.png?alt=media&#x26;token=af0ce4b2-c3de-43a9-af23-3faf74974f22" alt=""><figcaption></figcaption></figure>

Next, windows for signing an agreement will open:

<figure><img src="https://3095753190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhMlO74lsSnDKFkMvdN10%2Fuploads%2FpFjmLuEet9LsBLRq2fAi%2F2.png?alt=media&#x26;token=5ea14935-59f1-4209-99e1-761b8e19926d" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
OCO (One Cancels Other) orders for connecting BitMEX are simulated locally on your computer. This means that the platform must be connected to your broker for OCO orders to work properly. If you get disconnected and one of the OCO orders is executed, the other orders in the group WILL NOT BE canceled!
{% endhint %}

3. Setting up the connection in ATAS

<figure><img src="https://3095753190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhMlO74lsSnDKFkMvdN10%2Fuploads%2FbomYSu01REdHpwX7Vigf%2F3.png?alt=media&#x26;token=4ba30135-e626-48b9-bd6d-07a60ccb4c5c" alt=""><figcaption></figcaption></figure>

**Address** - Live (real account), Test (demo account/testnet, which is created on the [website](https://testnet.bitmex.com/)).

**Key, Secret** - keys generated on the website when creating the API.

**Display currency** - choose a currency for your account.&#x20;

After configuring the connection, it will appear as a separate line in the list of connections.

<figure><img src="https://3095753190-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhMlO74lsSnDKFkMvdN10%2Fuploads%2FV9eNxI2p5QSyp6bffucL%2F4.png?alt=media&#x26;token=7a944f4a-5c37-4806-b334-8b10c1453894" alt=""><figcaption></figcaption></figure>

1\. **Add** – add a new connection.

2\. **Type** – connection source.

3\. **Name** – connection name which you can set yourself.

4\. **Status** – connection status.

5\. **Quote Provider** – option to select a quote provider (this connection will be used as a quote provider).

6\. **Auto-Connect** – if you want the connection to automatically occur when the platform is launched, you need to enable this option.

7\. **Connection settings button.**

8\. **Remove connection from the list button.**

9\. **Connect/Disconnect** – connect/disconnect the connector.

{% hint style="info" %}
You can read about the settings of this window at the following link: [Connection Settings Window](https://help.atas.net/en/support/solutions/articles/72000612212)
{% endhint %}
