main content

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

description

local connection

example

c = bloombergemsx(servicename) creates a connection to the local bloomberg emsx communications server using the service servicename with the bloomberg emsx c interface.

remote connection

example

c = bloombergemsx(servicename,authid,serverip) creates a connection to a remote emsx server using the specified service name, authentication identifier, and server ip address.

example

c = bloombergemsx(servicename,authid,serverip,portnumber) also specifies the port number of the machine running the emsx server process.

example

c = bloombergemsx(servicename,authid,serverip,portnumber,terminalip) also specifies the ip address of the machine you use to access the bloomberg terminal for the remote connection.

input arguments

bloomberg emsx service name, specified as one of these connection types.

connection typebloomberg emsx service name

test

'//blp/emapisvc_beta'

production

'//blp/emapisvc'

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.

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'

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.

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

this property is read-only.

bloomberg emsx session, specified as a bloomberg emsx session object.

example: [1x1 datafeed.internal.blpsession]

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'

this property is read-only.

ip address of the machine running bloomberg emsx, specified as a character vector.

data types: char

this property is read-only.

port number of the machine running bloomberg emsx, specified as a numeric scalar.

example: 8194

data types: double

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

obtain bloomberg emsx order subscription
obtain bloomberg emsx route subscription
close bloomberg emsx connection
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
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
obtain bloomberg emsx broker and strategy information
obtain bloomberg emsx field information

examples

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)

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)

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)

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)

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

      网站地图