If you have tried with the original
ibtest.py, the most important part from the message is not having your code but as pointed out above:
- *how is it being run*?
In the link from above: https://community.backtrader.com/topic/10/ib-example-connection-delayed-on-forex-data-222/4 the problem was:
- The default resolution if run with no parameters is
TimeFrame.Ticksand Interactive Brokers offers no backfilling for such resolution. Which offers 2 alternatives:
- Running with an Interactive Brokers supported timeframe:
./ibtest.py --data0 EUR.USD-CASH-IDEALPRO --resample --timeframe Seconds --compression 1
- Telling the sample to avoid backfilling if the resolution is not supported:
./ibtest.py --data0 EUR.USD-CASH-IDEALPRO --no-backfill_start --no-backfill
None of those has a specific ticker, so you may want to quote how you are actually running the sample
Being that a paper trading account there are several things to consider according to the documentation from IB which is sometimes conflicting (probably due to some old pages from the portal still being reachable), but being the most important apparently:
- The data can only be used from one account: either the live account or the paper trading account
Apparently some other restrictions are in place, but what is actually true or not may be better answered by Interactive Brokers itself.
In any case the sample was tested against a demo account and a real trading account. The code here doesn't know anything about data permissions from Interactive Brokers. It asks the API to deliver data. If the data comes it will be pumped to your code, if it doesn't ...