Quantcast

Documentation Center

  • Trial Software
  • Product Updates

modifyOrder

Modify Bloomberg EMSX order

Syntax

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

Description

example

R = modifyOrder(c,reqStruct) modifies a Bloomberg® EMSX order and returns a status message using the default event handler.

example

R = modifyOrder(c,reqStruct,Name,Value) uses additional options specified by one or more Name, Value pair arguments. Modify a Bloomberg EMSX order 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:

     modifyOrder(c,reqStruct,'useDefaultEventHandler',false)
     processEvent(c)

Examples

expand all

Modify Order for Bloomberg EMSX Using Default Event Handler

Define the reqStruct and then modify the order.

reqStruct.EMSX_SEQUENCE = int32(335877)
reqStruct.EMSX_TICKER = 'XYZ';
reqStruct.EMSX_AMOUNT = int32(200);
r = modifyOrder(c,reqStruct)
r = 
    
     EMSX_SEQUENCE: 3335877
           MESSAGE: 'Order Modified'

Modify Order for Bloomberg EMSX Using Custom Event Handler

Define the reqStruct and then modify the order.

reqStruct.EMSX_SEQUENCE = int32(335877)
reqStruct.EMSX_TICKER = 'XYZ';
reqStruct.EMSX_AMOUNT = int32(200);
modifyOrder(c,reqStruct,'useDefaultEventHandler',false)
processEvent(c)
  ModifyOrder = {
 
     EMSX_SEQUENCE = 335877
 
     MESSAGE = Order Modified
 
     }

Modify Order for Bloomberg Using timeOut Value

Define the reqStruct and then modify the order.

reqStruct.EMSX_SEQUENCE = int32(335877)
reqStruct.EMSX_ROUTE_ID = int32(1)  
modifyOrder(c,int32(335877),'timeOut',200)
r = 
    
     EMSX_SEQUENCE: 3335877
           MESSAGE: 'Order Modified'

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

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

Example: reqStruct.EMSX_TICKER = 'XYZ';
reqStruct.EMSX_AMOUNT = int32(100);
reqStruct.EMSX_ORDER_TYPE = 'MKT';
reqStruct.EMSX_TIF = 'DAY';
reqStruct.EMSX_HAND_INSTRUCTION = 'ANY';
reqStruct.EMSX_SIDE = 'BUY';

Data Types: 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: modifyOrder(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?