[Bug]: ERR_RATE_UNAVAILABLE with Kraken
See original GitHub issueWhat is your BTCPay version?
I’m running BTCPay 1.6.6.
How did you deploy BTCPay Server?
https://github.com/btcpayserver/btcpayserver-docker
What happened?
BTCPay gives an error when trying to get exchange rates from Kraken (see Screenshot):
BTC_EUR | (ERR_RATE_UNAVAILABLE(kraken, BTC_EUR)) * (0.995, 1.005) XMR_EUR | (ERR_RATE_UNAVAILABLE(kraken, XMR_BTC) * ERR_RATE_UNAVAILABLE(kraken, BTC_EUR)) * (0.995, 1.005)
Getting the rates with curl works fine on the server:
# curl "https://api.kraken.com/0/public/Ticker?pair=XXBTZEUR,XXMRZEUR"
{"error":[],"result":{"XXBTZEUR":{"a":["23052.70000","4","4.000"],"b":["23052.60000","1","1.000"],"c":["23052.70000","0.00064988"],"v":["313.62198471","1165.18014950"],"p":["23302.98053","23480.07750"],"t":[7742,24326],"l":["23043.70000","23043.70000"],"h":["23461.00000","23759.10000"],"o":"23348.20000"},"XXMRZEUR":{"a":["160.89000000","3","3.000"],"b":["160.80000000","1","1.000"],"c":["160.82000000","0.17668000"],"v":["1963.85005144","3720.94757456"],"p":["165.23690132","164.58711410"],"t":[531,1339],"l":["160.82000000","160.82000000"],"h":["168.48000000","168.48000000"],"o":"164.18000000"}}}
How did you encounter this bug?
Creating an invoice failed after the upgrade.
Relevant log output
docker logs --tail 100 generated_btcpayserver_1
[...]
warn: PayServer: Warning: Error while trying to load rates from cache
System.FormatException: Invalid currency pair
at BTCPayServer.Rating.CurrencyPair.Parse(String str) in /source/BTCPayServer.Rating/CurrencyPair.cs:line 21
at BTCPayServer.Services.Rates.BackgroundFetcherRateJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in /source/BTCPayServer.Rating/Providers/BackgroundFetcherRateProvider.cs:line 40
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at BTCPayServer.Services.SettingsRepository.Deserialize[T](String value) in /source/BTCPayServer/Services/SettingsRepository.cs:line 72
at BTCPayServer.Services.SettingsRepository.<>c__DisplayClass4_0`1.<<GetSettingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at BTCPayServer.Services.SettingsRepository.<>c__DisplayClass4_0`1.<<GetSettingAsync>b__0>d.MoveNext() in /source/BTCPayServer/Services/SettingsRepository.cs:line 33
--- End of stack trace from previous location ---
at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory)
at BTCPayServer.Services.SettingsRepository.GetSettingAsync[T](String name) in /source/BTCPayServer/Services/SettingsRepository.cs:line 29
at BTCPayServer.HostedServices.RatesHostedService.TryLoadRateCache() in /source/BTCPayServer/HostedServices/RatesHostedService.cs:line 118
info: PayServer: Starting payment request expiration watcher
info: Configuration: Now listening on: http://0.0.0.0:49392
info: PayServer: 23 pending payment requests being checked since last run
info: PayServer: BTC: Checking if any pending invoice got paid while offline...
info: PayServer: BTC: 0 payments happened while offline
info: PayServer: Connected to WebSocket of NBXplorer (BTC)
warn: PayServer: Error while contacting exchange kraken: EQuery:Invalid asset pair
warn: PayServer: Error while contacting exchange kraken: EQuery:Invalid asset pair
warn: PayServer: Error while contacting exchange kraken: EQuery:Invalid asset pair
[...]
What browser do you use?
No response
Additional information
No response
Are you sure this is a bug report?
- I confirm this is a bug report
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
What does this error message mean?
"Service Unavailable" If you receive this error message when adding a bank account for United States domestic withdrawals via Synapse, it means one...
Read more >Kraken Terminal trading interface errors
This error means that the service is temporarily unavailable due to downtime. What you can do: Monitor the website response and uptime on...
Read more >Unable to withdraw cryptocurrencies
Addresses that you already added to your account won't be affected. You may see a "Balance is insufficient for a withdrawal" error, or...
Read more >API error messages
This error occurs when a flag or input parameter is disabled temporary or permanently. The error should come from one of the inputs...
Read more >Unable to withdraw funds
You may see a "Balance is insufficient for a withdrawal" error or the withdrawal page may say that your funds are "Withheld" or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed in https://github.com/btcpayserver/btcpayserver/commit/15e1169f6211f401e7a53ae4b576243bef565ca7
This was fixed. Update to latest.
On Sun, Aug 21, 2022, 14:47 v ₿ @.***> wrote: