Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

orderInfo

Retrieve FIX Flyer order status and information

Syntax

o = orderInfo(c)
o = orderInfo(c,status)
o = orderInfo(c,infoterm,infovalue)

Description

example

o = orderInfo(c) returns order information for all orders associated with the FIX Flyer™ connection c.

example

o = orderInfo(c,status) filters orders by the order status.

example

o = orderInfo(c,infoterm,infovalue) filters orders by a specified term infoterm and value infovalue.

Examples

collapse all

First, create a FIX Flyer Engine connection, add a FIX Flyer event listener, and subscribe to FIX sessions as in Create an Order Using FIX Flyer. Then, create and send a FIX message for a new order. Display the order information for all orders.

Create structure orderStruct to contain the FIX message for a new order. This order is a market order to sell 1000 IBM® shares.

orderStruct.BeginString{1,1} = 'FIX.4.4';
orderStruct.CLOrdId{1,1} = '338';
orderStruct.Side{1,1} = '2';
orderStruct.TransactTime{1,1} = datestr(now);
orderStruct.OrdType{1,1} = 'D';
orderStruct.Symbol{1,1} = 'IBM';
orderStruct.HandlInst{1,1} = '1';
orderStruct.MsgType{1,1} = 'D';
orderStruct.OrderQty{1,1} = '1000';
orderStruct.HeaderFields{1,1} = {'OnBehalfOfCompID','TRADER'};
orderStruct.BodyFields{1,1} = {'NoPartyIDs','3'; ...
                               'PartyID','1'; ...
                               'PartyRole','BBVA'; ...
                               'PartyID','1'; ...
                               'PartyRole','CVGX'; ...
                               'PartyID','1'; ...
                               'PartyRole','GSAM'};

Send FIX message using the FIX Flyer connection and the FIX message.

status = sendMessage(c,orderStruct);

Return and display the order information o for all orders. The Variables editor displays the contents of o.

o = orderInfo(c);
openvar('o')

Close the FIX Flyer Engine connection.

close(c)

First, create a FIX Flyer Engine connection, add a FIX Flyer event listener, and subscribe to FIX sessions as in Create an Order Using FIX Flyer. Then, create and send a FIX message for a new order. Display the order information for all open orders.

Create structure orderStruct to contain the FIX message for a new order. This order is a market order to sell 1000 IBM shares.

orderStruct.BeginString{1,1} = 'FIX.4.4';
orderStruct.CLOrdId{1,1} = '338';
orderStruct.Side{1,1} = '2';
orderStruct.TransactTime{1,1} = datestr(now);
orderStruct.OrdType{1,1} = 'D';
orderStruct.Symbol{1,1} = 'IBM';
orderStruct.HandlInst{1,1} = '1';
orderStruct.MsgType{1,1} = 'D';
orderStruct.OrderQty{1,1} = '1000';
orderStruct.HeaderFields{1,1} = {'OnBehalfOfCompID','TRADER'};
orderStruct.BodyFields{1,1} = {'NoPartyIDs','3'; ...
                               'PartyID','1'; ...
                               'PartyRole','BBVA'; ...
                               'PartyID','1'; ...
                               'PartyRole','CVGX'; ...
                               'PartyID','1'; ...
                               'PartyRole','GSAM'};

Send FIX message using the FIX Flyer connection and the FIX message.

status = sendMessage(c,orderStruct);

Return and display the order information o for all open orders. The Variables editor displays the contents of o.

o = orderInfo(c,'open');
openvar('o')

Close the FIX Flyer Engine connection.

close(c)

First, create a FIX Flyer Engine connection, add a FIX Flyer event listener, and subscribe to FIX sessions as in Create an Order Using FIX Flyer. Then, create and send a FIX message for a new order. Display the order information for orders using a specific symbol.

Create structure orderStruct to contain the FIX message for a new order. This order is a market order to sell 1000 IBM shares.

orderStruct.BeginString{1,1} = 'FIX.4.4';
orderStruct.CLOrdId{1,1} = '338';
orderStruct.Side{1,1} = '2';
orderStruct.TransactTime{1,1} = datestr(now);
orderStruct.OrdType{1,1} = 'D';
orderStruct.Symbol{1,1} = 'IBM';
orderStruct.HandlInst{1,1} = '1';
orderStruct.MsgType{1,1} = 'D';
orderStruct.OrderQty{1,1} = '1000';
orderStruct.HeaderFields{1,1} = {'OnBehalfOfCompID','TRADER'};
orderStruct.BodyFields{1,1} = {'NoPartyIDs','3'; ...
                               'PartyID','1'; ...
                               'PartyRole','BBVA'; ...
                               'PartyID','1'; ...
                               'PartyRole','CVGX'; ...
                               'PartyID','1'; ...
                               'PartyRole','GSAM'};

Send FIX message using the FIX Flyer connection and the FIX message.

status = sendMessage(c,orderStruct);

Return and display the order information o for transactions of IBM shares. The Variables editor displays the contents of o.

o = orderInfo(c,'symbol','IBM');
openvar('o')

Close the FIX Flyer Engine connection.

close(c)

Input Arguments

collapse all

FIX Flyer Engine connection, specified as a fixflyer object.

Order status, specified as one of these values. Each value specifies the order information to return.

Order Status ValueDescription

'all'

All orders

'closed'

Closed orders only

'open'

Open orders only

Example: o = orderInfo(c,'all')

Data Types: char

Order information term, specified as one of these values. Each value filters the order information to return.

ValueDescription

'clientorderid'

Client order identifier

'orderstatus'

Order status

'securityid'

Security identifier

'symbol'

Symbol

To filter order information, specify a corresponding order information term value infovalue after infoterm. For example, to specify a client order identifier of 10, use 'clientorderid','10'.

Example: o = orderInfo(c,'orderstatus','1')

Data Types: char

Order information term value, specified as a character vector or string scalar.

To filter order information, specify this value after a corresponding order information term infoterm. For example, to specify the IBM symbol, use 'symbol','IBM'.

Example: o = orderInfo(c,'orderstatus','1')

Data Types: char | string

Output Arguments

collapse all

Order information data, returned as a structure. The structure contains many fields where each field is one piece of order information data provided by FIX Flyer.

Introduced in R2016b

Was this topic helpful?