I'm trying to integrate a binance api with php. I want to spend my spot wallets and earnings. I can't find the url I need for it and I can't get the endpoint either.
Additional question: For what do I need the timestamp?
$secret = "mySecretKey";
$key = "myApiKey";
$s_time = "timestamp=".time()*1000;
$sign=hash_hmac('SHA256', $s_time, $secret);
$url = "https://api.binance.com/api/v1/balances?".$s_time.'&signature='.$sign;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-MBX-APIKEY:'.$key));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$result = curl_exec($ch);
$result = json_decode($result, true);
echo '<pre>';
var_dump($result);
echo '</pre>';
curl_close($ch);
I've tried many urls and looked at the binance documentation for a long time but I just can't find it.
Thanks for your help!