Quantcast

Documentation Center

  • Trial Software
  • Product Updates

getRouteInfo

Obtain Bloomberg EMSX route information

Syntax

  • R = getRouteInfo(c,reqStruct) example
  • R = getRouteInfo(c,reqStruct,Name,Value) example

Description

example

R = getRouteInfo(c,reqStruct) obtains Bloomberg® EMSX route information and returns a status message using the default event handler.

example

R = getRouteInfo(c,reqStruct,Name,Value) uses additional options specified by one or more Name, Value pair arguments. Obtain Bloomberg EMSX route information using optional name-value arguments to specify a custom event handler or timeout value for the event handler.

    Note:   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;
    getRouteInfo(c,reqStruct,p)

Examples

expand all

Obtain Route Information for Bloomberg EMSX Using Default Event Handler

Define the reqstruct and note that EMSX_SEQUENCE and EMSX_ROUTE_ID must denote an existing order.

reqStruct.EMSX_SEQUENCE = int32(335877);
reqStruct.EMSX_ROUTE_ID = int32(1);
r = getRouteInfo(c,reqStruct)
r = 

                 EMSX_AVG_PRICE: 189.7900
                     EMSX_YIELD: 0
         EMSX_ROUTE_CREATE_DATE: 20121206
         EMSX_ROUTE_CREATE_TIME: 142837
    EMSX_ROUTE_LAST_UPDATE_DATE: 20121206
    EMSX_ROUTE_LAST_UPDATE_TIME: 143251
               EMSX_SETTLE_DATE: 20121211
                    EMSX_AMOUNT: 250
                    EMSX_FILLED: 250
           EMSX_IS_MANUAL_ROUTE: 0
                    EMSX_BROKER: 'BB'
                   EMSX_ACCOUNT: ''
                 EMSX_STATUS_ID: 199032
                    EMSX_STATUS: 'Filled'
          EMSX_HAND_INSTRUCTION: 'ANY'
                EMSX_ORDER_TYPE: 'MKT'
                       EMSX_TIF: 'DAY'
                    EMSX_LOC_ID: ''
                EMSX_LOC_BROKER: 'DAY'
                EMSX_STOP_PRICE: 0
              EMSX_BLOT_SEQ_NUM: 1
                 EMSX_BLOT_DATE: 20121206
                 EMSX_COMM_TYPE: 'DAY'
                 EMSX_COMM_RATE: 0
          EMSX_USER_COMM_AMOUNT: 0
                 EMSX_LSTTR2ID0: 1.3548e+09
                 EMSX_LSTTR2ID1: 284950536
               EMSX_LIMIT_PRICE: 0

Obtain Route Information for Bloomberg EMSX Using Custom Event Handler

Define the reqstruct and note that EMSX_SEQUENCE and EMSX_ROUTE_ID must denote an existing order.

reqStruct.EMSX_SEQUENCE = int32(335877);
reqStruct.EMSX_ROUTE_ID = int32(1);
r = getRouteInfo(c,reqStruct,'useDefaultEventHandler',false)

processEvent(c)
RouteInfo = {

    EMSX_LIMIT_PRICE = 0.0

    EMSX_YIELD = 0.0

    EMSX_AVG_PRICE = 193.9600067138672

    EMSX_ROUTE_CREATE_DATE = 20121211

    EMSX_ROUTE_CREATE_TIME = 101324

    EMSX_ROUTE_LAST_UPDATE_DATE = 20121211

    EMSX_ROUTE_LAST_UPDATE_TIME = 101325

    EMSX_SETTLE_DATE = 20121214

    EMSX_AMOUNT = 100

    EMSX_FILLED = 50

    EMSX_IS_MANUAL_ROUTE = 0

    EMSX_BROKER = BB

    EMSX_ACCOUNT = 
 
    EMSX_STATUS_ID = 51088

    EMSX_STATUS = PtlFil

    EMSX_HAND_INSTRUCTION = ANY

    EMSX_ORDER_TYPE = MKT

    EMSX_TIF = DAY

    EMSX_LOC_ID = 
 
    EMSX_LOC_BROKER = 
 
    EMSX_STOP_PRICE = 0.0

    EMSX_BLOT_SEQ_NUM = 2

    EMSX_BLOT_DATE = 20121211

    EMSX_COMM_TYPE = 
 
    EMSX_COMM_RATE = 0.0

    EMSX_USER_COMM_AMOUNT = 0.0

    EMSX_LSTTR2ID0 = 1355238804

    EMSX_LSTTR2ID1 = 284950539

}

Obtain Route Information for Bloomberg EMSX Using timeOut Value

Define the reqstruct and note that EMSX_SEQUENCE and EMSX_ROUTE_ID must denote an existing order.

reqStruct.EMSX_SEQUENCE = int32(335877);
reqStruct.EMSX_ROUTE_ID = int32(1);
r = getRouteInfo(c,reqStruct,'timeOut',200)
r = 

                 EMSX_AVG_PRICE: 189.7900
                     EMSX_YIELD: 0
         EMSX_ROUTE_CREATE_DATE: 20121206
         EMSX_ROUTE_CREATE_TIME: 142837
    EMSX_ROUTE_LAST_UPDATE_DATE: 20121206
    EMSX_ROUTE_LAST_UPDATE_TIME: 143251
               EMSX_SETTLE_DATE: 20121211
                    EMSX_AMOUNT: 250
                    EMSX_FILLED: 250
           EMSX_IS_MANUAL_ROUTE: 0
                    EMSX_BROKER: 'BB'
                   EMSX_ACCOUNT: ''
                 EMSX_STATUS_ID: 199032
                    EMSX_STATUS: 'Filled'
          EMSX_HAND_INSTRUCTION: 'ANY'
                EMSX_ORDER_TYPE: 'MKT'
                       EMSX_TIF: 'DAY'
                    EMSX_LOC_ID: ''
                EMSX_LOC_BROKER: 'DAY'
                EMSX_STOP_PRICE: 0
              EMSX_BLOT_SEQ_NUM: 1
                 EMSX_BLOT_DATE: 20121206
                 EMSX_COMM_TYPE: 'DAY'
                 EMSX_COMM_RATE: 0
          EMSX_USER_COMM_AMOUNT: 0
                 EMSX_LSTTR2ID0: 1.3548e+09
                 EMSX_LSTTR2ID1: 284950536
               EMSX_LIMIT_PRICE: 0

Input Arguments

expand all

c — Connection object for Bloomberg EMSX serviceobject structure

Connection object for Bloomberg EMSX service, specified using emsx.

reqStruct — Order request structurestructure | integer for EMSX_SEQUENCE and EMSX_ROUTE_ID

Order request structure, specified using EMSX field properties. Use getAllFieldMetaData to view all available field property options for reqStruct.

    Note:   EMSX_SEQUENCE must denote an existing order sequence number and EMSX_ROUTE_ID must denote an existing route ID.

Example: reqStruct.EMSX_SEQUENCE = int32(335877);
reqStruct.EMSX_ROUTE_ID = int32(1);

Data Types: int32 | struct

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: r = getRouteInfo(c,reqStruct,'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 order event, returned as a structure.

See Also

| | | | | | |

Was this topic helpful?