Websocket api. How to get MID rates for FX rates

Good Day!
We are currently receiving BID and ASK information for FX rates via weboscket api. C#
We have a need to get the MID-market exchange rate using the Refinitiv Real-time optimised product.
We could not find a suitable field in the protocol specification (https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api)
How can we get a mid-market exchange rate? If we can't get it through the websocket api, what api can we use to get it?
Best Answer
-
Hello @Valery
I just want to add some information added to my colleague's answer.
You can use the WebSocket API View Feature to request only interested fields from the Refinitiv Real-Time.
Example Code:
string view = "{"
+ "\"ID\": 2,"
+ "\"Key\": {\"Name\":\"" + _ric + "\",\"Service\":\"" + _service + "\"},"
+ "\"View\":[\"BID\",\"ASK\",\"MID_PRICE\",\"MID_NET_CH\",\"MID_CLOSE\"]"
+ "}";
SendMessage(view);Result:
RECEIVED on Session1:
[
{
"ID": 2,
"Type": "Refresh",
"Key": {
"Service": "ELEKTRON_DD",
"Name": "EUR="
},
"State": {
"Stream": "Open",
"Data": "Ok"
},
"Qos": {
"Timeliness": "Realtime",
"Rate": "JitConflated"
},
"PermData": "AwEBUmw=",
"SeqNumber": 40558,
"Fields": {
"BID": 1.0531,
"ASK": 1.0535,
"MID_PRICE": 1.0533,
"MID_NET_CH": 0.0008,
"MID_CLOSE": 1.0525
}
}
]An example of the View feature in C# is the MarketPriceBatchViewExample.cs example file in the GitHub https://github.com/Refinitiv/websocket-api/tree/master/Applications/Examples/CSharp link. The file is for the deployed RTDS connection but the View logic is the same as the RTO connection.
0
Answers
-
I found several fields regarding mid-price.
MID_PRICE "MID-PRICE" 134 NULL PRICE 17 REAL64 7
!
! The mid-price between the bid and ask prices.
!
MID_NET_CH "MID-PRICE NETCH" 135 NULL PRICE 17 REAL64 7
!
! The difference between the current mid-price held in MID_PRICE and the historic
! mid-price MID_CLOSE.
!
MID_CLOSE "MID-PRICE CLOSE" 136 NULL PRICE 17 REAL64 7
!
! The closing mid-price.
!You can also refer to the Data Model Discovery tool to find all available Real-Time fields for each RIC, such as 3312 - FX Alliance LLC (FXall) FX Spot [Refinitiv Real-Time/Misc.]
I hope it can help.
0 -
Thank you for information about Data Model Discovery tool. It was very helpful
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 693 Datastream
- 1.5K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 12 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 561 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 728 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 96 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛