Datafeed toolbox & IqFeed -- any known solution to IAsyncResult error?

1 view (last 30 days)
I am trying to use the IqFeed connection in the Datafeed Toolbox to download real time market data. This is what I have written...
Q=iqf('xxxxxx','xxxxxxxx', 'Admin');
timeseries(Q,'XIV', {floor(now),now},15)
openvar('IQFeedTimeseriesData')
Pretty simple stuff. I run the program and the "Variable Viewer" pops up and I can see the data. Now if I run it a second time, I get this error...
Warning: Error occurred while executing delegate callback:
Message: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.
Parameter name: asyncResult
Source: System
HelpLink:
It's a know problem I guess because on the "timeseries" help page it acknowledges the error and says to simply restart Matlab when it occurs.
When you make multiple requests with multiple messages, this error might display: Warning: Error occurred while executing delegate callback: Message: The IAsyncResult object was not returned from the corresponding asynchronous method on this class.
To fix this, restart MATLAB.
The problem is this happens EVER SINGLE TIME the function is run, leaving it impossible to write any useful code using the IqFeed datafeed. It's a one-and-done function.
Has anyone discovered a fix or workaround for this error?
  1 Comment
Timothy Jones
Timothy Jones on 21 May 2016
I hope someone solves this soon. My damn timeseries(...) wont work at all. Sometimes my history() does and even my level 2 stuffs will work.

Sign in to comment.

Answers (1)

Yair Altman
Yair Altman on 12 Jan 2020
Perhaps your IQFeed subscription does not enable fetching historic tick/interval data for XIV. Adding the necessary subscription to your IQFeed account may solve this problem without a need to change anything in your Matlab program or installation.
Also consider using my IQML (IQFeed-Matlab) connector as an alternative. 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','XIV,AAPL,MSFT,GOOG', 'UseParallel',true);

Categories

Find more on Instrument Connection and Communication in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!