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?

Best Answer

Answers

  • 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?

  • 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.