Python Websocket API Post Failure
When I use python websocket API to post market price I get an error of DeniedBySrc. The request and response are as followed:
Request:
{
"Ack":true,
"Domain":"MarketPrice",
"ID":2,
"Message":{
"Domain":"MarketPrice",
"Fields":{
"FAIR_VALUE":45.55
},
"ID":0,
"Type":"Update"
},
"PostID":3,
"PostUserInfo":{
"Address":"172.18.112.175",
"UserID":1080
},
"Type":"Post"
}
Response:
[
{
"AckID":3,
"ID":2,
"Key":{
"Name":"6YEAR_COP_SWAP=SBCM",
"Service":"DDS"
},
"NakCode":"DeniedBySrc",
"Text":"[400]: Invalid Request",
"Type":"Ack"
}
]
Please advise
Best Answer
-
Hello @lzhuang1
Those error messages are generate from TREP/DDS server. The DDS server uses the legacy SSL connection (Source Sink Library) to connect to TREP. Please be informed that the DDS server was already end of life and no longer supported. It has been replaced with the ATS (Advanced Transformation System) server which connects with TREP via a strategic RSSL connection.
I have tested your example code and post message to post data to my ATS server and it works fine. It can post data to my ATS successfully.
I suggest you enable the enable the Elektron Java API trace and contribute data. Then we can compare the Elektron Post message and WebSocket Post message as my colleague suggest above.
0
Answers
-
Hi @lzhuang1
Please see my existing post on a similar error message and confirm if my answer applies to your situation i.e. are you trying to use On-Stream posting for an item you are not currently consuming and do not have Open stream with ID:2
0 -
Umer, I have login and send the market price request and then post the market price in the on-stream connection, login and market price request response are below:
[
{
"Domain":"Login",
"Elements":{
"MaxMsgSize":61430,
"PingTimeout":30
},
"ID":1,
"Key":{
"Elements":{
"AllowSuspectData":1,
"ApplicationId":"beacon",
"ApplicationName":"ADS",
"Position":"172.18.112.175",
"ProvidePermissionExpressions":1,
"ProvidePermissionProfile":0,
"SingleOpen":1,
"SupportBatchRequests":7,
"SupportEnhancedSymbolList":1,
"SupportOMMPost":1,
"SupportOptimizedPauseResume":0,
"SupportPauseResume":0,
"SupportStandby":0,
"SupportViewRequests":1
},
"Name":"beacon"
},
"State":{
"Data":"Ok",
"Stream":"Open",
"Text":"Login accepted by host njads1."
},
"Type":"Refresh"
}
]
0 -
[
{
"Fields":{
"DSPLY_NAME":"6YEAR_COP_SWAP=S",
"FAIR_VALUE":0.0468957156,
"RDNDISPLAY":67,
"RECORDTYPE":209,
"TIMACT":"12:48:37.133",
"TRADE_DATE":"2019-09-18"
},
"ID":2,
"Key":{
"Name":"6YEAR_COP_SWAP=SBCM",
"Service":"DDS"
},
"Qos":{
"Rate":"TickByTick",
"Timeliness":"Realtime"
},
"State":{
"Data":"Ok",
"Stream":"Open",
"Text":"Item Refresh Completed\u0000"
},
"Type":"Refresh"
}
]
0 -
Umer, any updates? I just upload my code, please check outMarketPricePublishing.txt
0 -
Hello @lzhuang1
Based on my research:
- [400]: Invalid Request: The format is incorrect so the contribution cannot be processed.
- DeniedBySrc : the source being posted to has denied accepting this post message. The source may not support the post message
What is the component that you are trying to post data to? Is it DDS or ATS server? How your TREP connect to to it (RSSL or SSL connection)? Can you contribute data to that server with other API?
0 -
Hi Wasin, I am trying to post the below data for '6YEAR_COP_SWAP=SBCM'. It is DDS server. How can I know how TREP connect to? We can contribute data the the server with ELEKTRON API with Java (the lower-level api which need encode and decode message ourselves)
{
"Ack":true,
"Domain":"MarketPrice",
"ID":2,
"Message":{
"Domain":"MarketPrice",
"Fields":{
"FAIR_VALUE":45.55
},
"ID":0,
"Type":"Update"
},
"PostID":3,
"PostUserInfo":{
"Address":"172.18.112.175",
"UserID":1080
},
"Type":"Post"
}
0 -
BTW Wasin, is there any request which is equivalent to directory request in the Elektron API
0 -
Hi @lzhuang1
One thing to try is to enable the trace on the Java Elektron API code and contribute data. We can then compare the accepted Elektron Post message with your rejected Websocket Post message.
In terms of Directory request using Elektron Message API Java - see example example331__Directory__Streaming
In that example, if you don't specify a name when registering for MMT_DIRECTORY, then you will receive a full Directory response. If you do specify a servicename, you will only receive Directory information for that service(assuming it exists).
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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛