简体   繁体   English

无法连接到bloomberg API

[英]Cannot connect to bloomberg API

I am trying to use bloomberg API with python.我正在尝试将bloomberg API 与python 一起使用。 I can make calls to the API when I am on windows with bloomberg terminal running.当我在运行彭博终端的 Windows 上时,我可以调用 API。 However, I would like to access the api from a mac/linux machine.但是,我想从 mac/linux 机器访问 api。 I installed the API on my mac using the steps highlighted here:我使用此处突出显示的步骤在我的 Mac 上安装了 API:

How to install Bloomberg API Library for Python 2.7 on Mac OS X 如何在 Mac OS X 上为 Python 2.7 安装 Bloomberg API 库

Then I setup windows as on a virtual machine with virtualbox and used bridged connection so I can ping to the guest and launched bloomberg terminal However I still cant access bloomberg api然后我在带有virtualbox的虚拟机上设置windows并使用bridged connection这样我就可以ping到来宾并启动bloomberg终端但是我仍然无法访问bloomberg api

ERROR blpapi_platformtransporttcp.cpp:671 blpapi.session.transporttcp.{2}.<my-guest-ip-address:8194> Connection failed

has anyone done this?有没有人这样做过?

There is a way but it's not easy.有一种方法,但并不容易。 You do need to run the terminal/bbcomm in windows, but connect to it from Linux via port forward.您确实需要在 Windows 中运行终端/bbcomm,但通过端口转发从 Linux 连接到它。 I ran it in VM(VBox) inside Linux but it can probably be done on a separate physical PC.我在 Linux 内的 VM(VBox) 中运行它,但它可能可以在单独的物理 PC 上完成。 The gory details are here .血腥细节在这里

DesktopApi does not support your particular use case and should not be used in such way. DesktopApi 不支持您的特定用例,不应以这种方式使用。 You may consider ServerApi or B-Pipe solution for that purpose.为此,您可以考虑 ServerApi 或 B-Pipe 解决方案。

Bloomberg DesktopApi (DAPI) is meant to run on desktop of Bloomberg Terminal user, it connects to the local process bbcomm.exe at port 127.0.0.1 (localhost) and port 8194. On the other hand, ServerApi can connect to a remote host running ServerApi process, it's provided for Server applications for retrieving and disseminating data to Terminal users after performing entitlement checks. Bloomberg DesktopApi (DAPI) 旨在运行在 Bloomberg Terminal 用户的桌面上,它在端口 127.0.0.1 (localhost) 和端口 8194 处连接到本地进程 bbcomm.exe。另一方面,ServerApi 可以连接到运行的远程主机ServerApi 进程,它是为服务器应用程序提供的,用于在执行权限检查后检索和传播数据给终端用户。 ServerApi and B-Pipe require implementing additional coding for Authentication and Authorization. ServerApi 和 B-Pipe 需要为身份验证和授权实施额外的编码。

You can download the ServerApi and/or B-Pipe from WAPI -> API Download Center.您可以从 WAPI -> API 下载中心下载 ServerApi 和/或 B-Pipe。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM