Does the "ID" need to match the reply & request?

Hi,
When receiving a request from the Chain Ric, what does the "ID" field refer to, does it need to match the "ID" field in the batch request of all the LONKLINK's as well? Right now I did match them because I found this in the doc ID = "Integer value(s) representing the event stream. It can also be used to match the request and responses."
Received:
[{ "ID":4,"Type":"Refresh","Key":{"Service":"ELEKTRON_DD","Name":"0#2CCM:"},"State":{"Stream":"Open","Data":"Ok"},"Qos":{"Timeliness":"Realtime","Rate":"JitConflated"},"PermData":"AwEBZyPA","SeqNumber":143,"Fields":{"PROD_PERM":6723,"RDNDISPLAY":219,"DSPLY_NAME":"BMF CORN","RDN_EXCHID":"BMF","CURRENCY":"BRL","REF_COUNT":8,"RECORDTYPE":152,"BCAST_REF":"COF","LONGLINK1":"2CCMH23","LONGLINK2":"2CCMK23","LONGLINK3":"2CCMN23","LONGLINK4":"2CCMU23","LONGLINK5":"2CCMX23","LONGLINK6":"2CCMF24","LONGLINK7":"2CCMH24","LONGLINK8":"2CCMU24","LONGLINK9":null,"LONGLINK10":null,"LONGLINK11":null,"LONGLINK12":null,"LONGLINK13":null,"LONGLINK14":null,"LONGPREVLR":null,"LONGNEXTLR":null,"PREF_DISP":1482,"PREF_LINK":null,"DSPLY_NMLL":null,"RDN_EXCHD2":"BMF","MKT_SECTOR":"0","CONTEXT_ID":6423,"DDS_DSO_ID":8334,"SPS_SP_RIC":".[SPSBMFVAE3"}}]
Sent:
"ID": 4, "Domain": "MarketByOrder", "Key": { "Service": "ELEKTRON_DD", "Name": [ "2CCMH23", "2CCMK23", "2CCMN23", "2CCMU23", "2CCMX23", "2CCMF24", "2CCMH24", "2CCMU24" ] }}
Best Answer
-
Thanks for reaching out to us.
The stream ID must be unique for each stream or streaming subscription and it will match the request and response.
For example, according to the response below, the stream ID is 4.
[{
"ID":4,"Type":"Refresh","Key":{"Service":"ELEKTRON_DD","Name":"0#2CCM:"},"State":{"Stream":"Open","Data":"Ok"},"Qos":{"Timeliness":"Realtime","Rate":"JitConflated"},"PermData":"AwEBZyPA","SeqNumber":143,"Fields":{"PROD_PERM":6723,"RDNDISPLAY":219,"DSPLY_NAME":"BMF CORN","RDN_EXCHID":"BMF","CURRENCY":"BRL","REF_COUNT":8,"RECORDTYPE":152,"BCAST_REF":"COF","LONGLINK1":"2CCMH23","LONGLINK2":"2CCMK23","LONGLINK3":"2CCMN23","LONGLINK4":"2CCMU23","LONGLINK5":"2CCMX23","LONGLINK6":"2CCMF24","LONGLINK7":"2CCMH24","LONGLINK8":"2CCMU24","LONGLINK9":null,"LONGLINK10":null,"LONGLINK11":null,"LONGLINK12":null,"LONGLINK13":null,"LONGLINK14":null,"LONGPREVLR":null,"LONGNEXTLR":null,"PREF_DISP":1482,"PREF_LINK":null,"DSPLY_NMLL":null,"RDN_EXCHD2":"BMF","MKT_SECTOR":"0","CONTEXT_ID":6423,"DDS_DSO_ID":8334,"SPS_SP_RIC":".[SPSBMFVAE3"}}]It matches the request message that has the same stream ID #4 which requests 0#2CCM:. The stream state of stream ID #4 is open. Therefore, you can't use this stream ID #4 for another subscription.
For example, to request RICs in this chain, you can use a batch request with stream ID #5.
{
"ID": 5,
"Domain": "MarketByOrder",
"Key": {
"Service": "ELEKTRON_DD",
"Name": [
"2CCMH23",
"2CCMK23",
"2CCMN23",
"2CCMU23",
"2CCMX23",
"2CCMF24",
"2CCMH24",
"2CCMU24"
]
}
}Then, this stream ID #5 of the batch request will be closed.
[
{
"ID": 5,
"Type": "Status",
"Domain": "MarketByOrder",
"State": {
"Stream": "Closed",
"Data": "Ok",
"Text": "Processed 8 total items from Batch Request. 8 Ok."
}
}
]Each item in the batch request will be assigned a unique ID (#6 - #13).
It looks like that these items don't support the Market By Order domain.
To send another request, you can use stream ID #14.
I hope that this information is of help.
0
Answers
-
Hello @goran.stepanovic
The WebSocket JSON message ID (or Stream ID) is like a reference object for each event stream between your application and server. It can be used to match request-response data and a reference for changing that stream (close request, pause, resume).
There are 2 scenarios of the Stream ID. You can find a resource from Make a Batch Request for Multiple Items.
### Single "Item" Request message ###When you are requesting a single item (Login, Single RIC code, Service, etc), the ID is generated and managed by the application. The server always sends the /response/messages back to the application with the same ID number.
So, you can use ID to match request-response directly in this case.
### Bath (Multiple RICs) Request message ###
However, when the application sends a Batch request (example: ['VOD.L','BT.L', 'BP.L']), The WebSocket server allocates a unique ID to each stream back to the application, and the application needs to use that new ID as a reference instead.Example:
Request Message: Note the stream ID value of 2 – we will refer back to this shortly.
{
"ID":2,
"Key":{
"Name":["AAPL.O","JPY=" ],
"Service":"ELEKTRON_DD"
},
"View":[ "BID","ASK", "BIDSIZE"]
}When sending the above JSON message to the server, the first thing we get back is a Status message confirmation of the Batch request:
RECEIVED:
[
{
"ID":2,
"State":{
"Data":"Ok",
"Stream":"Closed",
"Text":"Processed 2 total items from Batch Request. 2 Ok."
},
"Type":"Status"
}
]Here, the server is advising us that it has processed the Batch request and that it is now closing the request stream with ID of 2 – i.e. the Batch request Stream. This is because the server is going to create individual streams for each of the RICs and allocate a unique ID to each stream.
The next messages we receive are the 3 Initial Refresh Message (or Status Message) for the RICs we requested – note the ID of each one:
{
"Fields":{
"ASK":150.76,
"BID":150.69,
"BIDSIZE":4
},
"ID":3,
"Key":{
"Name":"AAPL.O",
"Service":"ELEKTRON_DD"
},
...
"State":{
"Data":"Ok",
"Stream":"Open"
},
"Type":"Refresh"
}
{
"Fields":{
"ASK":132.59,
"BID":132.54
},
"ID":4,
"Key":{
"Name":"JPY=",
"Service":"ELEKTRON_DD"
},
...
"State":{
"Data":"Ok",
"Stream":"Open"
},
"Type":"Refresh"
}The WebSocket Server has generated IDs of 3 and 4 to the AAPL.O and JPY= stream respectively. The application must use IDs 3 and 4 as references instead.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 630 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛