How to find correct IB symbol using TWS

In order to find correct IB symbol using TWS (Traders Workstation):

Enter desired symbol in TWS, then click on the line with right mouse button and select Contract Info->Description menu. You will see the following window:


That is what you will see for stocks, indices and currencies (forex), but for some other symbols like futures, you will see slightly different picture, but the idea is the same :


Now simply use the information from this window to build correct AmiBroker symbol as shown in the picture

More on IB plugin


Is there any difference between snapshot data and L1 when subscribing to market data? Specifically I’m having problems to get data for ZBZ7-ECBOT-FUT even though I subscribe to the data. Amibroker says i don’t subscribe to it.

Ask Interactive Brokers support. From my experience you need to be subscribed to real time (L1) data.

Thanks for quick reply. I switched to subscription for L1 and I still receive “no subscription to market data” in Amibroker. I have no problems with (for example) ESZ7-GLOBEX-FUT but ZBZ7-ECBOT-FUT does not load. I subscribe to market data L1 for CBOT. I believe my ticker code is correct as I have no problems getting constant data in TWS.

IB support says they can’t do anything, this is Amibroker issue.

IB support as always has no clue. If it was “AmiBroker issue” then NOTHING (no symbol) would work. By the way, did you read and did you look at the symbology table and you have read that

  ---   -  

	Future 	YM Jun 04 future, ECBOT
(note 3 spaces between symbol and month and 1 space between month and year)

That is an example from the guide written back in 2004. Obviously, today it is 2017 and you need 2017 contract


Hi again,
Using that link you provided gives: ZB DEC 19-ECBOT-FUT
That does not work either. I tried: YM DEC 15-ECBOT-FUT
No luck. I subscribe, i have no problems getting data in TWS. So this must be a ticker symbol issue.

1 Like

For your information: It works. If and only if instructions are followed. You need to find existing and correct symbol.

Sorry but you have to learn to find out solutions to easy stuff like this yourself. You've got easy to follow instructions. Why don't you just enter the symbol in TWS and follow the instructions from first post? Or ask Interactive Brokers support - there are people who charge money from your account everyday, don't you remember and they should offer help on their symbols and their data.

I am doing this once again, but really I can't baby sit everyone and instruct about every other symbol.

2015 is no longer there as you might have noticed. 2019 is too far away.

You need to enter contract from current year or next year, like 2017 or 2018.

1. First you need to use TWS to see what is available:


2. After selecting symbol, right click and select Contract Info->Description


3. Then you will see this. The picture is the same as in first post and explains HOW TO FIND correct symbol YOURSELF


Correct symbol is


(three spaces between ZB and DEC and one space between DEC and 17 - only ECBOT seem to have this shitty symbology @IB with spaces that they don't bother to show clearly with fixed-size font)

So you use Symbol->New in AmiBroker


and now, if you are NOT subscribed on attempt to backfill you should see the this in the status bar of AmiBroker:


4. Then you need to subscribe to real time data for CBOT (from TWS)


5. After you subscribed to data, add the symbol to the real-time quote window in AmiBroker and right click on status area to backfill If it does not work right click and Reconnect. Anyway you should see this:


So was it AmiBroker issue? NO.
Who's issue was it then? And by the way you can send guys from IB support link to this post maybe they will learn something new today :slight_smile:


Hi Tomasz,
You are right, i was too quick and misread the specification and thought the expiry date was the number in the symbol( 15 or 19) :slight_smile:

I forgot to thank you for the time you put in to help me :slight_smile:

Yet another example for options. The procedure is IDENTICAL all the time. You just need to mark and copy (Ctrl+C) the Symbol from the description page, add Exchange and Type (only if different than STK) and Currency (only if different than USD).


See also IB Option Symbology guide: OPTION SYMBOLOGY INITIATIVE | IB Knowledge Base that says:

If the Option Root Symbol is less than 6 characters, spaces are added to equal the six character minimum.

For this reason AMD option (3 latter base symbol) has 3 spaces in corresponding option symbol

AMD   220107C00135000-SMART-OPT

while BABA (4 letter base symbol) 2 spaces in corresponding option symbol


Perhaps IB updated their Mosaic interface in TWS Build 969.2F, Feb 13, 2018 because I cannot find the View->Symbol Information on my screen.
Can @Tomasz or someone else provide the way to see symbol information as discussed in details above this post?

See: Symbology

Symbol format now uses the symbol mode of TWS, not the underlying mode. The symbol mode in TWS can be seen in the 'View->Symbol Mode' menu option in TWS.


Just double click on any symbol in the watchlists (not on charts)

Actually, In the Mosaic interface, the double click on the symbol in a watchlist did not work. However, a Right Click, then a Left Click on the symbol name in the pop-up does work! You gave me the clue I needed to solve this. Thanks @beppe

The above discussion does not cover how to specify a Stock.
I used something like this to get things to work:
which is Symbol-Exchange-Type-Currency
I only subscribe to the nasdaq data. IB support mentioned there was no documentaiton on this and gave me other formats to try.

The explanation was MSFT has multiple Primary Exchanges listed, so in order to uniquely define the MSFT contract on NASDAQ, you also need to specify Primary Exchange = NASDAQ in the contract definition

However these DID NOT WORK for me:

To repeat only THIS WORKED:

1 Like

If you do not care about a specific exchange, for many US stocks, you can just skip the Exchange-Type-Currency part.

MSFT works "as it is" without any additional specification.

But there are some USA listed tickers that require (partially or fully) the above format to avoid confusion with other tickers listed on different markets (for instance GLD-ARCA-STK-USD).

The full format is generally required for foreign markets stocks.

Detailed documentation here

MSFT and any symbol that is traded on multiple exchanges can easily work "as is" thanks to dictionary file (IBDictionary.txt). For details see:

1 Like

Note also that even if symbol is correct, it does not necessarily mean that TWS has historical data for it.

For example historical data for certain CFDs are not available from IB. If you attempt to chart such symbol in AmiBroker you will get error 2127, like this:


And if you try TWS's own charts to display offending symbol, TWS will display notification that only chart of underlying (i.e. STOCK PRICE) is available.

And this means exactly what error message says: TWS does NOT offer historical data for that symbol and you can't display its chart. And Interactive Brokers official advice is to use underlying symbol (stock). There is no "workaround" or "fix" for any application using TWS API as the data is missing at the source (@IB).

so ,how can i trade stock cfd through API

can you give an example to trade stock cfd :BABA ?