Obtain real-time currency pair exchange rate data through the Real Time SDK API

Ouhl
Ouhl Newcomer
edited December 2024 in FX Market Data

Hi, we need to obtain real-time currency pair exchange rate data from the foreign exchange market through the Real Time SDK API. We have some technical questions and would appreciate assistance. Thank you.

1、Using the emaj consumer \ src \ com \ refinitiv \ ema \ tutorials \ consumer \ tutorials2 example, we can only obtain data for a single currency pair once at a time(such as CNH=). How to set the code to achieve one-time registration and continuously obtain real-time data for multiple currency pairs?

q1.jpg

2、After registering the client in a loop, it is possible to continuously obtain data from multiple currency pairs. However, if the real-time data obtained is discontinuous, is it due to continuous registration? What should be done?

q2.jpg

3、The message information obtained through the Real Time SDK API is Fid=1010, name=VALUE_TS1, and its data is time, minute, and second, without millisecond data. How to set to obtain millisecond time?

q3.jpg

4、Real Time SDK API obtains real-time foreign exchange data, and the difference between Internet and leased line links?

Answers

  • Hello @Ouhl

    To subscribe multiple items to the Real-Time platform with a single request message, you can use the API Batch feature.

    batch.png

    I am assuming that you are using the RTSDK - Java edition, the Batch example is available on EMA Java ex370_MP_Batch example on GitHub and the RTSDK Java package.

    • Note: If you are using the C++ or C# editions, the same example is Cons370
    ElementList batch = EmaFactory.createElementList();
    OmmArray array = EmaFactory.createOmmArray();
    			
    array.add(EmaFactory.createOmmArrayEntry().ascii("TRI.N"));
    array.add(EmaFactory.createOmmArrayEntry().ascii("IBM.N"));
    
    batch.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, array));
    			
    consumer.registerClient(EmaFactory.createReqMsg().serviceName("DIRECT_FEED").payload(batch), appClient);
    

    There is also the API View feature that lets you specify the interested field id (FID). The View example is ex360_MP_View. The View feature can be combined with Batch too.

    About the real-time data obtained is discontinuous, the give code just looping over an array of items and subscribing a single item. This logic should not cause a disconnection (but I strongly suggest you uses the Batch feature above).

    There are many reasons that can cause a disconnection. Please share more log messages or enable the API trace messages (see EMA Java Logging section of the Enterprise Message API (EMA) - Configuration Overview article)

    About the VALUE_TS1 field data, please be informed that the API just receives incoming data from the Real-Time platform and passes it to an application "as is". I strongly suggest you contact the Real-Time content support team to verify if the Real-Time platform has a data with millisecond content that you need. You can contact the team via https://myaccount.lseg.com/en/productsupport website.

    contact_realtime_content.png

    About the Internet and leased line link, are you using the RTO? According to the Real-Time - Optimized Install and Config Guide document, the Real-Time — Optimized (RTO) offers the following connectivity options:

    • Public Internet
    • AWS PrivateLink: AWS PrivateLink essentially eliminates exposure to public Internet while exchanging data between VPCs in the same or different AWS accounts.
    • Delivery Direct

    I do not have enough information about the different between the connections above. Please contact your LSEG representative or Account Manager for more details.