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

2 次查看(过去 30 天)
Tyler McDonald
Tyler McDonald2016-2-25
回答: Yair Altman ,2020-1-12
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 个评论
Timothy Jones
Timothy Jones 2016-5-21
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.

请先登录,再进行评论。

回答(1 个)

Yair Altman
Yair Altman 2020-1-12
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);

Community Treasure Hunt

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

Start Hunting!

Translated by