Documentation Center

  • Trial Software
  • Product Updates

routes

Obtain Bloomberg EMSX route subscription

Syntax

Description

example

R = routes(c,fields) subscribes to Bloomberg® EMSX fields and returns information about existing routes using the default event handler.

example

R = routes(c,fields,Name,Value) uses additional options specified by one or more Name, Value pair arguments. Subscribe to Bloomberg EMSX fields and return information about existing routes using optional name-value arguments to specify a custom event handler or timeout value for the event handler.

    Note:   Optional name-value pair arguments can be input as a single input structure containing some or all of the property fields, for example:

    p.timeOut = 1000;
    routes(c,{'EMSX_BROKER','EMSX_WORKING'},p)

Examples

expand all

Route Subscription for Bloomberg EMSX Using Default Event Handler

Return the status for route subscription for existing routes.

routes(c, {'EMSX_BROKER','EMSX_WORKING'})
routes = 

                       MSG_TYPE: {3x1 cell}
                   MSG_SUB_TYPE: {3x1 cell}
                   EVENT_STATUS: [3x1 int32]
                    API_SEQ_NUM: [3x1 int64]
                  EMSX_SEQUENCE: [3x1 int32]
                  EMSX_ROUTE_ID: [3x1 int32]
                   EMSX_FILL_ID: [3x1 int32]
                      EMSX_SIDE: {3x1 cell}
                    EMSX_AMOUNT: [3x1 int32]
                    EMSX_FILLED: [3x1 int32]
                 EMSX_AVG_PRICE: [3x1 double]
                    EMSX_BROKER: {3x1 cell}
                   EMSX_WORKING: [3x1 int32]
                    EMSX_TICKER: {3x1 cell}
                  EMSX_EXCHANGE: {3x1 cell}

                          ...     

Route Subscription for Bloomberg EMSX Using Custom Event Handler

Return the status for route subscription for existing routes using a custom event handler.

routes(c, {'EMSX_BROKER','EMSX_WORKING'},'useDefaultEventHandler',false)
processEvent(c)
OrderRouteFields = {

    MSG_TYPE = E

    MSG_SUB_TYPE = R

    EVENT_STATUS = 4

    API_SEQ_NUM = 1

    EMSX_SEQUENCE = 381490

    EMSX_ROUTE_ID = 1

    EMSX_FILL_ID = 0 

   ...

Route Subscription for Bloomberg EMSX Using timeOut Value

Return the status for route subscription for existing routes using a timeout value.

routes(c, {'EMSX_BROKER','EMSX_WORKING'},'timeOut',200)
routes = 

                       MSG_TYPE: {3x1 cell}
                   MSG_SUB_TYPE: {3x1 cell}
                   EVENT_STATUS: [3x1 int32]
                    API_SEQ_NUM: [3x1 int64]
                  EMSX_SEQUENCE: [3x1 int32]
                  EMSX_ROUTE_ID: [3x1 int32]
                   EMSX_FILL_ID: [3x1 int32]
                      EMSX_SIDE: {3x1 cell}
                    EMSX_AMOUNT: [3x1 int32]
                    EMSX_FILLED: [3x1 int32]
                 EMSX_AVG_PRICE: [3x1 double]
                    EMSX_BROKER: {3x1 cell}
                   EMSX_WORKING: [3x1 int32]
                    EMSX_TICKER: {3x1 cell}
                  EMSX_EXCHANGE: {3x1 cell}

                             ...       

Input Arguments

expand all

c — Connection object for Bloomberg EMSX serviceobject structure

Connection object for Bloomberg EMSX service, specified using emsx.

fields — EMSX field informationcell array

EMSX field information, specified using a cell array. Use getAllFieldMetaData to view available field information for the Bloomberg EMSX service.

Example: 'EMSX_TICKER'
'EMSX_AMOUNT'
'EMSX_ORDER_TYPE'

Data Types: cell

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: routes(c, {'EMSX_BROKER','EMSX_WORKING'},'useDefaultEventHandler',false)

'useDefaultEventHandler' — Flag for event handler preferencetrue (default) | logical with value true or false

Flag for event handler preference, indicating whether to use the default or custom event handler to process order events, as specified by the string true or false. When this flag is set to the default, true, the default event handler is used. If a custom event handler is used, this flag must be set to false.

Example: 'useDefaultEventHandler',false

Data Types: logical

'timeOut' — Connection timeout value for event handler for Bloomberg EMSX service500 milliseconds (default) | nonnegative integer

Connection timeout value, specified as a nonnegative integer in units of milliseconds.

Example: 'timeOut',200

Data Types: char

Output Arguments

expand all

R — Return status for requested eventstructure

Return status for the route subscription for existing routes, returned as a structure.

See Also

| | | |

Was this topic helpful?