我正在尝试使用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 failed"
}
}
20JUL2014_09:18:35.922 7794:139791141598976 ERROR blpapi_platformtransporttcp.cpp:671 blpapi.session.transporttcp.{2}.<localhost:8194> Connection failed
20JUL2014_09:18:35.922 7794:139791141598976 WARN blpapi_platformcontroller.cpp:371 blpapi.session.platformcontroller.{2} Platform: 0 failed 1 consecutive connect attempts, stopped trying to reconnect.
Failed to start client session.
Client received an event
Press ENTER to quit
SessionStartupFailure = {
reason = {
source = "Session"
category = "IO_ERROR"
errorCode = 9
description = "Connection failed"
}
}
ritesh@Ritesh:~/Desktop/blpapi_cpp_3.7.5.1/Linux$
Run Code Online (Sandbox Code Playgroud)
有没有人对api有所了解?它尝试连接的连接是什么?我是否需要在端口8194上侦听任何其他服务器?
要使用Bloomberg API SDK,您需要Bloomberg数据源,该数据源作为Bloomberg订阅产品的一部分提供.API SDK使用端口8194上的TCP连接连接到数据馈送端点(如您所见),示例程序假设"localhost"上有一个端点(因为任何具有运行Bloomberg Professional终端的计算机上都有) .
您在Linux计算机上运行此操作,除非您在该计算机上安装了数据源设备包,否则"localhost"上没有API端点.如果网络中有API端点,则需要为示例程序指定正确的命令行参数,以告知其API端点的IP地址(以及端口号,如果非默认值).
(另请注意,您尝试运行的特定示例程序是"发布者",并且需要Platform API端点进行连接,它不能与任何其他类型的API端点一起使用)