finnhub-go icon indicating copy to clipboard operation
finnhub-go copied to clipboard

Client initialization & auth error from parsing context

Open youngjk opened this issue 4 years ago • 3 comments

Was trying to initialize the client and kept getting error around date parsing.

  finnhubClient := finnhub.NewAPIClient(finnhub.NewConfiguration()).DefaultApi
	auth := context.WithValue(context.Background(), finnhub.ContextAPIKey, finnhub.APIKey{
		Key: FINNHUB_TOKEN,
  })

Error message

2021/01/10 22:30:54 parsing time ""2020-03-13 00:00:00"" as ""2006-01-02T15:04:05Z07:00"": cannot parse " 00:00:00"" as "T"

youngjk avatar Jan 11 '21 03:01 youngjk

Wanted to follow up @finnhubio

youngjk avatar Feb 07 '21 22:02 youngjk

Hi @youngjk sorry for late reply. I am having a look now

nongdenchet avatar Feb 09 '21 20:02 nongdenchet

Hi @youngjk did you face the issue when calling an api? Asking because I am able to initialize the library just fine. Can you post your full error logs? Can you also provide what Go version and what library version you are using? Are you on the latest version 1.2.1? If possible can you post the whole code?

nongdenchet avatar Feb 10 '21 20:02 nongdenchet