For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 2

BID and ASK rate for different Rate Types in Websocket API

We have the requirement to get update BID and ASK rate for different set of rates like
FX Rate - CCY_Pair1, CCY_Pair2, CCY_Pair3...
LIBOR -Rate1, Rate2, ....
JIBOR - Rate1. Rate2, ...
and so on...

By following provided examples, we are designing a prototype with below logic.

AtomicInteger index = new AtomicInteger();
rateTypes.forEach(rateTypeVO -> {
    String rateNames = String.join(",", rateTypeVO.getRateNames());
    String requestJsonString = "{\"ID\":"+index.incrementAndGet()+",\"Key\":{\"Name\":["+rateNames+"]},\"View\":[\"BID\",\"ASK\",\"BIDSIZE\",\"ASKSIZE\"]}";
    websocket.sendText(requestJsonString);
});


And we are expecting to get rate updates on 'Refresh' and 'Update'

But when looking at the available fields in response we can see BID/ASK/BIDSIZE/ASKSIZE/...

Can we know for our purpose we only needs to check for BID & ASK field only always?

or there is any logic needs to apply on BID & ASK values with respect to BIDSIZE & ASKSIZE? since these two fields are not familiar to us

We have checked the response data documentation to get details on these but cannot find such one.

There is any link to refer the description for all field values in market data response?

batch-requestjava-8
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @girish ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
25.3k 87 12 25

Hi @girish

The BIDSIZE and ASKSIZE fields represent 'The number of shares, lots, or contracts willing to buy at the Bid/Ask price.'

If you don't need the fields, just remove them from your original JSON request View parameter. If you have not already done so, I recommend you refer to the Websocket API Tutorials | Refinitiv Developers

You can find a list of fields etc in the RDMFieldDictionary file located at
Real-Time-SDK/Java/etc at master · Refinitiv/Real-Time-SDK (github.com)


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ok. If we specify BID & ASK in View, always it will give BID & ASK in `Update` response or only the updated fields? since as per referring the sample outputs we can see only BID/ASK with updated rates. If no, there is any option to fetch both together always in `Update` response?

Upvotes
25.3k 87 12 25

Hi @girish

It is general practice for real-time streaming APIs to only provide fields that have changed since the previous refresh/update to minimize bandwidth usage & unnecessary processing of unchanged fields.

It is normal practice for the application to maintain a local cache of the most recent values and update the cache with whatever fields it receives in each update.

There is no option to force the server to send both BID+ASK in every update for a streaming subscription.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.