1

我尝试将 TWS(盈透证券的交易应用程序)与 R 中的测试脚本连接起来。

library (IBrokers)
tws <- twsConnect()
aapl.csv <- file("AAPL.csv", open="w")
reqMktData (tws, twsSTK("AAPL"), eventWrapper = eWrapper.MktData.CSV(1), file = aapl.csv)

close(aapl.csv)
close(two)

我收到错误消息。我可以成功地从 TWS 检索历史数据“AAPL”。请指教程序有什么问题。

2 -1 2104 Market data farm connection is OK:hfarm 
2 -1 2104 Market data farm connection is OK:jfarm 
2 -1 2104 Market data farm connection is OK:eufarm 
2 -1 2104 Market data farm connection is OK:usfuture 
2 -1 2104 Market data farm connection is OK:cashfarm 
2 -1 2104 Market data farm connection is OK:usfarm.us 
2 -1 2104 Market data farm connection is OK:usfarm 
2 -1 2106 HMDS data farm connection is OK:ilhmds 
2 -1 2106 HMDS data farm connection is OK:fundfarm 
2 -1 2106 HMDS data farm connection is OK:ethmds 
2 -1 2106 HMDS data farm connection is OK:ushmds 
2 1 354 Requested market data is not subscribed.AAPL NASDAQ.NMS/TOP/ALL 

谢谢你。

4

1 回答 1

1

纸质账户上的订阅反映了真实账户上的订阅。以下是可能导致该错误的几件事:

1.您没有在您的真实账户上支付纳斯达克订阅费用。

2.您的真实账户当前正在使用订阅,并且您正在尝试请求您的纸质账户上的数据。你不能两者都做。

于 2016-05-29T18:28:59.177 回答