IQFeed: plot return from array of cells?
Show older comments
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?
Thanks
Answers (3)
Andy
on 16 Mar 2018
0 votes
Chris
on 8 Dec 2018
0 votes
Any update on this or same problems?
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:
Symbol
Timestamp
Datenum
Last
LastSize
TotalVolume
Bid
Ask
TickID
BasisForLast
TradeMarketCenter
TradeConditions
TradeAggressorCode
DayOfMonth
BasisDescription
TradeMarketName
TradeDescription
AggressorDescription
>> 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.
Details: https://undocumentedmatlab.com/IQML or https://www.mathworks.com/matlabcentral/fileexchange/69814-IQML
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...
Categories
Find more on Argument Definitions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!