-
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
help help 😭
If I access the API using Docker image and the reqHistoricalData method from ib_insync, I get the following error:
Error 162, reqId 3: Historical Market Data Service error message:No market data permissions for ISLAND STK. Requested market data requires additional subscription for API. See link in 'Market Data Connections' dialog for more details., contract: Stock(symbol='QQQ', exchange='SMART', currency='USD').However, when I download TWS locally and access the API myself, it works fine.
through docker:
through local tws:
my code:
from ib_insync import *
# util.startLoop() # uncomment this line when in a notebook
ib = IB()
ib.connect('host.docker.internal', 7497, clientId=1) # this works fine
ib.connect('ibkr', 8888, clientId=1) # this got error
contract = Stock('QQQ', 'SMART', 'USD')
bars = ib.reqHistoricalData(
contract, endDateTime='', durationStr='30 D',
barSizeSetting='1 hour', whatToShow='MIDPOINT', useRTH=True)
# convert to pandas dataframe (pandas needs to be installed):
df = util.df(bars)
print(df)Metadata
Metadata
Assignees
Labels
No labels