Bloomberg VBA API:如何用 VBA 和 BLPAPI 替换 BDS 调用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10086313/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bloomberg VBA API: How can I replace a BDS call with VBA and the BLPAPI?
提问by user1323670
I currently use BDS in the following manner:
我目前以下列方式使用 BDS:
=BDS("FDS US Equity","TOP_20_HOLDERS_PUBLIC_FILINGS","cols=10;rows=20")
I have the BBG VBA class module with the following functions:
我有具有以下功能的 BBG VBA 类模块:
Public Function ReferenceDataRequest(security As String, fields() As String) As Variant
Public Function HistoricalDataRequest(securities() As String, fields() As String, startDate As String, endDate As String, periodicity As String, nonTradingDayFillOption As String, nonTradingDayFillValue As String) As Variant
Public Function IntradayTickRequest(security As String, startDate As String, endDate As String, eventTypes() As String) As Variant
Public Function IntradayBarRequest(security As String, startDate As String, endDate As String, eventType As String, interval As Integer) As Variant
I cannot figure out which function to use and with what parameters.
我无法弄清楚要使用哪个函数以及使用什么参数。
Help!
帮助!
回答by markblandford
I'm not too familar with the BDS()Bloomberg function but am with the Bloomberg API and working with Bloomberg with VBA.
我不太熟悉BDS()彭博功能,但我使用彭博 API 并使用 VBA 与彭博合作。
Your BDS()call has 'FDS US Equity' as the security parameter and the 'TOP_20_HOLDERS_PUBLIC_FILINGS' as the field. However, the 'fields()' parameter in the functions you list require an array.
您的BDS()电话将“FDS US Equity”作为安全参数,将“TOP_20_HOLDERS_PUBLIC_FILINGS”作为字段。但是,您列出的函数中的“fields()”参数需要一个数组。
Have you tried something like this?
你有没有尝试过这样的事情?
Dim varData As Variant
Dim strFieldsArray(0) as string
strFieldsArray(0) = "TOP_20_HOLDERS_PUBLIC_FILINGS"
varData = ReferenceDataRequest("FDS US Equity", strFieldsArray)
I am working on the assumption (not that I guess it matters) that this method is calling BlpSubscribe()of the Bloomberg Data Type library.
我正在假设(不是我认为这很重要)该方法正在调用BlpSubscribe()彭博数据类型库。

