错误让欧元。在ibroker上使用R的USD历史数据

时间:2021-08-31 12:34:54

I am using the IBrokers package and twsInstrument and for some reason it gives me an error using the simplest of methods.

我使用的是IBrokers包和twsInstrument,出于某种原因,它会使用最简单的方法给我一个错误。

require("IBrokers")
require("twsInstrument")
tws <- ConnectIB()
past.data<-reqHistoricalData(tws,getContract("EUR.USD"))

gives me

给我

waiting for TWS reply on EUR ....failed.
Warning message:
In errorHandler(con, verbose, OK = c(165, 300, 366, 2104, 2106,  :
Historical Market Data Service error message:No historical market data for  EUR/CASH@IDEALPRO Last 1d

Any ideas on how to fix this?

有什么办法解决这个问题吗?

1 个解决方案

#1


4  

Interactive Brokers does not disseminate TRADES data for cash FX. You need to use a different value for whatToShow than the default. For example:

交互经纪人不为现金外汇传播交易数据。您需要为whatshow使用一个与默认值不同的值。例如:

 reqHistoricalData(tws,getContract("EUR.USD"), whatToShow="BID")
 #or
 reqHistoricalData(tws,getContract("EUR.USD"), whatToShow="ASK")

#1


4  

Interactive Brokers does not disseminate TRADES data for cash FX. You need to use a different value for whatToShow than the default. For example:

交互经纪人不为现金外汇传播交易数据。您需要为whatshow使用一个与默认值不同的值。例如:

 reqHistoricalData(tws,getContract("EUR.USD"), whatToShow="BID")
 #or
 reqHistoricalData(tws,getContract("EUR.USD"), whatToShow="ASK")