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

Fix: executeTrade not possible due to payment_option set to 1 (default) if not specified #64

Merged

Conversation

floshodan
Copy link
Contributor

With the current API Wrapper it is not possible to executeTrades. It is not possible to change the payment_option field (which is specified as a optional parameter in the docs). As its a optional Post Parameter, it is set to payment_option=1 on bitcoin.de side.

However, since the Fidor bank shutdown a payment_option=1 (Express Trade) is not possible on the platform anymore. But the payment_option is still be set if not specified, resulting in an "71 - Express Trade not allowed" Error. (Which tbh should also be fixed on bitcoin.de side, as it does not make sense)

As it was not possible to set the payment_option regardless, I added the field and changed the default value to 2 (SEPA-Buy) and also made the field optional, by overriding the method call parameter.

Optionally, rather then changing the default value in the method itself, we could allow for making the whole parameter optional with **args, so the payment_option field can still be set to the desired value when calling the method. However an existing codebase with older realeases might not work.

…he default to payment_option=2 (due to the fact that the default value of bitcoin.de side is set to 1, however an payment_option value of 1 is not possible as bitcoin.de removed the express trading option since the fidor bank shut down.) To allow other payment_options as well the param can be overwritten.
@peshay
Copy link
Owner

peshay commented Aug 3, 2024

Thanks for your contribution! Can you also add the new parameter to the tests, so they succeed? Then I can file a new bugfix release.

@peshay peshay merged commit 08e7d8b into peshay:master Aug 3, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants