示例#1
0
<?php

/**
 * HAL10K - Bitcoin PHP Trading bot
 * 
 * After losing some money on Bitcoin exchanges, I decided to develop my own Trading bot/helper. 
 * This bot acts with pre-defined parameters based on statistics/strategies and not with the emotion of the moment, so it's much easier to perform trading operations.
 * 
* @package HAL10K
* @version 2.2
* @category bitcoin
* @author intrd - http://dann.com.br/
* @link https://github.com/intrd/bitcoin-hal10k
* @see http://dann.com.br/hal-10k-php-trading-helper-bot/
* @copyright 2013 intrd
* @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
*
*/
include "configs.php";
$time = date("i");
if ($_POST['hal'] == "meuovo123654") {
    setset("kill", '1');
} else {
    echo "#ERROR1&nbsp;";
}
if ($_POST['i'] == $time) {
    echo "SUDDEN DONE.";
    setset("sudden", '1');
} else {
    echo "#ERROR2";
}
示例#2
0
                        wfilew($lastfile, $transa["type"] . "," . $wallet_amount . "," . $transa["price"] . "," . $transa["datetime"] . "," . $transa["prem"] . ",{$log},\r\n");
                    }
                    $dt = date("Y-m-d H:i:s");
                    if ($fake == true and $paper == false) {
                        $dt = $ticker["datetime"];
                    }
                    $hora_new = date("i");
                    $pre = $transa["prem"];
                    $vol = $ticker["ticker_vol"];
                    $type = $transa["type"];
                    $line = $dt . ",," . $transa["price"] . ",{$type},{$pre},{$vol}," . $lastema["short"] . "," . $lastema["long"] . ",\r\n";
                    wfilew($datachart, $line);
                }
                if ($transa["sudden_mode"] == 1) {
                    $sudden_mode = 1;
                    setset("sudden", '1');
                    echo "\n*** #SUDDEN MODE stills..";
                } else {
                    $sudden_mode = 0;
                    setset("sudden", '0');
                }
            }
        }
    }
    if ($fake == false) {
        sleep($interval);
    }
    if ($paper == true) {
        sleep($interval);
    }
}