IQFeed: plot return from array of cells?

1 view (last 30 days)
Andy on 15 Mar 2018
Answered: Yair Altman on 12 Jan 2020
Hi, Just testing the IQFeed API and glad to see some examples on the docs. However, I can see following:
1) goog = history(c,'GOOG',{startdate,enddate}, 'Daily');
returns an error ... actually it's only the command [history(c,'GOOG',{startdate,enddate}, 'Daily');] that can run, which returns a workspace variable of: IQFeedHistoryData. It's counter intuitive not to be able to assign a variable to the history return.
2) Looking at IQFeedHistoryData variable ... it's a table of cells ... of char elements ... what's the best / easiest / recommended way to pull out data from this variable and ... say plot it?

Answers (3)

Andy on 16 Mar 2018
Right ... many issues with using the IQFeed API ... such as:
1) Examples from the DOCs not working: Trial>> timeseries(c,sec,{fromdate,todate}) Trial>> history(c,s,{startdate,enddate},'Daily');
2) Some strange errors: Trial>> close(c) Warning: Error occurred while executing delegate callback: Message: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'. Source: System HelpLink: Trial>>
3) IQFeedTimeseriesData not popping up at all ...
Not pointing towards this API necessarily but: 4) The same DTN IQFeed Eval account works well in Multicharts / any other tool IQFeed capable.
Is there a way to check where the problem is?

Chris on 8 Dec 2018
Any update on this or same problems?

Yair Altman
Yair Altman on 12 Jan 2020
I believe that the DataFeed toolbox functions only store data in base workspace variables, from which you need to fetch them after some time. The toolbox does not provide a mechanism for a direct synchronous (blocking) assignment of the IQFeed data into a local Matlab variable. You need to use some sort of a timer to periodically check whether the data has arrived in the base workspace, and ensure that it is complete (and not partial).
As an alternative, consider using my IQML (IQFeed-Matlab) connector. IQML enables both synchronous (blocking) and asynchronous (background) queries, that are fetched either serially or in parallel (using the Matlab Parallel Computing Toolbox). A simple usage example:
>> data = IQML('history', 'symbol','AAPL', 'dataType','ticks')
data =
100×1 struct array with fields:
>> data(end)
ans =
Symbol: 'AAPL'
Timestamp: '2019-10-04 09:45:03.862626'
Datenum: 737702.406294699
Last: 224.67
LastSize: 100
TotalVolume: 5226196
Bid: 224.66
Ask: 224.68
TickID: 7432
BasisForLast: 'C'
TradeMarketCenter: 19
TradeConditions: '01'
TradeAggressorCode: 0
DayOfMonth: 4
BasisDescription: 'Last qualified trade'
TradeMarketName: 'Nasdaq Trade Reporting Facility (NTRF)'
TradeDescription: 'Normal Trade'
AggressorDescription: 'Unknown/unsupported'
IQML was developed with top performance, reliability and usability in mind. IQML supports 100% of IQFeed's API functionality. It is fully documented, continuously maintained/improved, and I am happy to provide support.
Note: I am an independent software developer and not a MathWorks employee. Don't get angry at me for bringing an independent alternative to the table...


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!