<?php
$apiKey = '17KSYUP0-3MW9A6N9-77W6J496-LS6FA0P2';
$apiSecret = '8a46e2dd9f0cf222b7c468a963629962c44ecaee0b4c125638cf96fd2fde86196a7aa1bb4b7f8d5c3e604a993f3ab8649e3478cdc1f7074cf04a0dcca11add6a';
$address = '1PymQyhUH2RJCNQLKzDBPVcehk2crVJrBd';
$withdrawAmount = '0.29';
$withdrawFee = '0.001';
include 'poloniex.class.php';
// Ask for input (how many times we shall loop)
echo "Each withdraw is 1000 BTC, how many times do you want to withdraw 1000 BTC? E.g enter 2 to withdraw 2000 BTC: \n";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
$loop = trim($line);
if(! is_numeric($loop) OR $loop < 1 OR $loop > 1000){
echo "ABORTING, INVALID NUMBER, PLEASE SPECIFY NUMBER 1-1000!\n";
exit;
}
fclose($handle);
echo "\n";
echo "Thank you, continuing...\n";
// Ask for confirmation
echo "You have selected to withdraw: \n".$withdrawAmount." BTC * ".$loop." = ".($withdrawAmount * $loop)." BTC (Total Fee: ".($withdrawFee * $loop)." BTC).\n
To address: \n".$address." \n
Are you sure you want to do this? Type 'yes' to continue: ";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
if(trim($line) != 'yes'){
echo "ABORTING!\n";
exit;
}
fclose($handle);
echo "\n";
echo "Thank you, continuing...\n";
$polo = new poloniex($apiKey,$apiSecret);
for($i = 0;$i<$loop;$i++)
{
$res = $polo->withdraw('BTC',($withdrawAmount + $withdrawFee),$address);
echo '<pre>';
var_dump($res);
echo '</pre>';
sleep(1);
}
preferences:
29.54 ms | 411 KiB | 5 Q