problem with live trading(delayed data)
-
I'm new to backtrader
I just copy code from https://www.backtrader.com/blog/posts/2016-06-21-livedata-feed/live-data-feed.html
Run with command: python live_trading.py --port 7497 --data0 TWTR --resample --timeframe Seconds --compression 5
Output:Server Version: 76 TWS Time at connection:20190505 21:31:30 ALMT -------------------------------------------------- Strategy Created -------------------------------------------------- Timezone from ContractDetails: EST Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:cashfarm> ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm> ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:hkhmds> ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds> ***** DATA NOTIF: DELAYED ***** DATA NOTIF: NOTSUBSCRIBED ***** STORE NOTIF: <error id=16777217, errorCode=354, errorMsg=Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top>~~~
I can not understand what the error
-
@sasha said in problem with live trading(delayed data):
Requested market data is not subscribed
https://interactivebrokers.github.io/tws-api/message_codes.html
error :10090Indicates that some tick types requested require additional market data subscriptions not held in the account. This commonly occurs for instance if a user has options subscriptions but not the underlying stock so the system cannot calculate the real time greek values (other default ticks will be returned). Or alternatively, if generic tick types are specified in a market data request without the associated subscriptions.
-
@sasha said in problem with live trading(delayed data):
***** STORE NOTIF: <error id=16777217, errorCode=354, errorMsg=Requested market data is not subscribed.Delayed market data is available.Error&BEST/STK/Top&BEST/STK/Top>~~~
@sasha said in problem with live trading(delayed data):
I can not understand what the error
The message comes directly from TWS and says you clearly don't have a subscription package for the ticker you want to see.
-
@backtrader said in problem with live trading(delayed data):
The message comes directly from TWS and says you clearly don't have a subscription package for the ticker you want to see.
Thanks.
Sorry for the stupid question, but how to get permissions subscription package?
I use TWS with demo -
@rami I understood my error. I don't have permission for retrieving data
How can I get permission? -
Buy subscription for market data from Interactive Brokers.
-
@ab_trader said in problem with live trading(delayed data):
Buy subscription for market data from Interactive Brokers.
Is there another way to get permission? )
-
@sasha Sure, call to Interactive Brokers and convince them that they need to give you for free things they are selling to others.
-
@ab_trader but I just want to check my algorithm on paper trading
-
Your paper trading account uses the same data permissions as your standard account. It won't simply use your real money. You still need permissions.
If you have an Interactive Brokers account you should familiarize yourself with what the DOs and DONTs are.
As an alternative you can use the faux data demo, but it won't be any good to test any algorithm because the data is completely fake (even in the demo, you cannot use each and every ticker. The forex tickers tend to work most of the time)