How to identify a Quote vs Trade.

I am using EMA SDK for Java. Which field that I can use to differentiate if the update is a Quote/Trade? Let me know if there are any gotchas. By gotchas, I meant special cases where the handling needs to be special.

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Hello @purvesh.yadav

    UpdateTypeNum component in update message indicates the general content of the update as shown in the 6.2.3 Market Price Update Message section in EMAJ_RDMUsageGuide.pdf:

    imageYou can call UpdateMsg.updateTypeNum() to return UpdateTypeNum which can be trade, quote or both etc. As the snipped example below:

    import com.thomsonreuters.ema.rdm.*;

       if(updateMsg.updateTypeNum()==EmaRdm.INSTRUMENT_UPDATE_QUOTE) {
            //process update contains quote info
       } else if (updateMsg.updateTypeNum()==EmaRdm.INSTRUMENT_UPDATE_TRADE) {
           //process update contains trade info
       }  else if (updateMsg.updateTypeNum()==EmaRdm.INSTRUMENT_UPDATE_QUOTES_TRADE) {                 
    //process update contains both trade and quote info 
    }
      ...

    Hope this help.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.