Article

How to get Exchange Information from a Market Price Domain

Wasin Waeosri
Developer Advocate Developer Advocate

How to get Exchange Information from a Market Price Domain

Overview

Last Updated: January 2026

For some instruments, the suffix of RIC indicates the exchange where it is traded, e.g. HSBA.L (.L = LSE - London Stock Exchange), HBC.N (.N = NYSE - New York Stock Exchange). However, how can we get more information about those exchanges?

Solution

The Real-Time Platform provides a short exchange name information via the FID 1709 (Field name RDN_EXCHD2) for the Market Price domain. This FID 1709 is the enumeration field that is used in most of the exchanges. The Enter Price Message API (EMA) of the Real-Time SDK Java (formerly known as ESDK) and above can retrieve an enum value from dictionary directly, so it can help a consumer application get a short exchange name from this enumeration field..

IMPORTANT Rebranding Announcement:

Starting with version RTSDK 2.0.0.L1 (same as EMA/ETA 3.6.0.L1), there are namespace changes and library name changes. Please note that all interfaces remain the same as prior releases of RTSDK and Elektron SDK and will remain fully wire compatible. Along with RTSDK 2.X version, a REBRAND.md is published to detail impact to existing applications and how to quickly adapt to the re-branded libraries. Existing applications will continue to work indefinitely as-is. Applications should be proactively rebranded to be able to utilize new features, security updates or fixes post 2.X release. Please see PCN for more details on support.

RDMFieldDictionary

    	
            
RDN_EXCHD2 "EXCHANGE ID 2"       1709  NULL        ENUMERATED    5 ( 3 )  ENUM             2

enumtype.def

    	
            

RDN_EXCHD2  1709

...

! VALUE      DISPLAY   MEANING

! -----      -------   -------

      0        "   "   undefined

      1        "ASE"   NYSE AMEX

      2        "NYS"   New York Stock Exchange

      3        "BOS"   Boston Stock Exchange

      4        "CIN"   National Stock Exchange (formerly Cincinnati Stock Exchange)

      5        "PSE"   NYSE Arca

      6        "XPH"   NASDAQ OMX PSX when trading in SIAC (formerly Philadelphia Stock Exchange)

    ...

      1454     "PCW"   PetroChem Wire LLC

      1455     "SMP"   Euronext - Smartpool

      1456     "BT1"   BATS ONE - LEVEL 1 (PRODUCT)

Solution Code

This 1709 FID is an enumeration field type consisting of a set of mnemonics; each with its specific meaning. A displayable string represents each exchange short name is associated with each of these mnemonics. The mapping between mnemonics and the displayable string is required to get a suitable and meaningful exchange short name. The EMA Java 3.1.0 API (and above) can help the application gets an enumeration field value and map it to a displayable value with only a few line of code.

Please see the ExchangeName example that modified from EMA Java's ex360_MP_View and ex370_Batch examples to subscribe and handle FID 1709 below.

1.    Firstly, we create the OMM Array to keep interested FIDs in the ExchangeName class

    	
            OmmArray view_array = EmaFactory.createOmmArray();
        
        
    

2.    Then we add the interested FIDs including 1709 to the OMM Array

    	
            

// Set a fixed size for each array entry to minimize bandwidth, since we know their sizes      

view_array.fixedWidth(2);

//Add interested FIDs

view_array.add(EmaFactory.createOmmArrayEntry().intValue(3)); //DSPLY_NAME

view_array.add(EmaFactory.createOmmArrayEntry().intValue(22)); //BID

view_array.add(EmaFactory.createOmmArrayEntry().intValue(25)); //ASK

view_array.add(EmaFactory.createOmmArrayEntry().intValue(1709)); //RDN_EXCHD2

3. Next, we add the OMM Array for Batch request RICs. The next step is adding interested RICs

    	
            

//Batch

OmmArray batch_array = EmaFactory.createOmmArray();

// Add interested RICs

batch_array.add(EmaFactory.createOmmArrayEntry().ascii("PTT.BK"));

batch_array.add(EmaFactory.createOmmArrayEntry().ascii("LSEG.L"));

batch_array.add(EmaFactory.createOmmArrayEntry().ascii("NVDA.O"));

batch_array.add(EmaFactory.createOmmArrayEntry().ascii("2330.TW"));

4.    Next, we combine both Batch and View array and add them to an ElementList as a Payload

    	
            

// Combine both Batch and View and add them to ElementList

ElementList batchView = EmaFactory.createElementList();

batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, batch_array));

batchView.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));

batchView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, view_array));

5.    Next, we create the ReqMsg object and set the view ElementList as a request's payload. EMA Java will send a snapshot item request (non-streaming) to  Real-Time Advanced Distribution Server with the Payload.

    	
            

//Send a snapshot request message to the Real-Time Platform endpoint with Batch View request in the payload

consumer.registerClient(EmaFactory.createReqMsg()

                  .serviceName("ELEKTRON_DD")

                  .interestAfterRefresh(false)

                  .payload(batchView)

      , appClient);

6.    In the OmmConsumerClient application code, we implement the decode function that iterates incoming data FieldList in the onRefreshMsg and onUpdateMsg callbacks

    	
            

class AppClient implements OmmConsumerClient

      public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event){

            ...

            if (DataType.DataTypes.FIELD_LIST == refreshMsg.payload().dataType())

                  decode(refreshMsg.payload().fieldList());

      }

}

7. We implement the decode function to handle and print out DataTypes.ENUM, so the application will get FID 1709 enumerate value (enumtype.def) automatically.

    	
            

class AppClient implements OmmConsumerClient

      public void onRefreshMsg(RefreshMsg refreshMsg, OmmConsumerEvent event){

            ...

            if (DataType.DataTypes.FIELD_LIST == refreshMsg.payload().dataType())

                  decode(refreshMsg.payload().fieldList());

      }

      ...

      void decode(FieldList fieldList){

            fieldList.forEach(fieldEntry -> {

                  System.out.print("Fid: " + fieldEntry.fieldId() + " Name = " + fieldEntry.name() + " DataType: " + DataType.asString(fieldEntry.load().dataType()) + " Value: ");

 

                  if (Data.DataCode.BLANK == fieldEntry.code())

                        System.out.println(" blank");

                  else

                        switch (fieldEntry.loadType()){

                              ...

                              case DataTypes.ENUM: //Handle FID 1709

                                    System.out.println(fieldEntry.hasEnumDisplay() ? fieldEntry.enumDisplay() : fieldEntry.enumValue());

                                    break;

                              case DataTypes.RMTES: //Handle FID 3

                                    System.out.println(fieldEntry.rmtes());

                                    break;

                              ...

                        }

            });

      }

}

Running the application

The application source code is available at GitHub. Please follow the README file to see how to setup and run an application with Java and Maven.

The example output when you run the application for each item name:

    	
            

Item Name: PTT.BK

Service Name: ELEKTRON_DD

Item State: Non-streaming / Ok / None / '*All is well'

Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: PTT

Fid: 22 Name = BID DataType: Real Value: 33.5

Fid: 25 Name = ASK DataType: Real Value: 33.75

Fid: 1709 Name = RDN_EXCHD2 DataType: Enum Value: SET //[Wasin explanation]<-- FID value: 158 "SET" The Stock Exchange of Thailand

 

Item Name: LSEG.L

Service Name: ELEKTRON_DD

Item State: Non-streaming / Ok / None / '*All is well'

Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: LON.STK.EXCH

Fid: 22 Name = BID DataType: Real Value:  blank

Fid: 25 Name = ASK DataType: Real Value:  blank

Fid: 1709 Name = RDN_EXCHD2 DataType: Enum Value: LSE //[Wasin explanation]<-- FID value: 64 "LSE" London Stock Exchange

 

Item Name: 2330.TW

Service Name: ELEKTRON_DD

Item State: Non-streaming / Ok / None / '*All is well'

Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: TAIWAN SEMICONT

Fid: 22 Name = BID DataType: Real Value: 1765.0

Fid: 25 Name = ASK DataType: Real Value: 1770.0

Fid: 1709 Name = RDN_EXCHD2 DataType: Enum Value: TAI //[Wasin explanation]<-- FID value: 175 "TAI"   Taiwan Stock Exchange

 

Item Name: NVDA.O

Service Name: ELEKTRON_DD

Item State: Non-streaming / Ok / None / '*All is well'

Fid: 3 Name = DSPLY_NAME DataType: Rmtes Value: NVIDIA CORP

Fid: 22 Name = BID DataType: Real Value: 184.33

Fid: 25 Name = ASK DataType: Real Value: 184.37

Fid: 1709 Name = RDN_EXCHD2 DataType: Enum Value: NSQ //[Wasin explanation]<-- FID value: 646 "NSQ" Consolidated Issue Listed on Nasdaq Global Select Market

Conclusion

If your application subscribes to data from the Real-Time Platform and you need an exchange information, you can get it from the FID 1709 (RDN_EXCHD2). The EMA Java API (version 3.1.0 and above) can help an application consume and parse this FID to get an exchange short name with only a few lines of code.

References

For further details, please check out the following resources:

For any question related to this article or Enterprise Message API page, please use the Developer Community Q&A Forum.