Getting MArketdate from Websocket

Hi,
I can connect websocket Reuters server by javascript code. After connection I can log in the system successfully. Now I want to send a market data request, but i am not sure about the correct request. For rfa.net my configuration is:
Default\appId : 256
Default\position : 10.66.29.115/net
Default\runTimeInSeconds : 0
Default\userName : rdc01
Default\service : IDN_RDF
Default\session : Session1
Default\itemName : TRI.N
Default\itemList : TRY14=;TRY17=
and i can get the market data.
What should be the correct sentence for getting the same data via websocket API? Can anybody write a json request for it?
Thanks.
Best Answer
-
The market price request JSON message is following:
{
"ID":<int>,
"Domain" : "MarketPrice"
"Key":{
"Name":"TRI.N"
"Service": "ELEKTRON_DD"
}
}Please note that
- If the JSON message does not contain "Domain" attribute, it will be defaulted to "MarketPrice"
- The "Service" attribute is an optional parameter. If absent, the ADS will use the service that defined in ADS's *ads*defaultJsonServiceId configuration.
You can find all Elektron WebSocket JSON message structures document in the WebSocket document.
You can also the Try It Now! interactive document that contains Elektron WebSocket API documentation, message specification and an interactive playground which you can connect and consume data from an ADS 3.2 WebSocket connection via a browser-based step by step guide. You can download Try It Now!! interactive guide document from the API download page.
Additionally, you can check out the following resources:
- Elektron WebSocket API: Quick Start
- Developer Webinar Recording: Introduction to Electron Websocket API
- Developer Article: Building a Real-time Quote widget
- Developer Article: How to implement Elektron WebSocket API JavaScript application with HTML Web Workers
0
Answers
-
Hi @wasin.w,
Thanks for your quick reply. I send
{
"ID":256,
"Key":{
"Name":"TRI.N"
"Service": "IDN_RDF"
}
}for request and the response was
{
"ID": 256,
"Type": "Status",
"Key": {
"Service": "IDN_RDF",
"Name": "TRI.N"
},
"State": {
"Stream": "Closed",
"Data": "Suspect",
"Code": "NotEntitled",
"Text": "*Record not service permissioned"
}
}Additionally how can I send the
itemList : TRY14=;TRY17=
in json.
0 -
For testing purpose, pleaes change TRI.N to TRY14= or TRY17= and test again. It looks like you don't have permission to request TRI.N.
Please note that itemList parameter is just Application' configuration. It's not RFA.NET configuration. Our RFA.NET example just get item name from the list and send it one by one.
0 -
Hi, I changed the Name to TRY14= . New response is
{
"ID": 256,
"Type": "Status",
"Key": {
"Service": "IDN_RDF",
"Name": "TRY14="
},
"State": {
"Stream": "Closed",
"Data": "Suspect",
"Code": "NotEntitled",
"Text": "A21: DACS User Profile denied access to vendor\n"
}
}It semms a permission problem. I will contact to our account admin. Thanks for your great support.
0 -
- Did you send the login request message with the same user as the RFA API?
- Did you connect to the same ADS server as your RFA API application?
To let us verify the issue, could you please give us all JSON messages that you send and receive from ADS?
Regarding the JSON Batch item request message, you can use "Name" as an array as following
{
"ID":<int>,
"Domain" : "MarketPrice"
"Key":{
"Name":["TRI.N","FB.O"]
"Service": "ELEKTRON_DD"
}
}You can find more detail in the Advance section of the Elektron WebSocket API document.
0 -
Hi,
-Did you send the login request message with the same user as the RFA API?
Yes. I send the login message.
Did you connect to the same ADS server as your RFA API application?Yes, I can connect same server from my RFA application.
I attached all the requests an responses:
SENT:
{
"ID": 1,
"Domain": "Login",
"Key": {
"Name": "rdc01",
"Elements": {
"ApplicationId": "256",
"Position": "127.0.0.1"
}
}
}
RECEIVED:
[
{
"ID": 1,
"Type": "Refresh",
"Domain": "Login",
"Key": {
"Name": "rdc01",
"Elements": {
"AllowSuspectData": 1,
"ApplicationId": "256",
"ApplicationName": "ADS",
"Position": "127.0.0.1",
"ProvidePermissionExpressions": 1,
"ProvidePermissionProfile": 0,
"SingleOpen": 1,
"SupportEnhancedSymbolList": 1,
"SupportOMMPost": 1,
"SupportPauseResume": 0,
"SupportStandby": 0,
"SupportBatchRequests": 7,
"SupportViewRequests": 0,
"SupportOptimizedPauseResume": 0
}
},
"State": {
"Stream": "Open",
"Data": "Ok",
"Text": "Login accepted by host KLREUMLP01."
},
"Elements": {
"PingTimeout": 30,
"MaxMsgSize": 61430
}
}
]
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
SENT:
{
"ID": 2,
"Key": {
"Name": [
"TRY14=",
"TRY17="
]
}
}
RECEIVED:
[
{
"ID": 3,
"Type": "Status",
"Key": {
"Service": 356,
"Name": "TRY14="
},
"State": {
"Stream": "Closed",
"Data": "Suspect",
"Code": "SourceUnknown",
"Text": "A18: Unknown service."
}
},
{
"ID": 4,
"Type": "Status",
"Key": {
"Service": 356,
"Name": "TRY17="
},
"State": {
"Stream": "Closed",
"Data": "Suspect",
"Code": "SourceUnknown",
"Text": "A18: Unknown service."
}
},
{
"ID": 2,
"Type": "Status",
"State": {
"Stream": "Closed",
"Data": "Ok",
"Text": "Processed 2 total items from Batch Request. 2 Ok."
}
}
]
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}
RECEIVED:
[
{
"Type": "Ping"
}
]
SENT:
{
"Type": "Pong"
}0 -
I found that your Batch request message does not contain the Service attribute, so the ADS will use the Service that specified in ADS *ads*defaultJsonServiceId configurations parameter instead.
The Status "Text": "A18: Unknown service." means the the Service ID value in ads*defaultJsonServiceId configuration is not the correct Service ID. I can replicate the same message by setting my ads*defaultJsonServiceId configuration to be the wrong Service ID.
I suggest you check if ads*defaultJsonServiceId parameter is configured to the correct Service ID or not.
Additionally, the "Record not service permissioned" and "A21: DACS User Profile denied access to vendor\n" messages means your user does not have a permission to subscribe that RICs. I suggest you contact your account administrator.
0 -
Hi @Wasin Waeosri,
We're teammates with Sabri.
In your last post you've said;
"I suggest you check if ads*defaultJsonServiceId parameter is configured to the correct Service ID or not."
Actually we don't have a service Id parameter and we couldn't find where the service ID is configured in the sample project. All the examples are just like above and there is no service ID parameter.
{
"ID": 2,
"Key": {
"Name": [
"TRY14=",
"TRY17="
]
}Do we need to contact someone to get a service ID parameter? How we'll get this information?
Thank you.
0 -
Hello @zoya faberov,
Thanks for your guidance. We contacted with our market data team for the required information.
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
- 684 Datastream
- 1.4K DSS
- 615 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
- 249 ETA
- 554 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
- 643 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
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛