Chavithra / degiro-connector

This is yet another library to access Degiro's API.
BSD 3-Clause "New" or "Revised" License
205 stars 46 forks source link

OptionsSearch not providing all products #121

Closed traveler0027 closed 6 months ago

traveler0027 commented 10 months ago

Hi Chavithra,

Thanks for providing this amazing API.

I am running into an issue, where it seems that the options search cannot provide more than limit=1000. Do you know whether this is intended, is this a bug, or is something else on my side perhaps going wrong? Below the code, regardless of what I put for limit, it doesn't go above 1000 it seems and only provides up to Feb '24 (Eurostoxx 50 options run at 10Y, and in the browser it's visible). If I change offset, I can get all the values eventually, so probably this is by design? Thanks.

    request = ProductSearch.RequestOptions(
        input_aggregate_types='',
        input_aggregate_values='',
        option_exchange_id=5,
        underlying_isin='EU0009658145',

        search_text='',
        offset=0,
        limit=1500,
        require_total=True,
        sort_columns='expirationDate,strike',
        sort_types='asc,asc',
    )
Chavithra commented 6 months ago

Hi @traveler0027,

so this API Endpoint works by batch like a SQL request:

It's a form of pagination: using the offset you can retrieve the data one batch/page at the time.

Hope that helps,

Thanks