【问题标题】:IBrokers R - reqFundamentalDataIBrokers R - reqFundamentalData
【发布时间】:2016-03-30 01:57:48
【问题描述】:

尝试使用 IBrokers - R 包下载基本数据。 API 文档展示了两种方式

http://xavierib.github.io/twsapidocs/interfaceIBApi_1_1EWrapper.html#af209070fa9583fb4780be0f3ff1e61e4

http://xavierib.github.io/twsapidocs/reuters_fundamentals.html

我试过了

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"

IBrokers R pkg 的文档没有明确指出这个函数——所以我可以假设它不受支持吗?我有路透社订阅。

=========== 尝试了 Josh Ulrich 的建议: x

Error in inherits(x, "twscontract") :
  argument "contract" is missing with no default

在请求 reqID 和 reportType 时遇到同样的错误。于是我将代码修改为

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

命令运行没有错误但返回 NULL

【问题讨论】:

    标签: r financial ibrokers


    【解决方案1】:

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

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

    由于它没有导出,我不知道它是否有效。反馈将不胜感激。

    【讨论】:

    • 我对此进行了测试,但 writeBin(as.character(msg), twsconn[[1]]) 返回为 NULL(空)。这是一种耻辱。我无法创建 github 问题,因为它是只读 github 存储库
    • @phiver:什么 GitHub 存储库? R IBrokers 包 repo 不是只读的。
    • 我在 metacran github 网站上找到了它。我的错。感谢您的链接。我将通过 repo 看看我是否可以添加一些有用的东西
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多