Do we have an option to retrieve SDC New issues data in API?

Client provided code:
import eikon as ek
import pandas as pd
import logging
import time # Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Set your Eikon API key
API_KEY = ''
ek.set_app_key(API_KEY) # Define fields to query
fields = [
'TR.NIBPSToBenchmark',
'TR.NIBenchmarkTreasuryDesc',
#"TR.NICollateralAssetType(Concat='|')",
#"TR.NICollateralAssetTypeNation(Concat='|')",
'TR.NIConversionCurrency',
'TR.NICouponPaymentFrequency',
'TR.NICouponRate',
'TR.NICouponType',
'TR.NIEbitLtmBeforeOffering',
'TR.NIEbitdaBeforeOffering',
'TR.NIFinalMaturityYearPrint',
'TR.NIIsDualCurrencyIssue',
'TR.NIIsOverSubscribed',
'TR.NIIsSupranational',
'TR.NIIssueDate()',
"TR.NIIssueType(Concat = '|')",
'TR.NIIssuer',
#'TR.NIIssuerEmployee',
#'TR.NIIssuerEmployeeDate',
"TR.NIIssuerExchTicker(Concat = '|')",
#'TR.NIIssuerNaics',
'TR.NIIssuerNaics2022',
'TR.NIIssuerNation',
'TR.NIIssuerShortName',
'TR.NIIssuerUltParentNation',
#'TR.NIIssuerUltParentPrimayTickerSymbol',
'TR.NIIssuerUltParentShortName',
'TR.NIIssuerUltParent',
#'TR.NIIssuerUltParentNaics',
'TR.NIIssuerUltParentNaics2022',
'TR.NIMarketValueBeforeOffer',
'TR.NIOfferCurrency',
'TR.NIOfferPrice',
'TR.NIPkgOfferCurrency',
#"TR.NIPrimaryStockExch(Concat = '|')",
'TR.NIPrimaryTickerSymbol',
"TR.NIPrimaryUseOfProceeds(Concat = '|')",
'TR.NIPrincipalAmtAllMkts',
'TR.NIPrincipalAmtThisMkt',
'TR.NIProceedsAmtAllMkts',
#'TR.NIProceedsAmtInclOverallotSoldAllMkts',
'TR.NIRedemptionHasPerpetualMaturity',
'TR.NIRedemptionMaturityDate',
#'TR.NIRedemptionMaturityDatePrint',
#'TR.NIRedemptionMaturityType',
'TR.NIRedemptionNumOfYrToMaturity',
"TR.NITargetMarket(Concat ='|')",
#'TR.NITotalAssetsBeforeOffering',
#'TR.NITotalDebtAfter',
#'TR.NITotalRevenuesBeforeOffering',
'TR.NITransactionStatus',
'TR.NIPubMid',
'TR.NIPubStatus',
'TR.NIIssuerPublicStatus',
'TR.NIIssuerUltParentPublicStatus',
'TR.NIIssuerPublicMid',
'TR.NIRatingsMoodysDebt',
'TR.NIRatingsFitchLongTermDebt',
'TR.NIRatingsIsHighYieldRated',
'TR.NIRatingsMoodysSeniorOSDebt',
#'TR.NIRedemptionOfferYieldToMaturityOrPutPct',
#'TR.NIPfdStockYieldPct',
'TR.NIOfferPricePct',
'TR.NIOfferPriceUniform',
'TR.NIIssuerSEDOL',
'TR.NIIssuerUltParentSEDOL',
'TR.NIIssuerUltParentSDCCusip',
'TR.NISDCCusip',
'TR.NIIssuerCusip9',
'TR.NIISINAtOffer',
#"TR.NIHasCouponFrequencyMismatch",
#"TR.NICouponFloatLimitation",
#"TR.NICouponTypeSector",
#"TR.NICouponDayCountConvention",
#"TR.NIFloatingRateCouponFreq",
#"TR.NIFirstCouponDate",
#"TR.NIInitialCouponPayment",
#"TR.NIIsFloatingRateIssue",
#"TR.NIFloatingRateIndex",
#"TR.NIFloatingRateFloatSpread",
#"TR.NIPkgDealId",
#"TR.NIPkgOfferCurrency",
#"TR.NISdcPackageNumber",
#"TR.NINumTranchesInPackage",
#"TR.NIIsMainTranche",
#"TR.NIHasMultBookRunnersAcrossTranches",
#"TR.NIParticipant",
#"TR.NIDealID",
#"TR.DealEventDealId",
"TR.NIProceedsAmtThisMkt"
] # Define years range
years = range(1996, 1998) # Loop through each year
for year in years:
# Define date ranges for each quarter
date_ranges = [
(f'{year}0101', f'{year}0331', 'Q1'),
(f'{year}0401', f'{year}0630', 'Q2'),
(f'{year}0701', f'{year}0930', 'Q3'),
(f'{year}1001', f'{year}1231', 'Q4')
]
# Loop through each quarter of the year
for start_date, end_date, quarter in date_ranges:
# Set universe of search to bond new issuance
universe = (f"SCREEN(U(IN(DEALS)/*UNV:DEALSBOND*/), TR.NIisECM = False, "
f"BETWEEN(TR.NIIssueDate(IncludeNull = True), {start_date}, {end_date})/*dt:Date*/)") # Fetch data with retry mechanism
retries = 3
for attempt in range(retries):
try:
df_issuance, err = ek.get_data(universe, fields)
if err:
logging.error(f"Error fetching data for {start_date} to {end_date}: {err}")
if attempt < retries - 1:
logging.info(f"Retrying... ({attempt + 1}/{retries})")
time.sleep(10) # Wait before retrying
continue
# Log the shape of the DataFrame instead of displaying it
logging.info(f"Fetched data for {start_date} to {end_date}: {df_issuance.shape[0]} rows") # Export dataset to Excel
output_file = f"SDC New Issues/New Issues_{start_date}_to_{end_date}.xlsx"
df_issuance.to_excel(output_file, header=True, index=True)
logging.info(f"Data for {start_date} to {end_date} saved to {output_file}")
break # Exit the retry loop if successful except Exception as e:
logging.error(f"Exception occurred for {start_date} to {end_date} on attempt {attempt + 1}: {e}")
if attempt < retries - 1:
logging.info(f"Retrying... ({attempt + 1}/{retries})")
time.sleep(10) # Wait before retrying
Answers
-
Thank you for reaching out to us.
This forum is dedicated to software developers using LSEG APIs. The moderators on this forum do not have deep expertise in every bit of content available through LSEG products, which is required to answer content questions such as this one.
The best resource for content questions is the helpdesk support team, which can be reached by submitting queries through MyAccount. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.
You can ask for the TR.XXX fields that can provide the required data or the Workspace application that can retrieve the required data. Then, I can check if the data can be retrieved via the Python code.
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
- 684 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
- 249 ETA
- 554 WebSocket API
- 37 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
- 643 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 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 中文论坛