Error in getting current data from Interactive Brokers
18 ビュー (過去 30 日間)
古いコメントを表示
I have a problem with the function getdata . Here is my code:
ibContract = ib.Handle.createContract;
ibContract.symbol = 'AAPL';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART/NASDAQ';
ibContract.currency = 'USD';
d = getdata(ib,ibContract)
I have tried symbols of different stocks but the output is always
d =
BID_PRICE: -1
BID_SIZE: 0
ASK_PRICE: -1
ASK_SIZE: 0
LAST_SIZE: 0
Can anyone help me with this problem? Thanks a lot!
0 件のコメント
回答 (1 件)
Chris Reid
2015 年 4 月 9 日
編集済み: Chris Reid
2015 年 4 月 9 日
Its not an error - you get a response like this if you run the query outside of market hours.
Try it when the exchanges are open.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Transaction Cost Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!