ERRATIC Behaviour of lseg.data API

I ran the same lines of code in Jupyter and Sublime Text, both using the same venv and python interpreter (so there is no reason for differences in their behaviour)
On Sublime text and sometimes in Jupyter as well, the price field data download is erratic. Sometimes it will download ALL the price fields I have requested, sometimes just ONE price field.
In this screenshot, Sublime Text was never able to retrieve all my price field requests (see left window) but Jupyter was able to (right window). Sometimes, it just spits out an error that says TR.OPENPRICE request
ANY KNOWN FIXES TO THIS ERRATIC API DOWNLOAD BEHAVIOUR???
Answers
-
Thank you for reaching out to us.
You can enable the debug log in the library to verify what the problem is. Run the following code before opening a session to enable the debug log.
config = ld.get_config()
config.set_param("logs.transports.file.enabled", True)
config.set_param("logs.transports.file.name", "lseg-data-lib.log")
config.set_param("logs.level", "debug")The lseg-data-lib.log file will be created. Please share the log files from both environments. The log file may contain your credentials. Please remove the credentials before sharing the log files.
0 -
Hi attached three logs for three attempts on the same code. I don't think the issue is whether Sublime or Jupyter was used. Here, I only use Sublime and as you can see, the unreliability of data retrieval is evident. Sometimes. it was able to retrieve all the data fields nicely for all symbols; sometimes, there are inconsistent errors on each run.
On the THIRD TRY, there was even a "Service unavailable" error.
I retrieve contract data symbol by symbol based on code below:
symbols used: ["TFMBMc1", "TFMBSc1", "NGLNMc1", "NGLNSc1", "DEBYc1", "CFI2Z5", "LCOc1", "NGc1"]
try:
print(get_contract_data(
universe=[sym],
fields=["TR.OPENPRICE", "TR.HIGHPRICE", "TR.LOWPRICE", "TR.SETTLEMENTPRICE"],
interval="1D",
start_date=start_date,
end_date=end_date
))
print(f"New contract data successfully updated for {sym}.")
except Exception as e:
print(f"Error trying to get contract data for {sym}: \n{e}")0 -
Attached logs for FOURTH TRY. Here, you can see that an error only occurred for one ticker LCOc1 but it was able to retrieve for all others.
0 -
Thank you for the log files.
It looks like to be a problem in the backend service, not in the library.
I don't have visibility in the backend service so I have submitted this issue on your behalf. The case number is 14479808. The support team will contact you regarding this issue.
0 -
Thanks vm
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 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
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛