IBrokers R-基本要求数据

IBrokers R-基本要求数据,r,financial,ibrokers,R,Financial,Ibrokers,尝试使用IBrokers-R包下载基础数据。API文档显示了两种方法 或 我试过了 library(IBrokers) t <- ibgConnect() isConnected(t) [1]TRUE reqCurrentTime(t) [1] "2016-03-29 19:51:28 EST" c <- twsEquity("ibm") x <- reqFundamentalData(t,c) Error: could not find function "reqFund

尝试使用IBrokers-R包下载基础数据。API文档显示了两种方法

我试过了

library(IBrokers)
t <- ibgConnect()
isConnected(t)
[1]TRUE
reqCurrentTime(t)
[1] "2016-03-29 19:51:28 EST"
c <- twsEquity("ibm")
x <- reqFundamentalData(t,c)
Error: could not find function "reqFundamentalData"
请求reqID和reportType时遇到相同的错误。所以我把代码修改成

r <- reqId(t,numId =1)
[1] "1"
x <- IBrokers:::reqFundamentalData(t,reqId = r, contract = c, reportType = "ReportFinSummary")
x
[1] NULL

r它没有导出,但是有一个
reqFundamentalData
函数。您可以通过以下方式进行尝试:

x <- IBrokers:::reqFundamentalData(t,c)

x我对此进行了测试,但是
writeBin(as.character(msg),twsconn[[1]])
返回为NULL(空)。真可惜。我无法创建github,因为它是只读githubrepository@phiver:什么是GitHub回购?R包repo不是只读的。我在metacran github站点上找到了它。我的错。谢谢你的链接。我会仔细检查回购协议,看看是否可以添加一些有用的内容
x <- IBrokers:::reqFundamentalData(t,c)