连接至彭博
This example shows how to create a connection to Bloomberg®使用这些彭博服务:彭博桌面,彭博服务器和B-Pipe®。有关彭博连接要求的详细信息,请参阅数据服务器连接要求。为了确保成功的彭博连连接,请在执行连接函数之前执行所需的步骤。有关详细信息,请参阅安装彭博和配置连接。
创建彭博桌面连接
C = BLP
c =带有属性的blp:session:[1x1 com.bloomberglp.blpapi.session] ipaddress:'localhost'端口:8194超时:0
blp
Creates a Bloomberg connection objectC
并返回其属性。
验证连接C
。
v = isConnection(c)
v = 1
v
返回真正的
表明彭博连接有效。
检索彭博桌面连接属性。
v =得到(c)
v = session:[1x1 com.bloomberglp.blpapi.session] ipaddress:'localhost'端口:8194超时:0
v
是包含彭博会话对象,IP地址,端口号和超时值的结构。
关闭彭博桌面连接。
关闭(c)
创建彭博服务器连接
使用运行彭博服务器的机器的IP地址连接到彭博服务器。该代码假定以下内容:
彭博社是
12345678
。IP地址
Serverip
对于运行彭博服务器的机器是'111.11.11.111'
。
uuid = 12345678;serverip ='111.11.11.111';c = blpsrv(uuid,serverip)
C =带有属性的BlPSRV:UUID:12345678用户:[1x1 com.bloomberglp.blpapi.impl.at] session:[1x1 com.bloomberglp.blpapi.session.session.session.session] ipaddress] ipaddress:'111.11.11.11.11.111'port:8195 port:8195超时:8195超时:8195超时:8195超时:
blpsrv
Connects to the machine running the Bloomberg Server on the default port number8195
。blpsrv
创建彭博服务器连接对象C
。
关闭Bloomberg服务器连接。
关闭(c)
创建B-Pipe联系
使用运行Bloomberg B-Pipe进程的机器的IP地址创建彭博B-Pipe连接。该代码假定以下内容:
身份验证是Windows®通过设置进行身份验证
授权类型
至'os_logon'
。应用程序名称为空白,因为您没有使用应用程序连接到彭博b-pipe。
IP地址
Serverip
对于运行彭博b-pipe过程的机器是'111.11.11.112'
。端口号是
8194
。
授权类型='os_logon';ApplicationName ='';serverip = {'111.11.11.112'};portnumber = 8194;c = bpipe(授权类型,applicationname,serverip,portnumber)
C =带有属性的bpipe:appauthtype:''authtype:'os_logon'appName:[]用户:[1x1 com.bloomberglp.blpapi.impl.at] session:[1x1 com.bloomberglp.blpapi.session.sessession ipaddress] ipaddress] ipaddress:.11.112'}端口:8194.00超时:0
bpipe
在端口号上连接到彭博b-pipe8194
。bpipe
创建彭博b-pipe连接对象C
。
关闭B-Pipe连接。
关闭(c)
也可以看看
blp
|blpsrv
|bpipe
|得到
|isconnection
|关
相关示例
- 检索彭博当前数据
- Retrieve Bloomberg Historical Data
- 使用彭博社检索当前和历史数据
- 检索彭博日内壁虱数据
- Retrieve Bloomberg Real-Time Data