dougdellolio / coinbasepro-csharp

The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
MIT License
193 stars 90 forks source link

CoinbaseProHttpException: request timestamp expired #293

Closed TallGuy2 closed 3 years ago

TallGuy2 commented 3 years ago

I'm trying to get all accounts using the CoinbaseAccounts Service or the Accounts Service, but I'm getting this error: "CoinbaseProHttpException: request timestamp expired". I can use the Products Service to get a list of products so that part is working. I also have the api key set to trade, view, and transfer.

Here's my code var authenticator = new Authenticator("","",""); CoinbaseProClient coinbaseProClient = new CoinbaseProClient(authenticator); var accounts = await CoinbaseClient.AccountsService.GetAllAccountsAsync();

Any idea what the problem could be?

dougdellolio commented 3 years ago

hey @TallGuy2 this is a weird one but I have seen this and it usually happens if the time on your computer isn't configured properly. I would try re-configuring and restarting then running it again. let me know if that doesn't solve the issue.

TallGuy2 commented 3 years ago

Thanks for looking. I deleted my bin and obj folders and synchronized my time and restarted and now I'm getting "CoinbaseProHttpException: NotFound". The Products Service still works but not the Accounts Service. Does that help any?

TallGuy2 commented 3 years ago

Never mind. It's working now. The Not Found error came from something else. I think the restart was the answer. Thanks!