Matteo De Leonardis
Matteo De Leonardis

Reputation: 1

Retrieve more than 10000 rows from refinitiv workspace

I'm trying to retrieve all the bonds from refinitiv workspace. I want to extract all the 250000+ bonds and actually I don't know how to do this. Here's the code I wrote:

import refinitiv.dataplatform as rdp
import refinitiv.dataplatform.eikon as ek

ek.set_app_key('mykey')
ddf = rdp.
df = rdp.search(

    view=rdp.SearchViews.FixedIncomeInstruments,

    filter="IsGreenBond eq false",

    select='Name, DocumentTitle, RIC, ISIN, AssetTypeDescription, MaturityDate, FaceOutstandingUSD, TrancheAmount, CouponClass, Currency, IssueDate, SeniorityTypeDescription, MaturityCorpModDuration, MaturityCorpYield, Price, SectorDescription',
    top=20000,
)

print(df)

I find out that there's a method from the refinitiv API that allows to do this, but only for the first (top) 10000.

Upvotes: 0

Views: 703

Answers (2)

Bin Yi Zhang
Bin Yi Zhang

Reputation: 21

Hi In response to your inquiry, here's a sample code from Refinitiv:

df = rdp.Search.search(
    view = rdp.SearchViews.GovCorpInstruments,
    filter = f"ParentOAPermID eq '{org_id}'and IsActive eq true and not(AssetStatus in ('MAT'))",

    # Define the upper limit of rows within our result set.  This is a imposed maximum value.
    top = 10000, 
    select = ','.join(properties),
    navigators = "Currency"
)

The maximum amount of data output retrievable from Eikon is capped at 10,000 due to system-imposed limitations. Therefore, setting the parameter top to 20,000 will result in the query failing and yielding an empty data frame.

Please visit the article linked here to check more details.

Upvotes: 0

johnukfr
johnukfr

Reputation: 61

Please note that there's a Q&A Forum specifically for refinitiv and LSEG APIs.

But to answer your question: you'll have to narrow down your search into buckets, say per country, and put it in a loop. The following articles will help you find out how:

With that said, I think that maybe screener might be the better tool to use here?

If you need more help, please do not hesitate to ask in the Q&A Forum.

Upvotes: 0

Related Questions