79149094

Date: 2024-11-01 18:49:10
Score: 0.5
Natty:
Report link

i have this problem. the documentation said this body parameter

{ "adOrderNo": "string" }

i tried to send by query but i recived an error "An unknown error occurred while processing the request."

$timestamp =  (time()+1)*1000;
$params['timestamp'] =$timestamp;
$params['adOrderNo'] ="22685410866598416384";   
$query = http_build_query($params, '', '&',);
$sign=hash_hmac('SHA256', $query, $secret);   


    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, "https://api.binance.com/sapi/v1/c2c/orderMatch/getUserOrderDetail");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $query."&signature=" .$sign);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded","X-MBX-APIKEY: ".$api_key));
     
    
    
    $result = curl_exec($ch);
    $result = json_decode($result, true);
    
    echo '<pre>';
    var_dump($result);
    echo '</pre>';
    
  curl_close($ch);
Reasons:
  • Blacklisted phrase (1): i have this problem
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Miguel Díaz Medina