create bloomberg emsx connection -凯发k8网页登录
create bloomberg emsx connection
since r2021a
description
the bloombergemsx
function creates a
bloombergemsx
object, which represents a bloomberg® emsx connection using the bloomberg v3 c api. after you create an bloombergemsx
object, you can
use the object functions to create and route orders, and then manage orders and routes. for
details about bloomberg emsx, see the .
creation
syntax
description
local connection
creates a connection to the local bloomberg emsx communications server using the service
c
= bloombergemsx(servicename
)servicename
with the bloomberg emsx c interface.
remote connection
creates a connection to a remote emsx server using the specified service name,
authentication identifier, and server ip address.c
= bloombergemsx(servicename
,authid
,serverip
)
also specifies the port number of the machine running the emsx server process.c
= bloombergemsx(servicename
,authid
,serverip
,portnumber
)
also specifies the ip address of the machine you use to access the bloomberg terminal for the remote connection.c
= bloombergemsx(servicename
,authid
,serverip
,portnumber
,terminalip
)
input arguments
servicename
— bloomberg emsx service name
'//blp/emapisvc_beta'
| '//blp/emapisvc'
bloomberg emsx service name, specified as one of these connection types.
connection type | bloomberg emsx service name |
---|---|
test |
|
production |
|
authid
— bloomberg emsx authentication identifier
character vector | string scalar
bloomberg emsx authentication identifier, specified as a character vector or string scalar.
this input argument is required for bloomberg emsx server. if you are using bloomberg emsx desktop, specify an empty character vector or string scalar because this input argument is not required.
serverip
— bloomberg emsx server ip address
character vector | string scalar
bloomberg emsx server ip address, specified as a character vector or string scalar. this address is the ip address of the machine running the bloomberg emsx server process.
this input argument is required for bloomberg emsx server. if you are using bloomberg emsx desktop, specify an empty character vector or string scalar because this input argument is not required.
example: '111.222.333.44'
portnumber
— port number
8194
(default) | numeric scalar
port number of the machine running the emsx server process, specified as a numeric scalar.
this input argument is required for bloomberg emsx server. if you are using bloomberg emsx desktop, specify an empty array because this input argument is not required.
terminalip
— bloomberg terminal ip address
"localhost"
(default) | character vector | string scalar
bloomberg terminal ip address, specified as a character vector or string scalar. this address is the ip address of the machine you use to access the bloomberg terminal.
example: '111.222.333.44'
properties
session
— bloomberg emsx session
session object
this property is read-only.
bloomberg emsx session, specified as a bloomberg emsx session object.
example: [1x1 datafeed.internal.blpsession]
service
— bloomberg emsx service
character vector
this property is read-only.
bloomberg emsx service, specified as a character vector.
the bloombergemsx
function sets this property using the
servicename
input argument.
example: '//blp/emapisvc_beta'
ipaddress
— ip address
'localhost'
(default) | character vector
this property is read-only.
ip address of the machine running bloomberg emsx, specified as a character vector.
data types: char
port
— port number
numeric scalar
this property is read-only.
port number of the machine running bloomberg emsx, specified as a numeric scalar.
example:
8194
data types: double
user
— user
bloomberg api c object
this property is read-only.
user, specified as a bloomberg api c object for bloomberg emsx server. for bloomberg emsx desktop, this property is empty.
example:
[1×1 com.bloomberglp.blpapi.impl.by]
object functions
create bloomberg emsx connection
obtain bloomberg emsx order subscription | |
obtain bloomberg emsx route subscription | |
close bloomberg emsx connection |
create bloomberg emsx orders and routes
create bloomberg emsx order | |
route bloomberg emsx order | |
route bloomberg emsx order with strategies | |
route group of bloomberg emsx orders | |
route group of bloomberg emsx orders with strategies | |
create and route bloomberg emsx order | |
create and route bloomberg emsx order with strategies | |
create basket of bloomberg emsx orders |
manage bloomberg emsx orders and routes
fill bloomberg emsx orders manually | |
modify bloomberg emsx order | |
modify bloomberg emsx route | |
modify bloomberg emsx route with strategies | |
delete bloomberg emsx order | |
delete bloomberg emsx active shares | |
sample bloomberg emsx event handler |
retrieve bloomberg emsx information
obtain bloomberg emsx broker and strategy information | |
obtain bloomberg emsx field information |
examples
connect to bloomberg emsx test service
first, create a bloomberg emsx test service connection. then, obtain broker information.
create a connection c
to the bloomberg emsx test service using the bloomberg emsx c interface. you can place test calls using this service.
c = bloombergemsx('//blp/emapisvc_beta');
c = bloombergemsx with properties: session: [1×1 datafeed.internal.blpsession] service: '//blp/emapisvc_beta' ipaddress: "111.222.333.44" port: 8194.00 user: []
matlab® returns c
as the connection to the bloomberg emsx test service with the following properties:
bloomberg emsx session object
bloomberg emsx service
ip address of the machine running the bloomberg emsx test service
port number of the machine running the bloomberg emsx test service
bloomberg api c object
define the broker and strategy information structure brokerstrat
.
obtain broker information using the bloomberg emsx connection c
and structure
brokerstrat
.
the emsx_brokers
field lists the bloomberg emsx brokers.
brokerstrat.emsx_ticker = 'abcd us equity';
r = getbrokerinfo(c,brokerstrat)
r = emsx_brokers: {2x1 cell}
close the bloomberg emsx connection.
close(c)
connect to bloomberg emsx production service
first, create a bloomberg emsx production service connection. then, obtain broker information.
create a connection c
to the bloomberg emsx production service using the bloomberg emsx c interface. you can place live calls using this service.
c = bloombergemsx('//blp/emapisvc')
c = bloombergemsx with properties: session: [1×1 datafeed.internal.blpsession] service: '//blp/emapisvc' ipaddress: "111.222.333.44" port: 8194.00 user: []
matlab returns c
as the connection to the bloomberg emsx production service with the following properties:
bloomberg emsx session object
bloomberg emsx service
ip address of the machine running the bloomberg emsx test service
port number of the machine running the bloomberg emsx test service
bloomberg api c object
define the broker and strategy information structure brokerstrat
.
obtain broker information using the bloomberg emsx connection c
and structure
brokerstrat
.
the emsx_brokers
field lists the bloomberg emsx brokers.
brokerstrat.emsx_ticker = 'abcd us equity';
r = getbrokerinfo(c,brokerstrat)
r = emsx_brokers: {2x1 cell}
close the bloomberg emsx connection.
close(c)
connect to bloomberg emsx remote server
obtain broker information using a bloomberg emsx test connection to a remote server.
create a connection c
to the bloomberg emsx remote server using the bloomberg emsx c interface. specify the service name, authentication identifier,
and server ip address.
servicename = '//blp/emapisvc_beta'; authid = 'abcdef123'; serverip = '111.222.333.44'; c = bloombergemsx(servicename,authid,serverip)
c = bloombergemsx with properties: session: [1×1 datafeed.internal.blpsession] service: '//blp/emapisvc_beta' ipaddress: "111.222.333.44" port: 8194.00 user: []
matlab returns c
as the connection to the bloomberg emsx test service with the following properties:
bloomberg emsx session object
bloomberg emsx service
ip address of the machine running the bloomberg emsx test service
port number of the machine running the bloomberg emsx test service
bloomberg api c object
define the broker and strategy information structure brokerstrat
.
obtain broker information using the bloomberg emsx connection c
and structure
brokerstrat
.
the emsx_brokers
field lists the bloomberg emsx brokers.
brokerstrat.emsx_ticker = 'abcd us equity';
r = getbrokerinfo(c,brokerstrat)
r = emsx_brokers: {2x1 cell}
close the bloomberg emsx connection.
close(c)
connect to bloomberg emsx remote server with port number
obtain broker information using a bloomberg emsx test connection to a remote server with a port number.
create a connection c
to the bloomberg emsx remote server using the bloomberg emsx c interface. specify the service name, authentication identifier,
server ip address, and port number.
servicename = '//blp/emapisvc_beta'; authid = 'abcdef123'; serverip = '111.222.333.44'; portnumber = 5678; c = bloombergemsx(servicename,authid,serverip,portnumber)
c = bloombergemsx with properties: session: [1×1 datafeed.internal.blpsession] service: '//blp/emapisvc_beta' ipaddress: "111.222.333.44" port: 5678.00 user: []
matlab returns c
as the connection to the bloomberg emsx test service with the following properties:
bloomberg emsx session object
bloomberg emsx service
ip address of the machine running the bloomberg emsx test service
port number of the machine running the bloomberg emsx test service
bloomberg api c object
define the broker and strategy information structure brokerstrat
.
obtain broker information using the bloomberg emsx connection c
and structure
brokerstrat
.
the emsx_brokers
field lists the bloomberg emsx brokers.
brokerstrat.emsx_ticker = 'abcd us equity';
r = getbrokerinfo(c,brokerstrat)
r = emsx_brokers: {2x1 cell}
close the bloomberg emsx connection.
close(c)
connect to bloomberg emsx remote server with terminal ip address
obtain broker information using a bloomberg emsx test connection to a remote server with a port number and bloomberg terminal ip address.
create a connection c
to the bloomberg emsx remote server using the bloomberg emsx c interface. specify the service name, authentication identifier,
server ip address, and port number. also, specify the ip address of the machine you use
to access the bloomberg terminal.
servicename = '//blp/emapisvc_beta'; authid = 'abcdef123'; serverip = '111.222.333.44'; portnumber = 8194; terminalip = '5555.222.333.44'; c = bloombergemsx(servicename,authid,serverip,portnumber,terminalip)
c = bloombergemsx with properties: session: [1×1 datafeed.internal.blpsession] service: '//blp/emapisvc_beta' ipaddress: "111.222.333.44" port: 8194.00 user: []
matlab returns c
as the connection to the bloomberg emsx test service with the following properties:
bloomberg emsx session object
bloomberg emsx service
ip address of the machine running the bloomberg emsx test service
port number of the machine running the bloomberg emsx test service
bloomberg api c object
define the broker and strategy information structure brokerstrat
.
obtain broker information using the bloomberg emsx connection c
and structure
brokerstrat
.
the emsx_brokers
field lists the bloomberg emsx brokers.
brokerstrat.emsx_ticker = 'abcd us equity';
r = getbrokerinfo(c,brokerstrat)
r = emsx_brokers: {2x1 cell}
close the bloomberg emsx connection.
close(c)
version history
introduced in r2021a
see also
topics
external websites
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)
- 中国
- (日本語)
- (한국어)