send data to adh with python
Hi - I would like to send some data to an internal source using python - do you have any examples of how to bring up a source app and send data please?
Ideally my python script would advertise a port, which the adh would connect to and then i send the data directly to the adh.
Thanks
Martin
Best Answer
-
Hello @martin.gregory
Please be informed that we have only a plan for the SDK C# edition only, you can find more detail from the RTSDK roadmap page (note: the items and date information are subject to change).
You can submit an enhancement request to the product team about the Python SDK via the https://my.refinitiv.com/content/mytr/en/feedback.html page.
Additionally, can you clarify this "it means I need another source app to host the source to accept the SSL inserts I think?" message?
The ADS' WebSocket connection supports the Post/Contribution feature. The consumer-source application can connect to the ADS via the WebSocket connection, then contribute data directly to the ADS via the Post message (in JSON message format) as the following diagram. The ADS automatics convert the Post JSON message to Refinitiv Real-Time format and post that data to the ADH server.
The ADH server can be configured a "cache-service" for receiving and caching the Post data without the source application via the cacheServiceList parameter:
You can find more detail about the ADH and Posting message configurations in section 13 "OMM Posting and SSL Inserts" of the ADH document.
0
Answers
-
Hello @martin.gregory
Do you mean you want the Python script that runs as an Interactive Provider/Non-Interactive Provider, then the ADH connects to that script and receives data from the Python source app?
If so, the Interactive Provider and Non-Interactive Provider features are available with Refinitiv Real-Time SDK (EMA and ETA APIs) Java and C/C++ editions only. You can find more detail about the EMA API Non-Interactive Provider in the following resources:
Alternatively, You can use the Real-Time WebSocket API to "contribute" data from a Python application to ADH via the following connection diagram:
Python --> ADS --> ADH
You can find more detail about contributing data with the WebSocket API from the following resources:
- Contributing Data to Refinitiv Real-Time using the WebSocket API article
- WebSocket API Posting example with Python on the GitHub repository
Hope this helps.
1 -
Hi Wasin - thanks for the information. Are there any plans to make the SDK available for python?
Because if we go down the ADS---->ADH route, it means I need another source app to host the source to accept the SSL inserts i think?
Thanks
Martin
1 -
hi @martin.gregory ,
It can be done using Websocket API, I'd like to recommend you to check the tutorials and articles below and please let us know in case you have any further questions
1 -
In addition to my colleagues' responses above, you may also find the following article useful.
Whilst it talks about RTC, the same principles apply to an ADH - see the section 'Configure RTC for a Posting Cache and NIProvider service'
The service that is created in the above steps allows for Posting and/or Non-interactive provider to populate its cache.
2 -
Thanks very much. So just so im clear the solution at present would be to bring up a non interactive source on the adh and define it in the cacheServiceList and then use an ads connection via the websocket connection to insert into it?
Thanks
Martin
0 -
Hello @martin.gregory
Yes, you understand correctly.
Please note that you must also enable the ADH to support Posting/Inserting. I highly recommend you contact your Market Data team to help you with the ADH configurations.
0 -
Hi all
I'm getting an error message on "ID" when posting into the ADS via the websocket - see below. Please can you help me where I'm going wrong?
Thanks
Martin
SENT:
{
"Ack":true,
"Domain":"MarketPrice",
"ID":"777",
"Key":{
"Name":"MARTIN",
"Service":"LFC2"
},
"Message":{
"Domain":"MarketPrice",
"Fields":{
"ASK":2,
"BID":1
},
"ID":"777",
"Key":{
"Name":"MARTIN",
"Service":"LFC2"
},
"Type":"Update"
},
"PostID":1,
"PostUserInfo":{
"Address":"10.200.211.211",
"UserID":"radmin"
},
"Type":"Post"
}
[{"ID":0,"Type":"Error","Text":"JSON Converter Token Type error: Expected 'PRIMITIVE' for
key 'ID' Received 'STRING'","Debug":{"File":"/local/jenkins/workspace/RTDS35XCore_Release/OS/OL7-64/esdk/source/rtsdk/Cpp-C/Eta/Impl/Converter/jsonToRwfSimple.C","Line":364,"Offset":335,"Message":"{\"Domain\": \"MarketPrice\", \"Ack\": true, \"PostID\": 1, \"PostUserInfo\": {\"Address\": \"10.200.211.211\", \"UserID\": \"radmin\"}, \"Key\": {\"Name\": \"MARTIN\", \"Service\": \"LFC2\"}, \"Message\": {\"ID\": \"777\", \"Type\": \"Update\", \"Domain\": \"MarketPrice\", \"Fields\": {\"BID\": 1, \"ASK\": 2}, \"Key\": {\"Name\": \"MARTIN\", \"Service\": \"LFC2\"}}, \"Type\": \"Post\", \"ID\": \"777\"}"}}]
0 -
Pls ignore - have fixed this1
-
Hello @martin.gregory
I am glad to hear that the issue has been fixed on your side.
According to the Real-Time WebSocket API specification, the ID value needs to be an integer, not a string.
You can find more detail about the WebSocket API protocol, and JSON message structure from the following resources:
1 -
Thanks all to all 3 (this reply and the ones below, and above). I'm connected to an ads websocket now and sending off stream json posts successfully. The links raksina sent were particularly useful in this regard.0
-
Very useful links, thank you.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛