Invertee / CoinbasePro-Powershell

Powershell module for the CoinbasePro API.
MIT License
11 stars 6 forks source link

Can't get Accounts #9

Closed jonpinedo closed 3 years ago

jonpinedo commented 4 years ago

When invoking "Get-CoinbaseProAccounts" I get this:

`Invoke-CoinbaseProRequest : Bad Request. Invalid request format En C:\Program Files\WindowsPowerShell\Modules\CoinbasePro-Powershell\0.7.6\Functions\Private\Get-CoinbaseProAccounts.ps1: 19 Carácter: 17

Any clues?

neopsyon commented 4 years ago

I took this module and started rewriting it, anyway seems like there is an issue with the timestamp header and I can't figure it out still why, since it's being casted as a string.

alain-bora commented 3 years ago

I took this module and started rewriting it, anyway seems like there is an issue with the timestamp header and I can't figure it out still why, since it's being casted as a string.

The issue is due to the formatting of the round function (line 10 of the file Functions/Invoke-CoinbaseRequest.ps1). Depending on the locale it will generate the timestamp with a comma or a dot. A quick fix is: From: $Timestamp = ([math]::Round($Timestamp, 3)).ToString() to: $Timestamp = ([math]::Round($Timestamp, 0)).ToString()

ChristianTroll commented 3 years ago

Have the same issue. Answer is "Unauthorized. Invalid API key". Thats wrong, the values i provide are correct. I also tried the fix with the $timestamp. Doesn´t help. Any more ideas? Thanks in advance

stephenc01 commented 3 years ago

What version of PS?

jonpinedo commented 3 years ago

I'm using this version:

Version


5.1.19041.610

stephenc01 commented 3 years ago

Im using 7.1 core on a Mac. Ill test later on a PC.

stephenc01 commented 3 years ago

Try changing timestamp to the following.

$Timestamp = Get-Date -UFormat %s

Invertee commented 3 years ago

Rounded timestamps and uploaded new version to Powershell Gallery.