Using market_price_edpgw_service_discovery.py example app. RDP Snapshot requests not returning data Snapshot. Have "Streaming":false set.
{
"ID":2,
"Key":{
"Name":"/IBM.N"
},
"Streaming":false
}
@Branko - POC:
is not a valid Python statement. Please use
"Streaming": False
Hi @Branko - POC,
Your request structure is correct. Can you please paste the complete output from the sample including the login response and any refresh and update messages.
RECEIVED on session1:
[
"Domain":"Login",
"Elements":{
"MaxMsgSize":61426,
"PingTimeout":30
"ID":1,
"AllowSuspectData":1,
"ApplicationId":"256",
"ApplicationName":"ADS",
"AuthenticationErrorCode":0,
"AuthenticationErrorText":{
"Data":null,
"Type":"AsciiString"
"AuthenticationTTReissue":1619627792,
"Position":"192.168.0.124/CHDPQM433LT",
"ProvidePermissionExpressions":1,
"ProvidePermissionProfile":0,
"SingleOpen":1,
"SupportBatchRequests":7,
"SupportEnhancedSymbolList":1,
"SupportOMMPost":1,
"SupportOptimizedPauseResume":0,
"SupportPauseResume":0,
"SupportStandby":0,
"SupportViewRequests":1
"Name":"AQIC5wM2LY4SfcydNWCrb%2Fq1KzoDHGCpCprs2rfBVVCEw5Y%3D%40AAJTSQACMjAAAlNLABM0NDk1NTkzNDYyNzUwOTQ0ODQyAAJTMQACMzE%3D%23"
"State":{
"Data":"Ok",
"Stream":"Open",
"Text":"Login accepted by host ads-fanout-lrg-az1-use1-prd."
"Type":"Refresh"
]
This is just the login response - where is the response from your item request?
The issue is that there is no item response. There is only Ping/Pong message after what I provided above.
Was there a SENT message in your console? Has your request even been sent to the server? You haven't included the full capture. Here is what I get:
RECEIVED on session1:[ { "Domain": "Login", "Elements": { "MaxMsgSize": 61426, "PingTimeout": 30 }, "ID": 1, "Key": { "Elements": { "AllowSuspectData": 1, "ApplicationId": "256", "ApplicationName": "ADS", "AuthenticationErrorCode": 0, "AuthenticationErrorText": { "Data": null, "Type": "AsciiString" }, "AuthenticationTTReissue": 1619630737, "Position": "192.168.56.1/Carbon2", "ProvidePermissionExpressions": 1, "ProvidePermissionProfile": 0, "SingleOpen": 1, "SupportBatchRequests": 7, "SupportEnhancedSymbolList": 1, "SupportOMMPost": 1, "SupportOptimizedPauseResume": 0, "SupportPauseResume": 0, "SupportStandby": 0, "SupportViewRequests": 1 }, "Name": "AQIC5wM2L**x%23" }, "State": { "Data": "Ok", "Stream": "Open", "Text": "Login accepted by host ads-fanout-lrg-az1-use1-prd." }, "Type": "Refresh" }]SENT on session1: { "ID": 2, "Key": { "Name": "CAD=" }, "Streaming": false}RECEIVED on session1:..
Sending EDP-GW service discovery request to https://api.refinitiv.com/streaming/pricing/v1/
EDP-GW Service discovery succeeded. RECEIVED:
"services":[
"dataFormat":[
"tr_json2"
],
"endpoint":"apac-1-t3.streaming-pricing-api.refinitiv.com",
"location":[
"ap-southeast-1a"
"port":443,
"provider":"aws",
"transport":"websocket"
"endpoint":"apac-3-t3.streaming-pricing-api.refinitiv.com",
"ap-southeast-1a",
"ap-southeast-1b"
"endpoint":"apac-2-t3.streaming-pricing-api.refinitiv.com",
"endpoint":"emea-1-t3.streaming-pricing-api.refinitiv.com",
"eu-west-1a"
"endpoint":"emea-3-t3.streaming-pricing-api.refinitiv.com",
"eu-west-1a",
"eu-west-1b"
"endpoint":"emea-2-t3.streaming-pricing-api.refinitiv.com",
"endpoint":"amer-1-t3.streaming-pricing-api.refinitiv.com",
"us-east-1a"
"endpoint":"amer-3-t3.streaming-pricing-api.refinitiv.com",
"us-east-1a",
"us-east-1b"
"endpoint":"amer-2-t3.streaming-pricing-api.refinitiv.com",
Connecting to WebSocket wss://amer-3-t3.streaming-pricing-api.refinitiv.com:443/WebSocket for session1...
WebSocket successfully connected for session1!
SENT on session1:
"AuthenticationToken":"eyJ0eXAiOiJhdCtqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImRMdFd2Q0tCSC1NclVyWm9YMXFod2pZQ2t1eDV0V2ZSS2o4ME9vcjdUY28ifQ.eyJkYXRhIjoie1wiY2lwaGVydGV4dFwiOlwiejE5MHY1RkJMenh2V1JIUVhSaGxVV2dQM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MjUAAlMxAAIzMg%3D%3D%23"
"Type":"Ping"
"Type":"Pong"
def _send_market_price_request(self, ric_name):
""" Create and send simple Market Price request """
mp_req_json = {
'ID': 2,
'Key': {
#'Name': ric_name,
#'Name': 'IBM.N',
'Name': '/IBM.N',
'Service': service
self.web_socket_app.send(json.dumps(mp_req_json))
print("SENT on " + self.session_name + ":")
print(json.dumps(mp_req_json, sort_keys=True, indent=2, separators=(',', ':')))
I don't see the request being sent to server - there is probably a bug in the your python code somewhere. Please recheck the code - maybe add debugging statements.
Snapshot works with 'Streaming':False set:) The "Streaming":false was cut/paste from Refinitiv how to example snippets. Anyway, happy that this is identified/resolved. Thank you for your help again.
Good that it works now.
Refinitiv examples show the JSON messages - where false is a correct directive. If you use Python dictionary, then Python False will have to be used.
json.dumps(mp_req_json)
The above statement converts the dictionary object into JSON string in the self.web_socket_app.send(json.dumps(mp_req_json)) statement.