[EMA C++]How to get seqNum in RefreshMsg and updateMsg

luxiangyuan
luxiangyuan Contributor

hello

I develop with EMA C++

I want get seqNum of the RefreshMsg and UpdateMsg, what should I do.

image

Best Answer

  • @luxiangyuan

    Basically, the OMM message structure, it has a seqNum attribute in the message header. However, this attribute is managed by the server side (feed/exchange) and EMA does not generate the seqNum. Please note that some exchanges increase the value by 2 or by 16.

    For EMA C++, you can verify whether or not the RefreshMsg or UpdateMsg contains sequence number by calling method hasSeqNum() and then get the sequence number by calling method getSeqNum(). Below is sample codes to get the sequence number from Refresh message.

    if (refreshMsg.hasSeqNum())
    {
    cout << endl << "Sequence Number:" << refreshMsg.getSeqNum() << endl;
    }

Answers