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

Convert.FromBase64String(_privateKey); Throes error. #5

Open
AnderT opened this issue Jul 24, 2021 · 0 comments
Open

Convert.FromBase64String(_privateKey); Throes error. #5

AnderT opened this issue Jul 24, 2021 · 0 comments

Comments

@AnderT
Copy link

AnderT commented Jul 24, 2021

Hi Guys,

I generated an API Key and pasted it into the code along with the Public API Key. What am I doing wrong?

System.AggregateException
HResult=0x80131500
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at BtcMarketsApiClient.Sample.Program.Main(String[] args) in C:\Users\ander\source\repos\api-v3-client-dotnet\BtcMarketsApiClient\BtcMarketsApiClient.Sample\Program.cs:line 17

This exception was originally thrown at this call stack:
[External Code]
BtcMarketsApiClient.Sample.ApiClient.SignMessage(string) in ApiClient.cs
BtcMarketsApiClient.Sample.ApiClient.GenerateHeaders(System.Net.Http.HttpClient, string, string, string) in ApiClient.cs
BtcMarketsApiClient.Sample.ApiClient.Get(string, string) in ApiClient.cs
[External Code]
BtcMarketsApiClient.Sample.Orders.GetOrdersAsync() in Orders.cs

Inner Exception 1:
FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

Cheers,

Ander

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