Description
Hello, I'm encountering the following error when calling both GetProductTickerAsync and GetProductStatsAsync. Can you please help figure out what is going wrong. I'm just passing in a string product id. I took a look at the source code in this repo, but can't see why the methods would be failing as they are just calling SendServiceCall in the same way as many other places.
I am connected to Coinbase using the following method...
Client = new CoinbasePro.CoinbaseProClient(authenticator, IsSandbox)
Here's the call stack...
System.Net.Http.HttpRequestException: Request headers must contain only ASCII characters.
at System.Net.Http.HttpConnection.WriteStringAsync(String s, Boolean async)
at System.Net.Http.HttpConnection.WriteStringAsync(String s, Boolean async, Encoding encoding)
at System.Net.Http.HttpConnection.WriteHeadersAsync(HttpHeaders headers, String cookiesFromContainer, Boolean async)
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
at CoinbasePro.Network.HttpClient.HttpClient.SendAsync(HttpRequestMessage httpRequestMessage, CancellationToken cancellationToken)
at CoinbasePro.Network.HttpClient.HttpClient.SendAsync(HttpRequestMessage httpRequestMessage)
at CoinbasePro.Services.AbstractService.SendHttpRequestMessageAsync(HttpMethod httpMethod, String uri, String content)
at CoinbasePro.Services.AbstractService.SendServiceCall[T](HttpMethod httpMethod, String uri, String content)
at CoinbasePro.Services.Products.ProductsService.GetProductStatsAsync(String productId)