Capture.PNGHello Team,
I am trying to open a news (or quote, or overview) using SXS in python.
Ping and Handhsake work fine but when I launch an app, the app opens, loads but does'nt load the right context (ric)
import pandas as pd
import requests
#ping server
surl='http://127.0.0.1:9000/ping';
r = requests.get(url = surl)
r.text
Output: '9000'
#Handshake
surl='http://127.0.0.1:9000/sxs/v1';
dbody = {'command':'handshake',
'productId':pyproductID,
'appKey':myappkey}
r = requests.post(url = surl, data = dbody)
response=pd.read_json(r.text)
sessionToken=response['sessionToken'][0]
r.text
Output: json, isSuccess: true
dbody = {'command':'launch',
'sessionToken': sessionToken,
'appId':'News',
'context': {"entities": [{'RIC': 'TRI.TO'}]}
}
r = requests.post(url = surl, data = dbody)
r.text
Output: json, isSuccess: true, got an instance ID
The news app will open and load... the last EIKON opened ric.
Also, is there a way to pass a news ID to the news app (alternatively: what is the best way to open a news from id, using SXS)?
Thank you very much for your answer
BR
PS: could'nt post screen shot (34kb....)???