Skip to content

Commit

Permalink
Fix any changes to start work with prototype production
Browse files Browse the repository at this point in the history
  • Loading branch information
kleninmaxim committed Apr 28, 2022
1 parent 516718c commit 0d9accf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 116 deletions.
112 changes: 0 additions & 112 deletions config/aeron_config.example.php
Original file line number Diff line number Diff line change
@@ -1,117 +1,5 @@
<?php

// Конфиг, который должен получать от конфигуратора
const CONFIG = [
'exchange' => 'kuna',
'exchanges' => ['kuna', 'huobi'],
'min_profit' => [
'BTC' => 0,
'ETH' => 0,
'USDT' => 0
],
'min_deal_amounts' => [
'BTC' => 0.001,
'ETH' => 0.01,
'USDT' => 20
],
'rates' => [
'BTC' => 46139,
'ETH' => 3471,
'USDT' => 1
],
'max_deal_amounts' => [
'BTC' => 0.01,
'ETH' => 0.1,
'USDT' => 200
],
'markets' => [
[
'exchange_symbol' => 'ETH-BTC',
'common_symbol' => 'ETH/BTC',
'price_increment' => 0.000001,
'amount_increment' => 0.0000001,
'limits' => [
'amount' => [
'min' => 0.0005,
'max' => 5000.0,
],
'price' => [
'min' => 1.0E-8,
'max' => 10.0,
],
'cost' => [
'min' => 0.0002,
'max' => 100.0,
]
],
'assets' => [
'base' => 'ETH',
'quote' => 'BTC',
]
],
[
'exchange_symbol' => 'BTC-USDT',
'common_symbol' => 'BTC/USDT',
'price_increment' => 0.1,
'amount_increment' => 0.00000001,
'limits' => [
'amount' => [
'min' => 2.0E-5,
'max' => 1000.0,
],
'price' => [
'min' => 0.01,
'max' => 150000.0,
],
'cost' => [
'min' => 1.0,
'max' => 500000.0,
],
],
'assets' => [
'base' => 'BTC',
'quote' => 'USDT',
]
],
[
'exchange_symbol' => 'ETH-USDT',
'common_symbol' => 'ETH/USDT',
'price_increment' => 0.01,
'amount_increment' => 0.0000001,
'limits' => [
'amount' => [
'min' => 0.0005,
'max' => 5000.0,
],
'price' => [
'min' => 0.01,
'max' => 100000.0,
],
'cost' => [
'min' => 1.0,
'max' => 500000.0
],
],
'assets' => [
'base' => 'ETH',
'quote' => 'USDT',
]
]
],
'routes' => [
[
['source_asset' => 'BTC', 'common_symbol' => 'ETH/BTC', 'operation' => 'buy'],
['source_asset' => 'ETH', 'common_symbol' => 'ETH/USDT', 'operation' => 'sell'],
['source_asset' => 'USDT', 'common_symbol' => 'BTC/USDT', 'operation' => 'buy'],
],
],
'max_depth' => 10,
'fees' => [
'kuna' => 0.1,
'huobi' => 0.1
],
];

// Название алгоритма
const ALGORITHM = 'cross_3t_php';

Expand Down
3 changes: 0 additions & 3 deletions kernel/cross_3t.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
$memcached = new Memcached();
$memcached->addServer('localhost', 11211);

// конфиг прописанный вручную
$config = CONFIG;

// API для формирования сообщения для отправки по aeron
$robotrade_api = new Api(EXCHANGE, ALGORITHM, NODE, INSTANCE);

Expand Down
2 changes: 1 addition & 1 deletion kernel/receive_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function handler_get_config(string $message): void
])
);

echo 'Try to send command get_full_config to Agent. Code: ' . $code . PHP_EOL;
echo '[ERROR] Try to send command get_full_config to Agent. Code: ' . $code . PHP_EOL;

} while($code > 0);

Expand Down

0 comments on commit 0d9accf

Please sign in to comment.