Coinqvest API authentication testing

I had some challenging time getting basic authentication working with the Coinqvest RestAPI, but the following works for anyone wanting to do the some.

$basic       = $key + ":" + $secret
$sha256      = [System.Security.Cryptography.HashAlgorithm]::Create('sha256');
$signature   = $sha256.ComputeHash([System.Text.Encoding]::ASCII.GetBytes($basic))
$xbasic      = [BitConverter]::ToString($signature).Replace('-','').ToLower()
$Header      = @{'X-Basic' = $xbasic}
$URI         = 'https://www.coinqvest.com/api/v1/auth-test'

Invoke-WebRequest -URI $URI -Header $Header

Welcome to PowerShell.org forums.

So the code above works and you have shared it to help any one with coinqvest API ?

That is correct. There are plenty of working examples using other languages but not for PowerShell.

Awesome. Thanks for sharing this :+1: