- ago
I have had hard time learning how to get futures data from IBKR but I have taken few steps to correct direction. With IBKR it seems I need to use "ESZ24" ticker at the moment to get latest streaming data, and to use ES#C for historical data for ES futures

But for some reason when I enter "ESZ24" on chart, I have gotten a warning message right after from IBKR (picture below). I have only gotten that message few times, but it is always the first time I use that ticker for the day and it doesn't repeat if I try it again (without restarting WL)



ATM I have "read only API" setting at IB account, but I wonder would it actually have placed an order if I didn't?

Ok, so I have ESZ24 ticker data on chart now at WL. But have a look what I get when trying to get continuous contract historical data by typing "ES#C"
Obviously that is not correct data. What did I do wrong?


0
178
17 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
Obviously that is not correct data. What did I do wrong?

You chose the Random data provider. It returns artificial data for testing purposes only. Uncheck it in the Data Manager > Historical Providers.
2
Cone8
 ( 6.71% )
- ago
#2
You cannot use the #C contracts for trading. We probably shouldn't have even supported that data since it's still limited to the last 2 years (max, usually less) anyway.

IB is VERY slow to return data. If it's the first time your request a contract, wait until the data appears. You can see the progress in the chart status bar. You should limit your intraday requests to just a few weeks. If it's more, you may have to wait HOURS for the data and you won't be able to get data for anything else while IB is throttling those requests.
1
ww58
- ago
#3
QUOTE:
We probably shouldn't have even supported that data since it's still limited to the last 2 years
I would disagree, it's very good we have such option. There is no other way to test futures using free data.
1
- ago
#4
QUOTE:
You chose the Random data provider. It returns artificial data for testing purposes only. Uncheck it in the Data Manager > Historical Providers.


That kinda worked. But now I don't get data on chart at all with ES#C. At chart, I only get error message when trying: "Could not obtain historical data for symbol". It seems I get streaming data (as long as latest contract, atm ESZ24 has it) but historical ES#C is not working.

I have paid subscription at IB to get streaming futures from CME, but is it possible I have wrong subscription and I don't have access to historical data? (I thing with streaming data I should have access to historical also. At least that is the case with any normal stock streaming data.)
-> I checked and I have 2 years of daily data on charts at my IB TWS, so should have it at WL also

And I agree with @ww5 with having 2 years data vs. only latest contract is worth a lot so please don't disable that possibility.
0
Cone8
 ( 6.71% )
- ago
#5
Restart WealthLab first to make sure you don't have hanging requests running for IB. Then open one chart, request a contract, and wait for the data or "no data" message. Check the Log Viewer for more clues. If you don't have Permission for the data, it will be there.

Re: #C
I'm not going to remove continuous contracts, but imho they're not worth the trouble they cause and it confuses customers who try to use them for trading. Also, you have to constantly refresh them for new rollovers since all the data is back adjusted. And when you do that, you lose all the data that's more than 2 years old. It's a mess. (IQFeed has the data for at least the last 15 years.)

fyi, you can request data for all individual contracts for the last two years at IB... ESZ24, ESU24, ESM24, ESH24, ESZ23.. etc.


0
- ago
#6
Number 1 in picture is when I requested ESZ24, and number 2 is ES#C



I understand I can request data for multiple individual contracts (in backtest scenarios only?), but I can't use it like that because data in each contract is not only from time it has officially rolled. Data between contracts is overlapping a lot

If futures data is so troubling, you could make a new WealthData dataset for futures history. You could easily include the whole history there, and get rid of confused customers by helping them find the data they clearly need. It clearly is important data
0
Cone8
 ( 6.71% )
- ago
#7
Futures data isn't troubling at all. I don't know what you mean. You can get any contract you want just by specifying it if you have permission to request it.

The problem you're having is that you're not maintaining a connection with IB TWS or Gateway. The connection closed about 26 seconds after it started. That's a local issue.

1. WL requires TWS or IBG needs to be running always. All the data passes through TWS or IBG.
2. If WL is connected, you cannot connect to your account with a mobile device or start TWS or IBG on another machine. That will break your connection.

I can't tell what you're doing, these are just guesses.
0
- ago
#8
By being troubling, I mean what you said before about IB futures:

QUOTE:
they're not worth the trouble they cause


TWS is running in the backround and I haven't started a new session with mobile or anything else. I have repeated that same error now multiple times, and surely I don't know what is wrong. I am able to request ESZ24 or any other future such as MESZ24 any time after I get that error and I always get that chart, so I have to have connection with TWS. I only have problems with #C

And, it seems always when I ask different futures ticker for the first time after restarting WL (MES, ES, NQ ect) I get that error from my opening post about API is trying to place an order. Any idea about that, or has anyone else reported that before?


Edit: Why is TWS offline recommended and is there big differences of reliability vs. normal version? Is it so that auto updates are not preferred? I might have the normal version that does auto updates. Should I change to offline version?
0
Cone8
 ( 6.71% )
- ago
#9
Re: The dialog
If you want to trade, you need to do what that message says, and uncheck the 'Read-Only API' checkbox. If you're not placing one, the order is most likely a "WhatIf" order that retrieves margin requirements - it's not a real trade.

Re: #C
There was another thread about trouble requesting continuous contracts (trouble that I don't have for some reason) in which it seems IB added a requirement for the endDate to be an empty string instead of an actual date - like for every other request. We'll have to blame the problem on that for now.
0
- ago
#10
I am aware that with read only API connection it's not possible to trade. But as I am still learning WL and its functions, I want to be in read-only mode for safety precautions. I will of course change that setting when I am ready to trade via WL.
And if error message about placing an order truly is caused by retrieving margin requirements, then I am ok with that. I was just worried WL was actually wildly trying to place an order.

I am away from my home computer now, but will try if that ES#C problem is solved by deleting endDate. It will take few days before I can try that but I will report once I have tested.
I did find the other topic where this was discussed but at the moment I am unsure where I can find such place to delete the endDate. So, right now that is only unclear thing for me. First of all is it in WL or TWS..?

Thank you for fast responses. I will report back in a few days.
0
Cone8
 ( 6.71% )
- ago
#11
QUOTE:
will try if that ES#C problem is solved by deleting endDate.
It's not something you can do. It's a programming issue that can't be resolved until the next IB Provider update.

Forget about your worries and request a IB Paper Trading account. Log in to ibkr.com, go to your Settings page and search for "paper". It takes them a business day to set up but then you can work/trade with your million dollar paper account as it if were a real account without any risk.

The paper account can use your data subscriptions by selecting in the settings -

0
- ago
#12
QUOTE:
It's not something you can do. It's a programming issue that can't be resolved until the next IB Provider update.

Thank you for that info! my problems seem to be solved now.

QUOTE:
Forget about your worries and request a IB Paper Trading account.


I am new to algo trading but oldie in manual style. I have all the bells and whistles, including paper account, even though I haven't used it in years. But it is really nice to see how eager you all here are to help and answer all the questions super fast. As I am new to WL, this all gives a really good picture and feel of confidence that I will get help if (when) encoutering problems. That all is helping customers to "get stuck" to WL once they have subscribed the first time.

Only thing I regret is not finding out about WL before. I tried algo trading few years ago with some other software, but major deficiencies made me forget algo stuff - until now. Knowing much about trading but not being too computer savvy (actual coding ect.) has restricted me before.
1
- ago
#13
For what its worth, this is coming from someone who has developed an API connection for IB years ago.....

You will want an external source of futures data that you can use for analysis. Using IB for that is going to be painful from both a speed and reliability of data point of view.
The IB app crashed often enough we could never count on the data.

All that aside.

I am using Tradestation, so what I am about to say is specific to that broker/data, etc. but the core understanding of how the symbols work will parley to other brokers too.

Take a specific future - does not matter which one, look up all the variations on it. Then chart them so you can see how they work. So for me when I look at it on the native TS platform im going to have @ES ES.D ESZ24, etc. I use @ES for looking at a backtest, but use ESZ24 to trade, on IB the @ would be a /.

Hope there is a nugget in there somewhere.
0
Cone8
 ( 6.71% )
- ago
#14
I'll mention that is /ES would be for Schwab, not IB. There's no standard for a continuous future symbol at IB. We use the #C suffix for a user to indicate that they want a continuous contract.

And although speed of initial intraday downloads is painful, there is no IB app crashing I'm aware of - as long as you don't abuse the data by requesting years of intraday data all at once. I've used our IB Provider every day for realtime trading for years and actually can't remember it crashing on me even once (it may have occasionally, but it's so infrequent that I can't remember it).
1
- ago
#15
QUOTE:
You will want an external source of futures data that you can use for analysis. Using IB for that is going to be painful from both a speed and reliability of data point of view.
The IB app crashed often enough we could never count on the data.


Valuable information - thank you. I will keep on eye how IB performs and find another source if there's problems too often.

I have noticed IB is slow on getting historical data, but does it affect live trading? Have you had crashes then, or only while trying to get loads of historical data? I haven't had many crashes while trading manually

Are you sure that @ is really / ? I was reading WL instructions and thought it was #. Hence I have been trying to get historical data with ES#C
(Cone already answered, so I will continue with #.)
0
- ago
#16
I abandoned the idea of using IB over 5 years ago.... A lot has changed in that time so my experience way back then may not be current. My comments were more of a history lesson than anything else - for better or worse.

It was the IB run in the background app that was failing and this was all custom code, front and back end so nothing to do with WL in any form. (just want to be clear)

If I had to guess why we had those problems it was from overdriving our historical data collection.

Yes, I am probably wrong with my reference to using a "/" . Clearly a faulty memory chip in my head.
0
Cone8
 ( 6.71% )
- ago
#17
Symbol information is in the WealthLab User Guide (F1) > Interactive Brokers.

We could have made the symbol !/@#$^ if we wanted to, but we settled on the #C suffix - "C" for continuous. The symbol only means what we assign it to mean. The program uses a symbol to identify a Contract. The Contract object is what matters. IB trades and returns data for Contracts.

Notice that when you put in a "symbol" in TWS, you have to make about 3 more clicks to further identify which Contract?
We replace all the clicking using the IBContracts.txt file - and if the symbol is not there, we assume it's a U.S. Stock - unless the symbol matches the Future or Option symbology that we also specified...
0

Reply

Bookmark

Sort