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
[BUG] Can't add activity via API because of currency mismatch #3094
Comments
Same issue for me |
Issue is still present in the latest version. |
I'm experiencing the same issue. It's quite common for transactions to be conducted in a currency different from the asset's currency because they are typically converted into the account's currency. However, when I attempt to insert a record via the API, it fails, even though inserting the same transaction through the UI succeeds without any problems and includes automatic conversion to the asset's currency. ExampleAPI{
"accountId": "c50ea5fe-ce5b-47e0-ba82-c46b4fa04a91",
"currency": "EUR",
"dataSource": "YAHOO",
"date": "2022-07-27T19:56:32+00:00",
"fee": 0,
"quantity": 1.0,
"symbol": "META",
"type": "BUY",
"unitPrice": 166.25
} will end with: {
"error": "Bad Request",
"message": [
"activities.0.currency (\"EUR\") does not match with currency of META (\"USD\")"
]
} UIGhostfolio Version 2.70.0 |
I'm currently having the same issue (self-hosted), and if i add the transaction manually, every view like e.g. Holdings says "Oops! Something went wrong. Please try again later." |
Important Notice
The issue tracker is ONLY used for reporting bugs. New features should be discussed in our Slack community or in Discussions.
Incomplete or non-reproducible issues may be closed, but we are here to help! If you encounter difficulties reproducing the bug or need assistance, please reach out to our community channels mentioned above.
Thank you for your understanding and cooperation!
Bug Description
When trying to add a new activity via the API, the following error pops up:
This used to work in a previous version of Ghostfolio.
To Reproduce
Expected behavior
In a previous version of Ghostfolio, this API call would work without problem, as it would just convert the EUR to USD.
Adding the activity manually via the GUI works, even when setting the currency to EUR.
Screenshots
Logs
Environment
Additional context
The text was updated successfully, but these errors were encountered: