Main Content

blp

彭博Desktop connection V3

Description

blp函数创建ablp目的。这blp对象代表彭博社®桌面连接。

Other functions connect to different Bloomberg services: Bloomberg Server (blpsrv), and Bloomberg B-PIPE®((bpipe)。有关这些服务的详细信息,请参阅比较彭博连接

For details about Bloomberg connection requirements, seeData Server Connection Requirements。为确保成功的彭博连接,请在执行之前执行所需的步骤blp。For details, see安装彭博和配置连接

创建

Description

例子

C = BLP创建一个包含彭博桌面连接的彭博连接对象。您需要运行DataFeed Toolbox™和MATLAB的机器的彭博桌面软件许可证®

例子

c = blp(端口,ip,暂停)sets the港口andTimeOut属性,并使用运行彭博社的本地计算机的IP地址来创建彭博连接。

Caution

要参考其他功能中的彭博连接,请使用由blp功能。否则,使用blp当输入参数打开了多个彭博连接,导致意外行为和耗尽内存资源。

输入参数

展开全部

标识运行彭博社的本地计算机的IP地址,指定为字符向量或字符串标量。

Example:'localhost'

数据类型:Char|细绳

特性

展开全部

This property is read-only.

彭博V3会话,指定为彭博V3 API会话对象。

Example:[1x1 com.bloomberglp.blpapi.session]

运行彭博社的本地计算机的端口号,指定为数字标量。

Example:8194

数据类型:double

运行彭博社的本地计算机的IP地址,指定为角色向量。

blpfunction sets this property using theipinput argument.

Example:'localhost'

数据类型:Char

超时指定MATLAB在计时之前尝试连接到彭博桌面的毫秒的时间,并指定为数字标量。

Example:10000

数据类型:double

日期和时间数据类型, specified as one of these values.

Value Description
''((default) 返回日期和时间值作为MATLAB日期编号。
'约会时间' Return date and time values as adatetime大批。

您可以使用字符向量或字符串指定这些值(例如,“约会时间”)。

当您创建一个blp对象,blp功能使此属性保持不设置。要检索数据,您必须在命令行或使用点表示法中手动设置此属性值,例如:

c.datetimetype ='dateTime';
这n, you can use these supported functions:

  • getBulkData

  • getdata

  • history

  • tahistory

  • 时间序列

    笔记

    如果是DataReturnFormat属性值是'table'DatetimeType属性值是'约会时间',然后returned data is a table that contains date and time values as adatetime大批。如果是DataReturnFormat属性值是an empty character vector, then setting theDatetimeType财产为'约会时间'returns date and time values for aggregated ticks and historical requests as MATLAB date numbers.

数据返回格式,指定为以下值之一,该值确定返回数据的数据类型。

Value 返回数据的数据类型
'细胞' Cell array
'table' table
'timetable' 时间表
'structure' structure

笔记

返回数据的默认数据类型取决于执行的函数。要指定默认数据类型,请设置DataReturnFormat财产为''。For default data types, see the supported function list.

您可以使用字符向量或字符串指定这些值(例如,“桌子”)。

当您创建一个blp对象,blp功能使此属性保持不设置。要检索数据,您必须在命令行或使用点表示法中手动设置此属性值,例如:

C。DataReturnFormat = 'structure';
然后,您可以使用这些支持的功能。金宝app

Supported Function Valid Data Types for Returned Data
Category
  • Cell array((default)

  • structure

  • table

eqs
  • Cell array((default)

  • structure

  • table

fieldinfo
  • Cell array((default)

  • structure

  • table

fieldSearch
  • Cell array((default)

  • structure

  • table

lookup
  • structure((default)

  • table

portfolio
  • structure((default)

  • table

getBulkData
  • structure((default)

  • table

  • 时间表

getdata
  • structure((default)

  • table

  • 时间表

history
  • numeric array (default)

  • table

  • 时间表

tahistory
  • structure((default)

  • table

  • 时间表

时间序列
  • Cell array((default for raw tick data)

  • 数字阵列(默认间隔刻度数据)

  • table

  • 时间表

笔记

Regardless of theDatetimeType属性值,如果DataReturnFormat属性值是'timetable',然后getdataandgetBulkData函数返回包含日期和时间值的表datetime数组。

对象功能

展开全部

彭博连接v3
get 属性彭博连接v3
isconnection Determine彭博连接v3
eqs Equity screening data for彭博连接v3
getBulkData 带有标头信息的批量数据彭博连接v3
getdata Current data for彭博连接v3
history 历史数据彭博连接v3
portfolio Current portfolio data for彭博连接v3
realtime 实时数据彭博连接v3
停止 Unsubscribe real-time requests for彭博连接v3
tahistory 历史技术分析彭博连接v3
时间序列 盘中滴答数据的数据彭博连接v3
Category 现场类别搜索彭博连接v3
fieldinfo Field information for彭博连接v3
fieldSearch Field search for彭博连接v3
lookup Find information about securities for彭博连接v3

Examples

Collapse all

首先,创建一个Bloomberg®连接,然后检索当前数据以获得安全性。

Create a connection to the Bloomberg Desktop.

C = BLP
c =带有属性的blp:session:[1×1 com.bloomberglp.blpapi.session] ipaddress:'localhost'端口:8194超时:0 dateTimeType:'dataReturnformat:'''''''''''''''

Cis a Bloomberg connection object with these properties:

  • 彭博V3 API Session object

  • 本地机器的IP地址

  • 本地机器的端口号

  • 在毫秒内指定MATLAB尝试连接到彭博桌面之前的数字

  • 日期和时间数据类型

  • 数据返回格式

Request the last and open prices for Microsoft®.

format银行%显示货币的数据格式s =“ MSFT US权益”;f = {'last_price';'打开'};[d,sec] = getData(c,s,f)
d=struct with fields:last_price:72.28开放:71.61
sec =1×1 cell array{'MSFT US Equity'}

getdatareturns a structuredwith the last and open prices. Also,getdatareturns the security in

关the Bloomberg Desktop connection.

关闭(c)

First, create a Bloomberg® connection with a timeout value, and then retrieve current data for a security.

Create a connection to the Bloomberg Desktop using the default port and IP address. Specify a timeout value of 10,000 milliseconds.

c = blp([],[],10000)
c = blp属性:会话:[1×1 com.bloomberglp.blpapi.Session] IPAddress: 'localhost' Port: 8194 TimeOut: 10000 DatetimeType: '' DataReturnFormat: ''

blp函数创建彭博连接对象C这些属性:

  • 彭博V3 API Session object

  • 本地机器的IP地址

  • 本地机器的端口号

  • Number of milliseconds specifying how long MATLAB® attempts to connect to Bloomberg Desktop before timing out

  • 日期和时间数据类型

  • 数据返回格式

Request the last and open prices for Microsoft®.

format银行%显示货币的数据格式s =“ MSFT US权益”;f = {'last_price';'打开'};[d,sec] = getData(c,s,f)
d=struct with fields:LAST_PRICE: 71.83 OPEN: 71.61
sec =1×1 cell array{'MSFT US Equity'}

getdatareturns a structuredwith the last and open prices. Also,getdatareturns the security in

关the Bloomberg Desktop connection.

关闭(c)

版本历史记录

Introduced in R2010a