Hello
I am stuck in Auth failed when i try to use nova private API .
Here is the code :
/////////////////////////////////////////
$api_key = "xxxxxxxxxxxxxxxxxxxxxx" ;
$api_secret = "xxxxxxxxxxxxxxxxxxxxxx" ;
$t = time ();
$url = "
https://novaexchange.com/remote/v2/private/" . "tradehistory" . "/?nonce=" . $t ;
$signature = hash_hmac ( 'sha512' , $url , $api_secret , true );
$ch = curl_init ();
$curlConfig = array(
CURLOPT_URL => "
https://novaexchange.com/remote/v2/private/tradehistory" . "/?nonce=" . $t ,
CURLOPT_POST => true ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_SSL_VERIFYPEER => false ,
CURLOPT_POSTFIELDS => array(
'apikey' => $api_key ,
'signature' => $signature ,
)
);
curl_setopt_array ( $ch , $curlConfig );
$result = curl_exec ( $ch );
curl_close ( $ch );
echo $result ;
output === > {"status": "error", "message": "Auth failed"}
///////////////////////////////////////////
any idea what is wrong here ?