Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retrieve current size/value of CASH data in PORTFOLIO #51

Open
AnAnalogGuy opened this issue May 10, 2023 · 3 comments
Open

How to retrieve current size/value of CASH data in PORTFOLIO #51

AnAnalogGuy opened this issue May 10, 2023 · 3 comments

Comments

@AnAnalogGuy
Copy link

AnAnalogGuy commented May 10, 2023

First of all: Thanks @icastillejogomez for the API, very useful!

--

Hi all

when retrieving the CASH account data as rows in the PORTFOLIO dataframe like


request_list.values.extend(
    [
        Update.Request(option=Update.Option.PORTFOLIO, last_updated=0),
    ]
)

the API seems to return the Cash Account Data from the last cash transfer to the FLATEX account, not the actual value of the Cash Account (i.e. US Dollar, "size" parameter), neither in the baseCurrency nor in the FXCurrency (i.e. EUR, "value" parameter).

The Cash Account (size) could have changed in the meantime because of buy/sell activities, the baseCurrency Value (value) because of changes in the exchange rate. Now, i was wondering if there is a way to retrieve the actual values for both, size and value, or at least the changes since the last transfer to the FLATEX account - i was searching the API doc but was not able to find related information. Maybe someone could give me a hint?

Thanks a lot!

@icastillejogomez
Copy link
Owner

When I developed this library I've tried to retrieve this information but was not possible only fetching data from the degiro API. You can inspect the degiro webpage usage to discover how they are getting this data in order we can implement this feature. I'm going to keep this issue open for a week wating for this information.

@AnAnalogGuy
Copy link
Author

It might be the cash data does not come from the same source as the portfolio data since in the backend these are two different systems. However i would expect it's made available in the same application gateway, maybe as a seperate endpoint.

I'm not too familiar with reverse engineering and JS, but i will give it a try. Any starting point/starting information you can provide me with, so I don't have to start from zero?

@AnAnalogGuy
Copy link
Author

From the basic mechanism, it must be two requests. Actually, it seems generally the current state is always composed from the last day end state plus relativ changes during the current day. At least this is what one can see when the UI is rendered - first the values from last market close is rendered and then updated with the current value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants