Python websocket api posting RTDS ADH
Hi
we are trying to post data to our internal RTDS infrastructure using Python API. Our Infra team has created service (TEST_POST_SVC) to publish data on RTDS.
I am using example mentioned in this link https://developers.refinitiv.com/en/article-catalog/article/contributing-data-trep-using-websocket-api#Start
I able to connect to RTDS successfully, when I tried to post message I am getting following error message
""Text":"A9: Service is unavailable."
do we know why I am getting this error?
If I use our RFA/ C# code I can publish message successfully to "TEST_PSOT_SVC" service on our RTDS
but when I use python api then I am getting above mentioned error message
Any helpful tip to resolve this issue is appreciated
Thanks
Dhruvesh
Best Answer
-
You can use OMM posts to send messages to an interactive provider, a non-interactive service, or an RTDS cached service.
In your case, I assume that you would like to post messages to an interactive provider. First, you need to start an interactive provider to make the service up. The login response of an interactive provider must support OMM post.
<refreshMsg domainType="RSSL_DMT_LOGIN" streamId="1" containerType="RSSL_DT_NO_DATA" flags="0x168 (RSSL_RFMF_HAS_MSG_KEY|RSSL_RFMF_SOLICITED|RSSL_RFMF_REFRESH_COMPLETE|RSSL_RFMF_CLEAR_CACHE)" groupId="0" dataState="RSSL_DATA_OK" streamState="RSSL_STREAM_OPEN" code="RSSL_SC_NONE" text="Login accepted by host replablinux4." dataSize="0">
<key flags="0x26 (RSSL_MKF_HAS_NAME|RSSL_MKF_HAS_NAME_TYPE|RSSL_MKF_HAS_ATTRIB)" name="rmds" nameType="1" attribContainerType="RSSL_DT_ELEMENT_LIST">
<attrib>
<elementList flags="0x8 (RSSL_ELF_HAS_STANDARD_DATA)">
<elementEntry name="AllowSuspectData" dataType="RSSL_DT_UINT" data="1"/>
<elementEntry name="ApplicationId" dataType="RSSL_DT_ASCII_STRING" data="256"/>
<elementEntry name="Position" dataType="RSSL_DT_ASCII_STRING" data="127.0.0.1"/>
<elementEntry name="ProvidePermissionProfile" dataType="RSSL_DT_UINT" data="0"/>
<elementEntry name="ProvidePermissionExpressions" dataType="RSSL_DT_UINT" data="1"/>
<elementEntry name="SingleOpen" dataType="RSSL_DT_UINT" data="0"/>
<elementEntry name="SupportPauseResume" dataType="RSSL_DT_UINT" data="0"/>
<elementEntry name="SupportStandby" dataType="RSSL_DT_UINT" data="0"/>
<elementEntry name="SupportBatchRequests" dataType="RSSL_DT_UINT" data="4"/>
<elementEntry name="SupportViewRequests" dataType="RSSL_DT_UINT" data="0"/>
<elementEntry name="SupportOMMPost" dataType="RSSL_DT_UINT" data="1"/>
</elementList>
</attrib>
</key>
<dataBody>
</dataBody>
</refreshMsg>Otherwise, you will get "F26: Server does not support inserts".
0
Answers
-
Sorry about the issue that you are facing.
The following is the definition of this error in the ADS Installation Manual.
If the insert request cannot be completed because the service is unavailable, the ADS generates an Insert NAK with this status text
I think the service may be down so you are unable to post items to this service.
You can use the following source request to get all available services and statuses in RTDS.
{
"ID": 2,
"Domain": "Source",
"Key": {
"Filter": 1
}
}You may try to add TEST_POST_SVC into the ADS cacheServiceList configuration.
*ads*cacheServiceList: TEST_POST_SVC
! *ads*cacheServiceList :
!#help
! cacheServiceList: [<ServiceName1>], [<ServiceName2>] ...
!
! This parameter is a comma-separated list of service names as published
! by the ADS. Each defined service will be created on startup of the ADS
! to provide a non-interactive cache for insert and OMM post message content.
!
! These services can be used in conjunction with the aggregateServiceList
! parameter to provide RSSL publisher applications the ability to provide
! additional content to the same server cache.
!
! Default value: none
!#endHow did you publish items to this service with RFA? Are you using RFA non-interactive provider (StarterProvider_NonInteractive) to publish data to this service?
I hope that this information is of help
0 -
our app support has added entry in "cacheServiceList" still we having issue to post the data.
If I send the following request the I don't see "TEST_POST_SVC " service in the response
- {
- "ID": 2,
- "Domain": "Source",
- "Key": {
- "Filter": 1
- }
- }
But if I start our RFA publisher which connect to "TEST_POST_SVC" then I do see it's in response of above request. However while "TEST_POST_SVC" is online by c# RFA publishe if I try to post data using python api I am receiving following error
RECEIVED:
[
{
"AckID":41,
"ID":1,
"Key":{
"Name":"EUR=",
"Service":"TEST_POST_SVC "
},
"NakCode":"DeniedBySrc",
"Text":"F26: Server does not support inserts.",
"Type":"Ack"
}
]
I think we need to figure out
- how "TEST_POST_SVC " service online all the time
- Allow the Python api to POST data without any error message regarding "Server does not support inserts"
Thanks
Dhruvesh
0 - {
-
Hi
Our app support added the "TEST_POST_SVC " to cacheServiceList and we still having same issue.
"TEST_POST_SVC" is not online by default so when Python code try to post the message it receive the error ""Text":"A9: Service is unavailable."
Other alternate we tried to run our C#/RFA code which connect to "TEST_POST_SVC" and we do see "TEST_POST_SVC" online. Once ""TEST_POST_SVC" online we try to run on Python code to POST the message we getting following error
"NakCode":"DeniedBySrc", "Text":"F26: Server does not support inserts.", "Type":"Ack"
So I was wondering
- "TEST_POST_SVC" supposed to be online all the time or it should come up online when Python code try to POST the message like C#/RFA code
Thanks for your help
Dhru
0 -
Hi @dpatel1
As advised by @Jirapongse - the most likely/common explanation for Posting not working is that the service has not been correctly configured on your ADH RTDS component.
Please see the following article Contributing your data to Refinitiv | Devportal - and/or ask your RTDS team to contact RTDS support at Refinitiv for guidance.1 -
Thank you for providing the informative link. I will check our RTDS team
Dhru
0 -
Thanks , Let me share above feed back with RTDS team. I am using the community provided Python code with "ws" and it same code can be used with your suggestion .
Dhru
0 -
I was looking into our existing C# code/libraries which does uses RFA config file for RSSL connectivity and I couldn't find any settings where I can define "SupportOMMPost".
I was wondering if any example available which I can use to define "SupportOMMPost"?Also, our goal is to POST messages using Python to our internal TREP infrastructure, so we are ok to try any approach which can work with interactive provider, non interactive provider or Cache Service. I was also wondering which developer document I should refer if I wanted to get more idea about difference between interactive vs non-interactive vs cached service? I am newbie to refinitive API ( have used pre-cofigured code)
Thanks for your help and suggestion so far.
0 -
The SupportOMMPost attribute must be set in the interactive provider. The interactive provider will advertise it in the login response sent to ADH. If it sets the value of the SupportOMMPost attribute to zero, this indicates that the interactive provider can't accept post messages from consumers.
You can refer to the RFA Quick Start Guide in the RFA package regarding interactive vs non-interactive providers. Otherwise, you can check the ETA Developers Guide in Section 3.2.6 Posting.
First, you need to configure RTDS properly before using APIs. You may need to contact the RTDS support team directly via MyRefinitiv regarding how to configure RTDS to support non-interactive providers or cached services.
0 -
Thank you. I will look into documentation you suggested. Our RTDS team thinks all the configuration are done properly on their side so should be issue in the API so I am trying to figure out how can I verify. since Python code is trying to post the message and I don't have proper example of interactive provide where I can set up SupportOMMPost
0 -
The StarterProvider_Interactive example is available in the package. It demonstrates how to encode a login response message including advertising the SupportOMMPost attribute.
0 -
I have used example "StarterProvider_Interactive" from RFA Package. I also enable SUPPORT_POST_FLAG. When I execute the code I do see "TEST_POST_SVC" is online
Then I have started the python code with and try to send the POST request to "TEST_POST_SVC".
It invokes "ProcessOMMSolicitedItemEvent(OMMSolicitedItemEvent evnt)" in "StarterProvider_Interactive.cs" which has only message handling for "Message.MsgTypeEnum.GenericMsg" and "Message.MsgTypeEnum.ReqMsg" So I added message handling for "Message.MsgTypeEnum.PostMsg" (e.g print evnt.toString())
however when Python code try to post I am still receiving error (different error this time) see below
thanks for helpful suggestions so far I think I am getting closer and might be needed some minor tweak to make it work
SENT:
{
"Ack":true,
"ID":1,
"Key":{
"Name":"XEUR=BX",
"Service":"TEST_POST_SVC"
},
"Message":{
"Fields":{
"ASK":27.83,
"BID":26.62,
"TRDPRC_1":27.09
},
"ID":0,
"Type":"Update"
},
"PostID":11,
"Type":"Post"
}
RECEIVED:
[
{
"AckID":8,
"ID":1,
"Key":{
"Name":"XEUR=BX",
"Service":"TEST_POST_SVC"
},
"NakCode":"NoResponse",
"Text":"F5: Source application did not respond. Insert request timeout. Please retry.",
"Type":"Ack"
}
]
0 -
I think I am making progress and StateProvider_Post example helped me to make interactive posting and I am able to post data using Python (On-Stream)
thanks for your help. If any issue I will try to update on this post
0
Categories
- All Categories
- 6 AHS
- 39 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 中文论坛