Closed kodeaway closed 6 years ago
Are you referring to a chain RIC? Thomson Reuters has legacy, unstructured chain RIC data model for delivery of a list of symbols. SymbolList (OMM) is a newer structured which is only available from TRDF-D feeds (Direct Feed for exchanges). Typically if you want a list of symbols from, say, 0#RIC from IDN, it is most likely that you are requesting for a chain RIC and not a SymbolList.
To pull a chain RIC with PyRFA, you can see code in this post and repost here:
def expandChainRIC(self, chainRIC):
expanded = []
done = False
snapshot = self.snapshotRequest([chainRIC])
while not done:
if not snapshot:
break
for i in ['LINK_1', 'LINK_2', 'LINK_3', 'LINK_4', 'LINK_5', 'LINK_6', 'LINK_7', 'LINK_8', 'LINK_9', 'LINK_10', 'LINK_11', 'LINK_12', 'LINK_13', 'LINK_14', 'LONGLINK1', 'LONGLINK2', 'LONGLINK3', 'LONGLINK4', 'LONGLINK5', 'LONGLINK6', 'LONGLINK7', 'LONGLINK8', 'LONGLINK9', 'LONGLINK10', 'LONGLINK11', 'LONGLINK12', 'LONGLINK13', 'LONGLINK14']:
if snapshot[0][2].has_key(i) and snapshot[0][2][i]:
expanded.append(snapshot[0][2][i])
if snapshot[0][2].has_key('NEXT_LR') and snapshot[0][2]['NEXT_LR']:
snapshot = self.snapshotRequest([snapshot[0][2]['NEXT_LR']])
elif snapshot[0][2].has_key('LONGNEXTLR') and snapshot[0][2]['LONGNEXTLR']:
snapshot = self.snapshotRequest([snapshot[0][2]['LONGNEXTLR']])
else:
done = True
# if chainRIC is not a chain, return itself back
if not expanded:
expanded.append(chainRIC)
if self.debug:
print "[debug] Expand chain " + chainRIC + " -> " + str(expanded)
return expanded
and
def snapshotRequest(self, ricList):
snaphots = ()
self.pyrfa.log("Subscribing items: " + str(ricList) + " (total: " + str(len(ricList)) + " )")
for ric in ricList:
self.pyrfa.marketPriceRequest(ric)
global end
end = False
t = threading.Timer(10, stop)
t.start()
imageReceived = 0
while not end and imageReceived < len(ricList):
images = self.pyrfa.dispatchEventQueue()
if images:
for i in images:
if type(i[2]) is dict:
imageReceived += 1
snaphots += (i,)
t.cancel()
t = threading.Timer(10, stop)
t.start()
self.pyrfa.log("Snapshots received: " + str(imageReceived))
t.cancel()
return snaphots
Thanks for the reply. This is a symbollist. Domain 10 if I have to use rmdstestclient.
Against a TRDFD this SymbolList sample code works. It does not work against a service hosted by Reuters which only supports SymbolLists and does not support chain RICs.
Are you able to email us the log file to take a look? Email: support@devcartel.com
Our support team found a difference in one of the parameters returned from RDFD vs. the new service.
RDFD: ``
Yes. We didn't expect Symbol List to be encoded as RMTES string. Will fix this in the next release.
Please try PyRFA 8.2.1 released today for which addresses this issue.
Thank you for this quick turnaround. I'll let you know the results
From: Wiwat Tharateeraparb [mailto:notifications@github.com] Sent: Monday, September 11, 2017 8:16 AM To: devcartel/pyrfa Cc: Goldman, Carol L. (Financial & Risk); Comment Subject: Re: [devcartel/pyrfa] Error pulling SymbolList (#31)
Please try PyRFA 8.2.1 released today for which addresses this issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_devcartel_pyrfa_issues_31-23issuecomment-2D328510996&d=DwMCaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=pFyWTz7Vm8hlHYhVMo5A7piFm29PwR1j_nU4p9LUd2w&m=ZqMLyGpC7uqD40t35sCrRoab57OeVgS9XP-nTKTSITY&s=LVTgJBR6Bd4hR83jZGCela-QsqOszSTVtWXydJq6erQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AeTlg28fm6KGigM3195PD-5F-2D7ctbpBjS3ks5shSR9gaJpZM4PIznd&d=DwMCaQ&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=pFyWTz7Vm8hlHYhVMo5A7piFm29PwR1j_nU4p9LUd2w&m=ZqMLyGpC7uqD40t35sCrRoab57OeVgS9XP-nTKTSITY&s=ErOj6QwOXBD6bLY9-4P_gtTAB3BftWpB7Za0KP7OioI&e=.
This fixed the problem we were seeing. Thank you very much for the fix.
Getting errors while using getSymbolList
Debug is ON and am able to see the below.
[SymbolListHandler::decodeSymbolList] Expected key buffer databuffer type of Buffer ({'MTYPE' : 'REFRESH','RIC' : 'SL RICNAME','SERVICE' : 'SERVICENAME'})
SymbolList are being pulled OK with other tools without any issues.