Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • WebSocket API /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by sabri demirel · Feb 22, 2018 at 01:36 AM · treprdp-apiwebsocketsrrto

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.

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.w · Feb 22, 2018 at 01:54 AM

Hi @sabri demirel

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
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by sabri demirel · Feb 22, 2018 at 02:10 AM

Hi @Wasin Waeosri,

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.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
moragodkrit.chumsri_1 ♦♦ · Feb 22, 2018 at 02:15 AM 0
Share

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.

avatar image
Answer by sabri demirel · Feb 22, 2018 at 02:22 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by wasin.w · Feb 22, 2018 at 02:29 AM

Hi @sabri demirel

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


capture.png (24.5 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by sabri demirel · Feb 22, 2018 at 02:39 AM

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"
    }

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by wasin.w · Feb 22, 2018 at 02:52 AM

Hi @sabri demirel

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by betul.simsek · Feb 22, 2018 at 11:09 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

MarketByPrice via EWA/websocket; how can I read the value of Map/Entries/"Key" ?

Why some message miss subscribed fields?

reverse proxy for websocket server

Posting with WebSocket API: "A29: Post message did not contain permission data."

Change password

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges