bloomberg b-凯发k8网页登录
bloomberg b-pipe connection v3
description
the bpipe
function creates a bpipe
object. the bpipe
object represents a bloomberg®
b-pipe® connection.
other functions connect to different bloomberg services: bloomberg desktop (blp
), and bloomberg server (blpsrv
). for details about these
services, see .
for details about bloomberg connection requirements, see . to ensure a successful bloomberg connection, perform the required steps before executing
bpipe
. for details, see .
creation
syntax
description
c = bpipe(authtype,appname,ipaddress,port,timeout,
connects to a b-pipe zero-footprint cloud solution using the specified credentials
file, password, and trust file.tlscred
,tlspassword
,tlstrust
)
caution
to refer to a bloomberg connection in other functions, use the connection object
created by the bpipe
function. otherwise, using
bpipe
as an input argument opens multiple
bloomberg connections, causing unexpected behavior and exhausting
memory resources.
input arguments
tlscred
— credentials file
character vector | string scalar
credentials file, specified as a character vector or string scalar
that contains the full path to the credentials file with the extension
pk12
. for details about the credentials file,
contact bloomberg.
data types: char
| string
tlspassword
— b-pipe password
character vector | string scalar
b-pipe password, specified as a character vector or string scalar. to obtain your b-pipe password, contact bloomberg.
data types: char
| string
tlstrust
— trust file
character vector | string scalar
trust file, specified as a character vector or string scalar that
contains the full path to the trust file with the extension
pk7
. for details about the trust file, contact
bloomberg.
data types: char
| string
properties
appauthtype
— application authentication type
""
(default) | "appname_and_key"
this property is read-only.
application authentication type, specified as one of these values:
""
— bloomberg b-pipe connection with windows® authentication"appname_and_key"
— bloomberg b-pipe connection with application authentication
authtype
— bloomberg user authentication type
"os_logon"
| "application_only"
bloomberg user authentication type, specified as one of these values:
"os_logon"
— bloomberg b-pipe connection with windows authentication"application_only"
— bloomberg b-pipe connection with application authentication
for details, see the bloomberg
b-pipe api developer’s guide using the wapi
appname
— application name
character vector | string
application name, specified as a character vector or string that identifies the application you are using to connect to bloomberg b-pipe.
example: 'appname'
data types: char
| string
user
— bloomberg user
bloomberg user identity object
this property is read-only.
bloomberg user, specified as a bloomberg user identity object.
example: [1x1
com.bloomberglp.blpapi.impl.at]
session
— bloomberg v3 session
bloomberg v3 api session object
this property is read-only.
bloomberg v3 session, specified as a bloomberg v3 api session object.
example: [1x1 com.bloomberglp.blpapi.session]
ipaddress
— ip address
character vector | cell array of character vectors | string | string array
ip address of the machine running the bloomberg b-pipe process, specified as a character vector, cell array of character vectors, string, or string array. a character vector or string identifies the machine running the bloomberg b-pipe process, whereas a cell array of character vectors or string array specifies multiple machines.
example: {'111.11.11.112'}
data types: char
| cell
| string
port
— port number
[]
(default) | numeric scalar
port number of the machine running the bloomberg b-pipe process, specified as a numeric scalar.
example: 8194
data types: double
timeout
— timeout
numeric scalar
timeout specifying the time in milliseconds that matlab® attempts to connect to the machine running the bloomberg b-pipe process before timing out, specified as a numeric scalar.
example: 1000
data types: double
datetimetype
— date and time data type
''
(default) | 'datetime'
date and time data type, specified as one of these values.
value | description |
---|---|
'' (default) | return date and time values as matlab date numbers. |
'datetime' | return date and time values as a datetime
array. |
you can specify these values using a character vector or string (for example,
"datetime"
).
when you create a bpipe
object, the
bpipe
function leaves this property unset. to retrieve
data, you must set this property value manually at the command line or in a script using
dot notation, for example:
c.datetimetype = 'datetime';
note
if the
datareturnformat
property value is'table'
and thedatetimetype
property value is'datetime'
, then the returned data is a table that contains date and time values as adatetime
array. if thedatareturnformat
property value is an empty character vector, then setting thedatetimetype
property to'datetime'
returns date and time values for aggregated ticks and historical requests as matlab date numbers.
datareturnformat
— data return format
'cell'
| 'structure'
| 'table'
| 'timetable'
data return format, specified as one of these values, which determine the data type of the returned data.
value | data type of returned data |
---|---|
'cell' | cell array |
'table' | table |
'timetable' | timetable |
'structure' | structure |
note
the default data type of the returned data depends on the executed function.
to specify the default data type, set the datareturnformat
property to ''
. for default data types, see the supported
function list.
you can specify these values using a character vector or string (for example,
"table"
).
when you create a bpipe
object, the
bpipe
function leaves this property unset. to retrieve
data, you must set this property value manually at the command line or in a script using
dot notation, for example:
c.datareturnformat = 'structure';
supported function | valid data types for returned data |
---|---|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
note
regardless of the datetimetype
property value, if the
datareturnformat
property value is
'timetable'
, then the getdata
and
getbulkdata
functions return a table that contains date and
time values as datetime
arrays.
object functions
bloomberg b-pipe connection
close bloomberg connection v3 | |
properties of bloomberg connection v3 | |
determine bloomberg connection v3 |
bloomberg b-pipe data retrieval
equity screening data for bloomberg connection v3 | |
bulk data with header information for bloomberg connection v3 | |
current data for bloomberg connection v3 | |
historical data for bloomberg connection v3 | |
current portfolio data for bloomberg connection v3 | |
real-time data for bloomberg connection v3 | |
unsubscribe real-time requests for bloomberg connection v3 | |
historical technical analysis for bloomberg connection v3 | |
intraday tick data for bloomberg connection v3 |
bloomberg b-pipe data information
field category search for bloomberg connection v3 | |
field information for bloomberg connection v3 | |
field search for bloomberg connection v3 | |
find information about securities for bloomberg connection v3 |
examples
create bloomberg b-pipe connection
create a bloomberg b-pipe connection using the ip address of the machine running the bloomberg b-pipe process. this example assumes the following:
the authentication is windows authentication when you set
authtype
to'os_logon'
.the application name is blank because you are not connecting to bloomberg b-pipe using an application.
the ip address for the machine running the bloomberg b-pipe process is
'111.11.11.112'
.the port number of the machine running the bloomberg b-pipe process is
8194
.
authtype = 'os_logon'; appname = ''; ipaddress = {'111.11.11.112'}; port = 8194; c = bpipe(authtype,appname,ipaddress,port)
c = bpipe with properties: appauthtype: '' authtype: 'os_logon' appname: [] user: [1x1 com.bloomberglp.blpapi.impl.at] session: [1x1 com.bloomberglp.blpapi.session] ipaddress: {'111.11.11.112'} port: 8194.00 timeout: 0 datetimetype: '' datareturnformat: ''
bpipe
connects to the machine running bloomberg
b-pipe at port number 8194
.
bpipe
creates the bloomberg
b-pipe connection object c
with these properties:
application authentication type
bloomberg user authentication type
application name
bloomberg user identity object
bloomberg v3 api session object
ip address of the machine running the bloomberg b-pipe process
port number of the machine running the bloomberg b-pipe process
number (in milliseconds) specifying how long matlab attempts to connect to the machine before timing out
date and time data type
data return format
request the last and open prices for microsoft®.
format bank % display data format for currency s = 'msft us equity'; f = {'last_price';'open'}; [d,sec] = getdata(c,s,f)
d = last_price: 33.34 open: 33.60 sec = 'msft us equity'
getdata
returns a
structure d
with the last and open prices. also,
getdata
returns the name of the security in
sec
.
close the bloomberg b-pipe connection.
close(c)
create bloomberg b-pipe connection with timeout
create a bloomberg b-pipe connection using the ip address of the machine running the bloomberg b-pipe process. this example assumes the following:
the authentication is windows authentication when you set
authtype
to'os_logon'
.the application name is blank because you are not connecting to bloomberg b-pipe using an application.
the ip address for the machine running the bloomberg b-pipe process is
'111.11.11.112'
.the port number of the machine running the bloomberg b-pipe process is
8194
.the timeout value is 1000 milliseconds.
authtype = 'os_logon'; appname = ''; ipaddress = {'111.11.11.112'}; port = 8194; timeout = 1000; c = bpipe(authtype,appname,ipaddress,port,timeout)
c = bpipe with properties: appauthtype: '' authtype: 'os_logon' appname: [] user: [1x1 com.bloomberglp.blpapi.impl.at] session: [1x1 com.bloomberglp.blpapi.session] ipaddress: {'172.28.17.118'} port: 8194.00 timeout: 1000.00 datetimetype: '' datareturnformat: ''
bpipe
connects to the machine running bloomberg
b-pipe at port number 8194
.
bpipe
creates the bloomberg
b-pipe connection object c
with these properties:
application authentication type
bloomberg user authentication type
application name
bloomberg user identity object
bloomberg v3 api session object
ip address of the machine running the bloomberg b-pipe process
port number of the machine running the bloomberg b-pipe process
number (in milliseconds) specifying how long matlab attempts to connect to the machine before timing out
date and time data type
data return format
request the last and open prices for microsoft.
format bank % display data format for currency s = 'msft us equity'; f = {'last_price';'open'}; [d,sec] = getdata(c,s,f)
d = last_price: 33.34 open: 33.60 sec = 'msft us equity'
getdata
returns a
structure d
with the last and open prices. also,
getdata
returns the name of the security in
sec
.
close the bloomberg b-pipe connection.
close(c)
create bloomberg b-pipe zero-footprint connection
create a bloomberg b-pipe zero-footprint connection using the ip address of the machine running the bloomberg b-pipe process. this example assumes the following:
the authentication is based on the application name when you set
authtype
to'application_only'
.the application name is
'app'
.the ip address for the machine running the bloomberg b-pipe process is
'111.11.11.112'
.the port number of the machine running the bloomberg b-pipe process is
8194
.the number (in milliseconds) specifying how long matlab attempts to connect to the machine before timing out is 1000.
the full path of the credentials file is
c:\abcdefg.pk12
.the b-pipe password is
12345
.the full path of the trust file is
c:\hijklm.pk7
.
authtype = 'application_only'; appname = 'app'; ipaddress = {'111.11.11.112'}; port = 8194; timeout = 1000; tlscred = 'c:\abcdefg.pk12'; tlspassword = '12345'; tlstrust = 'c:\hijklm.pk7'; c = bpipe(authtype,appname,ipaddress,port, ... timeout,tlscred,tlspassword,tlstrust)
c = bpipe with properties: appauthtype: 'appname_and_key' authtype: 'application_only' appname: 'app' user: [1x1 com.bloomberglp.blpapi.impl.by] session: [1x1 com.bloomberglp.blpapi.session] ipaddress: {'111.11.11.112'} port: 8194.00 timeout: 1000.00 datetimetype: '' datareturnformat: ''
bpipe
connects to the machine running bloomberg
b-pipe at port number 8194
. the
bpipe
function creates the bloomberg
b-pipe connection object c
with these properties:
application authentication type
bloomberg user authentication type
application name
bloomberg user identity object
bloomberg v3 api session object
ip address of the machine running the bloomberg b-pipe process
port number of the machine running the bloomberg b-pipe process
number (in milliseconds) specifying how long matlab attempts to connect to the machine before timing out
date and time data type
data return format
request the last and open prices for microsoft.
format bank % display data format for currency s = 'msft us equity'; f = {'last_price';'open'}; [d,sec] = getdata(c,s,f)
d = last_price: 33.34 open: 33.60 sec = 'msft us equity'
getdata
returns a
structure d
with the last and open prices. also,
getdata
returns the name of the security in
sec
.
close the bloomberg b-pipe connection.
close(c)
version history
introduced in r2014b
see also
topics
matlab 命令
您点击的链接对应于以下 matlab 命令:
请在 matlab 命令行窗口中直接输入以执行命令。web 浏览器不支持 matlab 命令。
select a web site
choose a web site to get translated content where available and see local events and offers. based on your location, we recommend that you select: .
you can also select a web site from the following list:
how to get best site performance
select the china site (in chinese or english) for best site performance. other mathworks country sites are not optimized for visits from your location.
americas
- (español)
- (english)
- (english)
europe
- (english)
- (english)
- (deutsch)
- (español)
- (english)
- (français)
- (english)
- (italiano)
- (english)
- (english)
- (english)
- (deutsch)
- (english)
- (english)
- switzerland
- (english)
asia pacific
- (english)
- (english)
- (english)
- 中国
- (日本語)
- (한국어)