Im having trouble the get aligned data with dates for some instruments

Im having trouble with the API. As you can see below, the resultant dataframe comes with null values on the last dates, and values on the first dates. The problem is that the "MATD3.SA" didnt exist before 2021.
On excel, with same parameters, the dataframe comes alright, with null values up to 2014. So why is this happening on here?
dic_parametros_fundamentals_Q = {
'SDate': -140,
'Period': 'FQ0',
'EDate': 0,
'Frq': 'M' } df_chunk = fundamental_and_reference.Definition(
universe='MATD3.SA',
fields=['TR.CompanyMarketCap.calcdate', 'TR.F.TotRevenue.fperiod',
'TR.F.TotRevenue.fperiod'],
parameters=dic_parametros_fundamentals_Q ).get_data().data.df
print(display(df_chunk)) display(df_chunk ):
Best Answer
-
- I will contact the product team to verify this issue
- You can use the LSEG Data Library for Python to connect to the desktop.workspace session. The code will be like this:
ld.open_session(app_key="<APP KEY>")
1
Answers
-
Thank you for reaching out to us.
Are you using to the Data Platform session?
I got the same output when using the platform session.
However, the output is correct when using the desktop.workspace session.
You may need to check the version of library that you are using. I am using LSEG Data Library for Python (2.1.1).
0 -
im using:
import lseg.data as ld
from lseg.data.content import pricing
from lseg.data.content import fundamental_and_reference
def ld_connect(APP_KEY = os.environ['REFINITIV_EDP_API'], USER = os.environ['REFINITIV_USER'], PASS = os.environ['REFINITIV_PASSWORD']):
session = ld.session.platform.Definition(
app_key = APP_KEY,
grant = ld.session.platform.GrantPassword(
username = USER,
password = PASS
),
signon_control = True
).get_session()
session.open()
ld.session.set_default(session)
print("LSEG connected")
return session0 -
Could you help my to adjust my
def ld_connect
with a bool value to choose to connect through 'platform session' or 'desktop.workspace session'? The platform session would be the right solution for me, but the content is wrong… so i cannot use it
Thanks
0 -
0
-
0
-
To use the desktop.workspace session, you need to have a desktop account and the Workspace desktop application must be running on the same machine.
When using the desktop.workspace session, the library retrieves data through the Workspace desktop application.
You need to contact your LSEG account team or sales team for a desktop account.
0 -
Yes I know that. But we have 2 problems here:
1) the new API returns WRONG values and we are leaving it just like that?!
2) the documentation is hard for me to follow, so, do you have any example of code to set up a connection, please?
Thank you0 -
0
-
0
-
Hello @augusto_krappa
You can also create a file name lseg-data.config.json with the following content
{
"logs": {
"level": "debug",
"transports": {
"console": {
"enabled": false
},
"file": {
"enabled": false,
"name": "lseg-data-lib.log"
}
}
},
"sessions": {
"default": "desktop.workspace",
"desktop": {
"workspace": {
"app-key": "YOUR APP-KEY"
}
}
}
}Then place a file in the same location as your python application. You can use the following code to open a session.
ld.open_session()
There are set of tutorials that might help you available on https://developers.lseg.com/en/api-catalog/lseg-data-platform/lseg-data-library-for-python/tutorials page.
1 -
thank you
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
- 690 Datastream
- 1.5K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 560 WebSocket API
- 39 FX Venues
- 15 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
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 723 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛