Eikon API in Python - Limiting the Downloaded Rows

Hello, Im using Eikon API in Python. I want to limit the ownership downloads with top 10 rows instead of downloading every ownership. How can I adjust it? Thanks

dd, er = ek.get_data(["AAPL.O"],
["CF_NAME", "TR.ISIN", "TR.InvestorFullName", "TR.SharesHeld",
"TR.FilingType", "TR.HoldingsDate", "TR.CompanySharesOutstanding"])

Best Answer

  • jason.ramchandani01
    Answer ✓

    @Fatih Yazgan Thanks for your question - so the StartNum and EndNum Parameter settings allow you to control this:

    dd, err = ek.get_data(["AAPL.O"],
                ["CF_NAME", "TR.ISIN", "TR.InvestorFullName", "TR.SharesHeld",
                "TR.FilingType", "TR.HoldingsDate", "TR.CompanySharesOutstanding"],
                {'StartNum': 0, 'EndNum': 10})

    1678893705111.png

    Note static fields such as ISIN won't be copied down the list but this can easily be achieved with the pandas forward fill function. I hope this can help.


Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.