Hi all. When sending, the POST gives out the {“code”:-1002,“msg”:“访问受到限制”} Tell me, maybe I’m doing something wrong. End point /sapi/v1/convert/getQuote
$header = array(
'X-MBX-APIKEY: ' . $apiKey,
'Content-Type: ' . 'application/x-www-form-urlencoded'
);
$timestamp = time()*1000;
$data = array(
'fromAsset' => 'BUSD',
'toAsset' => 'ETH',
'toAmount' => 1,
'timestamp' => $timestamp
);
$signature = hash_hmac('sha256', http_build_query($data), $secretKey);
$data = $data + array('signature'=> $signature);
$url = 'https://api.binance.com/sapi/v1/convert/getQuote';
echo post($url,$header,$data);