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

Unable to connect to exchange API #97

Open
Grorvald opened this issue Oct 3, 2021 · 3 comments
Open

Unable to connect to exchange API #97

Grorvald opened this issue Oct 3, 2021 · 3 comments

Comments

@Grorvald
Copy link

Grorvald commented Oct 3, 2021

I am trying to set up an Exchange External Service using my Kraken account, but I get the following error:

"Could not connect with current settings. Transmuter tests against fetching your balance amount from the exchange so you would need to enable that option if available"

My Kraken account is verified, and the API key I generated has all permissions set to true.

Is there a log with more information about this error?

@Grorvald
Copy link
Author

Grorvald commented Oct 6, 2021

So I applied the latest update. According to the notes,

Authorize API key page was broken when trying to select specific stores (#2858) @ubolator

I applied the update by going to the page /server/maintenance/

I also rebuilt BTCTransmuter by rerunning the deployment instructions found
https://docs.btcpayserver.org/Transmuter/

Not sure if that did anything.

In either case, now the exchange box is empty. Can't select any exchange.
So when I save my API key without any exchange name, it throws the exception:

ApplicationException: Failed to get type from exchange name
ExchangeSharp.ExchangeName.GetExchangeType(string exchangeName)
ExchangeSharp.ExchangeAPI.GetExchangeAPIAsync(string exchangeName)
BtcTransmuter.Extension.Exchange.ExternalServices.Exchange.ExchangeService.ConstructClient() in ExchangeService.cs
BtcTransmuter.Extension.Exchange.ExternalServices.Exchange.ExchangeService.TestAccess() in ExchangeService.cs
[...]

Did I fail to apply the update properly? Do I need to rebuilt Transmuter from scratch? Is this an active bug?

@Grorvald
Copy link
Author

Grorvald commented Oct 7, 2021

Ran the update again today - my 2nd post's error is gone so I can select an exchange again.
However the original error is back:

Could not connect with current settings. Transmuter tests against fetching your balance amount from the exchange so you would need to enable that option if available

I have confirmed that my API key works, I can query my balance using a basic python script.

@Grorvald
Copy link
Author

Grorvald commented Oct 7, 2021

I added some XMR to my account, and now it works!

The Balance request api call returns an empty value if there's no wallet with some funds in your account.
The Status would still be 200 though, so it is a valid request.

Because the External Exchange Service seems to be testing the api by making a balance call, at least for Kraken it seems to fail when parsing out the reply. It might assume that the return value will always contain a value, and just throws an exception when it fails to retrieve any data, as opposed to just looking at the status of the reply.

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

1 participant