• 19-04-2021, 07:24:03
    #1
    merhaba coğu yerde binance api mevcut fakat yarım yamalak yada bazıları çalışmıyor kısa bi özet yazdım eyer daha talep gelirse tüm işlemleri yazabilirim
    al / sat / transver / çek / yatır gibi .

    <?php
    $secret = "SECRET_KEY_YAZINIZ";
    $key = "KEY_YAZINIZ";
    
    $time = microtime(true) * 1000;
    $timestamp = '&timestamp=' . number_format($time, 0, '.', '');
    $signature = '&signature=' . hash_hmac('sha256', $timestamp, $secret);
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'https://api.binance.com/api/v3/account?' . $timestamp . $signature);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $headers = array();
    $headers[] = 'X-MBX-APIKEY: ' . $key;
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $result = curl_exec($ch);
    if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
    }
    curl_close($ch);
    print_r(json_decode($result, true));
    
    ?>
  • 19-04-2021, 07:58:40
    #2
    FHO
    E-Commerce & Dropshipping
    Mesajım bulunsun, teşekkürler.
  • 19-04-2021, 09:12:02
    #3
    Teşekkürler
  • 29-05-2021, 02:56:47
    #4
    Ruxy adlı üyeden alıntı: mesajı görüntüle
    merhaba coğu yerde binance api mevcut fakat yarım yamalak yada bazıları çalışmıyor kısa bi özet yazdım eyer daha talep gelirse tüm işlemleri yazabilirim
    al / sat / transver / çek / yatır gibi .

    <?php
    $secret = "SECRET_KEY_YAZINIZ";
    $key = "KEY_YAZINIZ";
    
    $time = microtime(true) * 1000;
    $timestamp = '&timestamp=' . number_format($time, 0, '.', '');
    $signature = '&signature=' . hash_hmac('sha256', $timestamp, $secret);
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'https://api.binance.com/api/v3/account?' . $timestamp . $signature);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $headers = array();
    $headers[] = 'X-MBX-APIKEY: ' . $key;
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $result = curl_exec($ch);
    if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
    }
    curl_close($ch);
    print_r(json_decode($result, true));
    
    ?>
    Elinize sağlık, alış işlemi içinde örnek kod paylaşır mısınız?