Hello,I’m trying to access my account status but I only get this:
{“msg”:“You are not authorized to execute this request.”}
Hope anyone can help, of course the apikey is correct, it’s something I cant figure out.
I’m using php, here’s my code:
$akey = ‘****api key here of course ***’;
$now = strtotime(‘now’) ;
$header = array(
“X-MBX-APIKEY:$akey”,
“timestamp=$now” ) ;
$url = ‘https://api.binance.com/wapi/v3/accountStatus.html’;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $header );
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 1 );
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1 );
$contents = curl_exec ($ch);
echo $contents ;
Thanks!