This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Send FIX message to FIX Flyer Engine


status = sendMessage(c,fixmsg)



status = sendMessage(c,fixmsg) sends the FIX message fixmsg using the FIX Flyer™ Engine connection c.


collapse all

First, create a FIX Flyer Engine connection. Then, add a FIX Flyer event listener to the FIX Flyer Engine connection. Subscribe to FIX sessions. Create and send two FIX messages.

Create the FIX Flyer Engine connection c using these arguments:

  • User name username

  • Password password

  • IP address ipaddress

  • Port number port

username = 'user';
password = 'pwd';
ipaddress = '';
port = 7002;

c = fixflyer(username,password,ipaddress,port);

Add the FIX Flyer event listener to the FIX Flyer Engine connection. Use the sample event handling listener fixExampleListener to listen for and display the FIX Flyer Engine event data in the Workspace browser. To access the code for the listener, enter edit fixExampleListener.m. Or, to process the event data in another way, you can write a custom event handling listener function. For details, see Create Functions in Files (MATLAB).

Process the FIX Flyer Engine events e using the sample event handling listener fixExampleListener. Specify e as any letter. fixExampleListener returns a handle to the listener lh.

lh = addListener(c,@(~,e)fixExampleListener(e,c));

Subscribe to FIX sessions and set up the FIX Flyer Application Manager. Register with the FIX Flyer session. Connect the FIX Flyer Application Manager to the FIX Flyer Engine and start the internal receiving thread.

c.SessionID = flyer.core.session.SessionID('Alpha',...

Create a FIX message using table fixtable. This table contains two FIX messages. The first row in the table represents a sell side transaction for 100 shares of symbol ABC. The order type is a previously quoted order. The order handling instruction is a private automated execution. The order transaction time is the current moment. The second row in the table has the same order field variables, except that the order identifier is unique across orders. The FIX protocol version is 4.4.

fixtable = table({'FIX.4.4';'FIX.4.4'},...
                 'VariableNames',{'BeginString' ...
                 'CLOrdId' 'Side' 'TransactTime' ...
                 'OrdType' 'Symbol' ...
                 'HandlInst' 'MsgType' 'OrderQty'});

Send the FIX message using the FIX message fixtable.

status contains the FIX Flyer Engine message status for each FIX message sent. If the FIX message is sent successfully, status contains a logical zero. status has an entry for each FIX message in fixtable.

status = sendMessage(c,fixtable)
status =


The MATLAB® Workspace variable fixResponseStruct contains the returned FIX messages from the FIX Flyer Engine.

Close the FIX Flyer Engine connection.


Input Arguments

collapse all

FIX Flyer Engine connection, specified as a fixflyer object.

FIX message, specified as a table or structure.

Example: fixtable = table({'FIX.4.4';'FIX.4.4'},...
'VariableNames',{'BeginString' ...
'CLOrdId' 'Side' 'TransactTime' ...
'OrdType' 'Symbol' ...
'HandlInst' 'MsgType' 'OrderQty'});

Data Types: table | struct

Output Arguments

collapse all

Sent message status, returned as an array of logical zeroes or ones. The array contains an entry for each FIX message in fixmsg. If a FIX message is sent successfully, status contains a zero. Otherwise, status contains a 1.

Introduced in R2015b