Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Overview

For each changing of session state, FIXEdge creates a new internal FIX message (35=C | 49=fake | 56=fake ) and sends this message into business layer to notify about changes.

The tag 147 in this message is automatically filled by the pattern: [<Category>] <SenderCompID:TargetCompID> <Actual Session state>.

 In order to track session state it is required to perform the following steps:

  1. parse tag 147 using JavaScript;
  2. save session state to history. 

Message parsing

In order to get session state, it is recommended to use the script below. It allows to parse tag 147 in the 35=C message which is contain session name and actual session state. 

As the result of the script we get three tags: 56 - TargetCompID, 49 - SenderCompID, 147 - State.

prepareSessionState.js
status = getStringField(147);
var regexp = /.*\s+(\w+):(\w+)\s+(.*)/g;

match = regexp.exec(status);
if (match != null)
{
    target = match[1];
    sender = match[2];
    state = match[3];
    //print("[DEBUG] matched target = " + target + " sender = " + sender + " state = " + state);
    setStringField(56, target);
	setStringField(49, sender);
    setStringField(147, state);
}

 

ODBS history

 

File history

  • No labels