- You are using a "non-demo" account with historical data present.
- You have the latest version of TWS API installed.
- Upgrading MATLAB version might also help resolve the issue.
IB historical data error
    7 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
i had a function to read historical data from Interactive Brokers, and was working good.
now i'm trying to run again (after some month) and stopped working returing this errors:
    'Warning: You submitted request with date-time attributes without explicit time zone. Please switch to use yyyymmdd-hh:mm:ss in UTC or use instrument time zone, like US/Eastern. Implied time zone functionality will be removed in the next API release'
Error: 'No historical data query found for ticker id:1418'
the CODE:
ib = ibtws('127.0.0.1', 7497,1)
ibContract = ib.Handle.createContract;
ibContract.symbol = 'MSFT'; %'MSFT';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART';
ibContract.primaryExchange = 'NASDAQ';
ibContract.currency = 'USD';
startdate = datenum(2023,03,16,12,30,00); 
enddate = datenum(2023,03,17,13,30,00); 
    barsize = '10 secs'; %5 secs 10 secs 1 min                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    ticktype = 'ask'; %bid or ask
    tradehours = true; % false(default) ; true
ask = timeseries(ib,ibContract,startdate,enddate,barsize,ticktype,tradehours);
0 Commenti
Risposte (1)
  Rahul
      
 il 10 Apr 2025
        I understand that you receive the error message related to 'No historical data query found for ticker id:1418'. As per my understanding this error message is provided by IB API and MATLAB just displays the message.
You can consider ensuring the following steps:
The following MATLAB Answers provide a good resource for understanding similar concerns related to 'ibtws':
The following MATLAB File Exchange submission can also be considered:
Thanks.
0 Commenti
Vedere anche
Categorie
				Scopri di più su Dates and Time in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

