For LSEG Data chain.py, example using platform.deployed, getting A18: Service unknown.

The connection is to RTC. I see in a post need: \*rtc\*defaultJsonServiceId, I believe in RTC rtc.cnf.
Is this correct ? How to use chain.py example to connect to local rtc ?
Answers
-
Thank you for reaching out to us.
If item requests don't have the service name property, it will use the service from the *rtc*defaultJsonServiceId configuration. Please refer to the Testing Real-time Streaming applications with Docker & Refinitiv Real-Time Connector (part 2) article.
Where did you get the chain.py example?
0 -
Hello @mark.sinner
You can specify the service name in the item request message as follows:
Example: service name is ELEKTRON_DD
{
"ID":2,
"Key":{
"Name":"VOD.L",
"Service": "ELEKTRON_DD"
}
}0 -
The example is from LSEG Data Python:
I don't see a way to specify the Service other than the rtc config. Trying below gets error with service= or Service=:
chn = ld.discovery.Chain(name="0#USTSY=TWEB",Service="IDN_RDF")^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Chain.init() got an unexpected keyword argument 'Service'
Code:
import os
import lseg.data as ld
from lseg.data.discovery import Chain
import datetime
from IPython.display import display, clear_output
import logging.configdef display_data(data, instrument, stream):
clear_output(wait=True)
current_time = datetime.datetime.now().time()
print(current_time, "- Data received for", instrument)
display(data)
ld.open_session(config_name='./lseg-data.config.json')
chn = ld.discovery.Chain(name="0#USTSY=TWEB",Service="IDN_RDF")
print(chn.constituents)
print(chn.summary_links)
ld.get_data(chn, ['BID', 'ASK'])ld.close_session()
0 -
To connect to RTC, you need to use the platform.deployed session with the following configurations.
"deployed": {
"app-key": "YOUR APP KEY GOES HERE!",
"realtime-distribution-system": {
"url" : "YOUR DEPLOYED HOST:PORT GOES HERE!",
"dacs" : {
"username" : "YOUR DACS ID GOES HERE!",
"application-id" : 256,
"position" : ""
}
}
}For example:
"deployed": { "app-key": "", "realtime-distribution-system": { "url" : "127.0.0.1:15000", "dacs" : { "username" : "api", "application-id" : 256, "position" : "" } } }
Then, you can use the EX-2.02.06-Pricing-StreamingChain.ipynb example. For example:
chain = pricing.chain.Definition(name="0#USTSY=TWEB", service="ELEKTRON_DD").get_stream() chain.open(with_updates=False) chain.close() print(chain.constituents)
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 167 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 702 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.2K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 2.9K Elektron
- 1.5K EMA
- 257 ETA
- 566 WebSocket API
- 40 FX Venues
- 16 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 283 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 24 RDMS
- 2.1K Refinitiv Data Platform
- 824 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 122 Open DACS
- 1.1K RFA
- 107 UPA
- 195 TREP Infrastructure
- 232 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 100 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛