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.

fix2struct

Convert FIX message to structure array

Syntax

fixstruct = fix2struct(fixstr)

Description

example

fixstruct = fix2struct(fixstr) converts raw FIX messages in the cell array fixstr to a structure array fixstruct.

Examples

collapse all

For this example, assume that a counterparty sends you two raw FIX messages in fixstr. The FIX protocol version is 4.4.

Convert raw FIX messages in fixstr to a structure array fixstruct.

fixstruct = fix2struct(fixstr)
fixstruct = 

     BeginString: {2x1 cell}
         ClOrdID: {2x1 cell}
            Side: {2x1 cell}
    TransactTime: {2x1 cell}
         OrdType: {2x1 cell}
          Symbol: {2x1 cell}
       HandlInst: {2x1 cell}
         MsgType: {2x1 cell}
        OrderQty: {2x1 cell}

The structure array fixstruct contains a structure for each raw FIX message in fixstr. The structure fields correspond to the FIX tags in the raw FIX message.

Display the order type for each FIX message.

fixstruct.OrdType
ans = 

    'D'
    'D'

Both FIX messages specify previously quoted orders.

Input Arguments

collapse all

FIX message, specified as a cell array of one or more raw FIX messages.

Data Types: cell

Output Arguments

collapse all

FIX message, specified as a structure array containing the converted raw FIX messages in fixstr. The structure fields and values correspond to the FIX tag names and values in the raw FIX message.

Introduced in R2015b

Was this topic helpful?