forked from evgenykon/btce-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.php
executable file
·58 lines (49 loc) · 1.32 KB
/
command.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Created by JetBrains PhpStorm.
* User: Effus
* Date: 01.12.13
* Time: 22:47
* To change this template use File | Settings | File Templates.
*/
include_once 'exceptions.php';
include_once 'lib.php';
include_once 'storage.php';
include_once 'coins.php';
include_once 'funds.php';
include_once 'pairs.php';
include_once 'helpers.php';
include_once 'logic.php';
if (count($argv)<2) {
log_msg('Usage: php command.php <config-file.json>',true);
}
try {
$logic = new Logic();
$startParams = array(
'baseCoin' => new Coin('btc'),
'min_fund_amount' => 0.012,
'expire_fund' => 60*10,
'expire_pairs' => 60,
'expire_pairs_life' => 60*2,
'diffs_sell' => array(
'btc_rur' => 15,
'btc_usd' => 1,
'btc_eur' => 2,
'ltc_btc' => 0.002,
),
'diffs_buy' => array(
'btc_rur' => 60,
'btc_usd' => 2,
'btc_eur' => 2,
'ltc_btc' => 0.002,
),
'capture_count' => array(
'sell' => 2,
'buy' => 6
),
);
$logic->init($startParams);
$logic->run();
} catch (Exception $e) {
log_msg('Connection failed: '.$e->getMessage(),true);
}