# Interactive Brokers

*To connect ATAS to **Interactive brokers** you need to make some changes in* [*TWS*](https://www.interactivebrokers.com/en/index.php?f=14099#tws-softwaretarget=) *setting&#x73;**.** You need to download and install the **latest** version.*

***

{% hint style="warning" %}
Interactive Brokers market data may differ significantly from other data providers due to the nature of this connection. Please, take this into account, when analyzing/trading, using this broker\`s connection!
{% endhint %}

{% hint style="warning" %}
The demo account from Interactive Brokers doesn't receive online data for stocks.
{% endhint %}

{% hint style="danger" %}
This connection only works for the Western market. You will not be able to receive quotes for Russian instruments through Interactive Brokers.
{% endhint %}

**To do it, follow the next steps:**

*1. In the main menu, choose file ->Global configurations and in opened window, choose*

«Configuration ->API ->Settings».

2\. Allow «Enable ActiveX and Socket Clients».

3\. Allow “Download open orders on connection”.

4\. Check and remember the port number. If this port is already used on your computer please enter another port number (any number from the local port range (fields below)).

5\. Close and save the settings by clicking OK.

<figure><img src="/files/geyTtn2NT8mwBEf0Qbys" alt=""><figcaption></figcaption></figure>

Now we are ready to connect ATAS to **TWS.** Open the main menu in ATAS and click the left mouse button on one of the fields shown in the screenshot below.

1\. Go to the main window menu - **Settings**, then the submenu **Connection to DataFeed**.

2\. Click the mouse button on the connections in the main window platform.

<figure><img src="/files/ZEeurnWM4JgWann0AgaE" alt=""><figcaption></figcaption></figure>

In the opened window, choose Add and in the next window choose Interactive Brokers and press Next.

<figure><img src="/files/Xq4hLHo8wG0TTzpSZ60Z" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/G8PODM55klDX5dc1mv66" alt=""><figcaption></figcaption></figure>

Here we are in the settings window for IB connection:

<figure><img src="/files/Sl3xkyR91YElg6bY6m3n" alt=""><figcaption></figcaption></figure>

1\. In the field of line Host, type the IP address and port number of the computer where TWS is installed.\
If TWS is running on the same computer as ATAS, the IP should be 127.0.0.1. Port—the value from the socket port in the TWS settings.

2\. Client ID - is the unique number over zero for the connected program (TWS can have several connections, and if you use only ATAS to connect- leave 1 or change to any other number).

3\. Press **Next**.

Now you see a new line in the list of connection sources:

<figure><img src="/files/6gLQEhrOhDnKx2JLTsSo" alt=""><figcaption></figcaption></figure>

By pressing **Connect,** you will make the connection.

After configuring the connection, it will appear as a separate line in the connections window:

<figure><img src="/files/CWopw0oOFtGiUPOngptu" 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://start.atas.net/step-4.-connect-your-account/futures/interactive-brokers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
