Postingan lainnya
membuat script withdrawal menggunakan PHP
Assalamu'alaikum wr. wb.
saya pemula, ingin membuat script withdrawal asset dari indodax ke wallet tertentu. contoh scriptnya sudah tersedia di dokumentasi API indodax
saya sudah menyalin scriptnya dan menambahkan api key dan secret key yang diberikan indodax api.
berikut penampakan code phpnya:
<?php
$url = 'https://indodax.com/tapi';
// Please find Key from trade API Indodax exchange
$key = '****';
// Please find Secret Key from trade API Indodax exchange
$secretKey = '****';
$data = [
'method' => 'withdrawCoin',
'timestamp' => '1578304294000',
'recvWindow' => '1578303937000',
'currency' => 'doge',
'withdraw_address' => 'D9iCdBLBosJzGSvpQGMSobwtdgB2rS1zam',
'withdraw_amount' => '10',
'withdraw_memo' => 'memo',
'request_id' => 'trx002'
];
$post_data = http_build_query($data, '', '&');
$sign = hash_hmac('sha512', $post_data, $secretKey);
$headers = ['Key:'.$key,'Sign:'.$sign];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_HTTPHEADER => $headers,
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $data,
CURLOPT_RETURNTRANSFER => true
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
setelah saya eksekusi muncul error
"{"success":0,"error":"did not pass callback check","request_error":"","callback_response":"error code: 1020"} "
dokumentasi withdraw coin disini:
contoh script disini:
mohon dibantu, error macam apa itu? bagaimana cara memperbaikinya.
Terima kasih
0
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban