我正在尝试使用bloomberg c ++ api示例.得到以下错误:
ritesh@Ritesh:~/Desktop/blpapi_cpp_3.7.5.1/Linux$ ./RequestServiceExample_64
RequestServiceExample
Connecting to port 8194 on localhost
Server is starting------
20JUL2014_09:18:35.921 7794:139791222232832 ERROR blpapi_platformtransporttcp.cpp:671 blpapi.session.transporttcp.{1}.<localhost:8194> Connection failed
20JUL2014_09:18:35.921 7794:139791222232832 WARN blpapi_platformcontroller.cpp:371 blpapi.session.platformcontroller.{1} Platform: 0 failed 1 consecutive connect attempts, stopped trying to reconnect.
Server received an event
20JUL2014_09:18:35.922 7794:139791222241088 ERROR blpapi_providersessionimpl.cpp:640 blpapi.providersession.{1} Failed to start provider session: rc=9
Failed to start server session.
Client is starting------
SessionStartupFailure = {
reason = {
source = "Session"
category = "IO_ERROR"
errorCode = 9
description = "Connection …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装并成功运行Bloomberg API Python 3.5.5,我还为Mac OS X下载并解压缩了C++库3.8.1.1.我正在运行Mac OS X 10.10.2.我使用Python原生Mac OS X,Python 2.7.6,我已经通过Xcode安装了命令行gcc编译器GCC 4.2.1.
我在管理员帐户上做了sudo python setup.py install.我还将setup.py ENVIRONMENT变量BLPAPI_ROOT更改为C++头文件的目录blpapi_cpp_3.8.1.1.设置成功.
我根据Python的README文件的建议改为另一个目录,以避免"导入错误:没有名为_internals的模块".
当我去python并输入命令import blpapi时,我得到以下错误:
进口blpapi回溯(最近通话最后一个):文件"",1号线,在文件"/Library/Python/2.7/site-packages/blpapi/ 初始化的.py",5号线,从.internals进口的correlationID文件"/ Library/Python/2.7/site-packages/blpapi/internals.py",第50行,在_internals = swig_import_helper()文件"/Library/Python/2.7/site-packages/blpapi/internals.py",第46行,in swig_import_helper _mod = imp.load_module('_ internals',fp,pathname,description)ImportError:dlopen(/Library/Python/2.7/site-packages/blpapi/_internals.so,2):未加载库:libblpapi3_64.so引用自:/ Library /Python/2.7/site-packages/blpapi/_internals.so原因:图片未找到
我检查/Library/Python.../blpapi/的目录,并且没有_internals.so只有*.py文件.那是问题吗?我不知道该怎么办.
在 Bloomberg API Developer\xe2\x80\x99s Guide 中,它写道:
\n\n\n\n\n安全查找[...]请求根据“查询”元素的字符串值以及您设置的附加过滤器构建搜索[...]。使用SECF < GO >功能也可以在 Bloomberg Professional 服务上找到此功能。
\n
这是针对 IBM 的简单查询片段(C++,而我实际上针对的是 Java):
\n\nService secfService = session.getService("//blp/instruments");\nRequest request = secfService.createRequest("instrumentListRequest");\nrequest.asElement().setElement("query", "IBM");\nrequest.asElement().setElement("yellowKeyFilter", "YK_FILTER_CORP");\nrequest.asElement().setElement("languageOverride", "LANG_OVERRIDE_NONE");\nrequest.asElement().setElement("maxResults", 10);\nsendRequest(request, session);\nRun Code Online (Sandbox Code Playgroud)\n\n通过该SECF功能,我可以设置许多其他过滤器,例如交易所、居住国家/地区(也映射在FLDS功能屏幕中)。
当我通过时("exchCode", "US"),我收到一个错误。
\n\n\ncom.bloomberglp.blpapi.NotFoundException:元素:在:InstrumentListRequest 中找不到 exchCode
\n
(我也尝试过EXCH_CODE)
如何将SECF过滤器传递给request对象?
我试图根据README中的说明为python安装blpapi-3.5.5,但是在运行时
python setup.py install
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
running install
running build
running build_py
running build_ext
building 'blpapi._internals' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/erlend/blpapi_cpp_3.8.8.1/include/include -I/home/erlend/anaconda/include/python2.7 -c blpapi/internals_wrap.cxx -o build/temp.linux-x86_64-2.7/blpapi/internals_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
blpapi/internals_wrap.cxx:3110:26: fatal error: blpapi_types.h: No such file or directory
#include "blpapi_types.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud) 我是一位新的 Bloomberg 终端用户,我尝试按照此处的说明使用 python 下载 Bloomberg API。但是,当我在命令提示符中运行以下命令时
python -m pip install --index-url=https://bloomberg.bintray.com/pip/simple blpapi
Run Code Online (Sandbox Code Playgroud)
我收到以下错误...
Could not find a version that satisfies the requirement blpapi (from versions: )
No matching distribution found for blpapi
Could not fetch URL https://bloomberg.bintray.com/pip/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='bloomberg.bintray.com', port=443): Max retries exceeded with url: /pip/simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)'))) - skipping
Run Code Online (Sandbox Code Playgroud)
有人可以帮我下载这个包,以便我可以从 Bloomberg API 下载数据吗?
有没有办法在 BLPAPI 或 XBBG API 中使用 Python 中的 BQL 公式,而不是使用 BDP 或 BDS 公式循环遍历一堆代码来检索 S&P500 的所有股票的数据?(我怀疑,这将很快达到当天的数据限制,因为我想检查一堆不同的指数)。
我找到了 2019 年的一篇文章,其中建议使用 BQNT,但我宁愿避免使用 BQNT,链接在这里:How to Implement BQL Bloomberg excel Formula to python API (blpapi)? 。
提前致谢!
我有一份ISIN列表,这是我唯一的信息来源.在Excel中,我可以捕获许多情况下需要的Bloomber股票代码,因为它指定了交易资产的交易所的代码.为此,我只需要在BDP() - 公式中添加"... Equity isin",其中"..."是ISIN的占位符.所以使用新的Rblpapi包(这是一个很棒的工具!)我可以尝试做同样的事情:
这是一个随机ISIN列表
isins = c("LU0942970442", "LU0997545750" ,"CH0019597530" , "CH0017142719" , "CH0131872431", "VGG0475N1087", "US46429B6974",
"LU0911032141" , "DE000A1JCWS9")
Run Code Online (Sandbox Code Playgroud)
在bdp公式中添加"公平"并调用"TICKER_AND_EXCH_CODE"
require(Rblpapi)
blpConnect()
portfolio_ticker = bdp(paste(c(isins),"equity"), "TICKER_AND_EXCH_CODE")
Run Code Online (Sandbox Code Playgroud)
但是没有指定一些代号.
> portfolio_ticker
TICKER_AND_EXCH_CODE
LU0942970442 equity XBAC SW
LU0997545750 equity AXESZHD LX
CH0019597530 equity
CH0017142719 equity
CH0131872431 equity
VGG0475N1087 equity ARIASII VI
US46429B6974 equity
LU0911032141 equity FCEUSMI LX
DE000A1JCWS9 equity CHOMCAR GR
Run Code Online (Sandbox Code Playgroud)
我的问题是:这是一个思考错误在我身边还是包装中的错误?
编辑:作为一个例子,它在Excel中看起来如何,这是相应的图片.
我目前以下列方式使用BDS:
=BDS("FDS US Equity","TOP_20_HOLDERS_PUBLIC_FILINGS","cols=10;rows=20")
Run Code Online (Sandbox Code Playgroud)
我有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
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚使用哪个功能以及使用什么参数.
救命!