Hi,
I would like to perform the same query(in Excel) with Python Data library API:
This return NA (but works for XAG):
Thanks for the help.
Regards
@fabien.marcaillou I believe you would need to get a snapshot price from a websocket connection - specifying the DTS source using the service parameter.
stream = rd.open_pricing_stream( universe=['WMAUDCHF'], service = 'DTS', fields=['BID', 'ASK'])
stream.open()
stream.get_snapshot()
Please see if this can work for you. I got this from the RD library Access Layer - Pricing Stream example on github here. I hope this can help.
@fabien.marcaillou
Thanks for reaching out to us.
The RD Library can be configured to connect to the locally deployed RTDS.
"sessions": { "default": "platform.deployed", "platform": { "rdp": { "app-key": "<app key>", "username": "<rdp user>", "password": "<rdp password>" }, "deployed": { "app-key": "<app key>", "realtime-distribution-system": { "url" : "127.0.0.1:15000", "dacs" : { "username" : "api", "application-id" : 256, "position" : "" } } } },...
Then, you can use the following code to retrieve data from the ATS or DTS service on the local RTDS.
non_streaming = rd.content.pricing.Definition( ['TEST.BK'], service="ATS").get_stream()# We want to just snap the current prices, don't need updates# Open the instrument in non-streaming modenon_streaming.open(with_updates=False)# Snapshot the prices at the time of the open() callnon_streaming.get_snapshot()
The output is:
These are services available on my local ADS.
Thanks everyone for the answers, it's working now.