RoboTradeCode / flash-gate

Торговый шлюз для биржы Exmo
0 stars 1 forks source link

Отсылает ли kuna ордера и балансы по aeron udp? #26

Closed kleninmaxim closed 2 years ago

kleninmaxim commented 2 years ago

Настройки гейта в конфигураторе:

  "aeron": {
    "publishers": {
      "orderbooks": {
        "channel": "aeron:udp?control=172.31.8.55:40456|control-mode=dynamic",
        "stream_id": 1006
      },
      "balances": {
        "channel": "aeron:udp?control=172.31.8.55:40456|control-mode=dynamic",
        "stream_id": 1005
      },
      "orders_statuses": {
        "channel": "aeron:udp?control=172.31.8.55:40456|control-mode=dynamic",
        "stream_id": 1007
      },
      "logs": {
        "channel": "aeron:udp?endpoint=3.66.183.55:44444",
        "stream_id": 1008
      }
    },
    "subscribers": {
      "core": {
        "channel": "aeron:udp?endpoint=172.31.8.55:40446|control=18.157.245.211:40446",
        "stream_id": 1004
      }
    }
  }

Настройки ядра:

[
    'publishers' => [
        'gate' => [
            'channel' => 'aeron:udp?control=172.31.12.44:40447|control-mode=dynamic',
            'stream_id' => 1004
        ],
        'log' => [
            'channel' => 'aeron:udp?endpoint=3.66.183.27:44444',
            'stream_id' => 1008
        ],
    ],
    'subscribers' => [
        'balance' => [
            'channel' => 'aeron:udp?control-mode=manual',
            'destinations' => [
                'aeron:udp?endpoint=172.31.12.44:40478|control=18.197.169.86:40456', //kuna
            ],
            'stream_id' => 1005
        ],
        'orderbooks' => [
            'channel' => 'aeron:udp?control-mode=manual',
            'destinations' => [
                'aeron:udp?endpoint=172.31.12.44:40479|control=18.197.169.86:40456', //kuna
            ],
            'stream_id' => 1006
        ],
        'orders' => [
            'channel' => 'aeron:udp?control-mode=manual',
            'destinations' => [
                'aeron:udp?endpoint=172.31.12.44:40480|control=18.197.169.86:40456', //kuna
            ],
            'stream_id' => 1007
        ]
    ]
]

Ядро подключается к гейту и может отправлять команды, но я не знаю выполняются они или нет. В гейте вижу только одно сообщение:

Jun 23 14:28:19 ip-172-31-8-55 pipenv[23989]: 2022-06-23 14:28:19,637 - root - INFO - Received orders from exchange: []
Jun 23 14:28:19 ip-172-31-8-55 pipenv[23989]: 2022-06-23 14:28:19,637 - root - INFO - Received orders from exchange: []
Jun 23 14:28:19 ip-172-31-8-55 pipenv[23989]: 2022-06-23 14:28:19,638 - root - INFO - Received orders from exchange: []

В ядре я не могу никак получить данные по ордербукам и балансам с гейтов.

nomnoms12 commented 2 years ago

Проблема связана с конфигурацией. В данный момент возвращается пустой массив markets:

{
    "exchange":"kuna",
    "node":"configurator",
    "instance":"1",
    "algo":"multi_3t_php",
    "event":"config",
    "action":"test",
    "message":"",
    "timestamp":1656015247064082,
    "data":{
        "markets":[],
        "assets_labels":[
            {
                "exchange":"ETH",
                "common":"ETH"
            },
            {
                "exchange":"BTC",
                "common":"BTC"
            },
            {
                "exchange":"BTC",
                "common":"BTC"
            },
            {
                "exchange":"USDT",
                "common":"USDT"
            },
            {
                "exchange":"ETH",
                "common":"ETH"
            }
        ],
        "routes":[],
        "configs":{
            "core_config":{
                "cross_3t_php":{
                    "exchange":"kuna",
                    "exchanges":[
                        "kuna",
                        "ascendex"
                    ],
                    "expired_orderbook_time":500000,
                    "min_profit":{
                        "BTC":0,
                        "ETH":0,
                        "USDT":0
                    },
                    "min_deal_amounts":{
                        "BTC":0,
                        "ETH":0,
                        "USDT":0
                    },
                    "rates":{
                        "BTC":30000,
                        "ETH":2000,
                        "USDT":1
                    },
                    "max_deal_amounts":{
                        "BTC":0.01,
                        "ETH":0.1,
                        "USDT":200
                    },
                    "max_depth":5,
                    "fees":{
                        "kuna":0.25,
                        "ascendex":0.2
                    }
                },
                "aeron":{
                    "publishers":{
                        "gate":{
                            "channel":"aeron:ipc",
                            "stream_id":1004
                        },
                        "log":{
                            "channel":"aeron:udp?endpoint=3.66.183.27:44444",
                            "stream_id":1008
                        }
                    },
                    "subscribers":{
                        "balance":{
                            "channel":"aeron:udp?control-mode=manual",
                            "destinations":[
                                "aeron:udp?endpoint=172.31.5.58:40457|control=3.69.53.241:40456",
                                "aeron:udp?endpoint=172.31.5.58:40460|control=3.69.43.98:40456"
                            ],
                            "stream_id":1005
                        },
                        "orderbooks":{
                            "channel":"aeron:udp?control-mode=manual",
                            "destinations":[
                                "aeron:udp?endpoint=172.31.5.58:40458|control=3.69.53.241:40456",
                                "aeron:udp?endpoint=172.31.5.58:40461|control=3.69.43.98:40456"
                            ],
                            "stream_id":1006
                        },
                        "orders":{
                            "channel":"aeron:udp?control-mode=manual",
                            "destinations":[
                                "aeron:udp?endpoint=172.31.5.58:40459|control=3.69.53.241:40456",
                                "aeron:udp?endpoint=172.31.5.58:40462|control=3.69.43.98:40456"
                            ],
                            "stream_id":1007
                        }
                    }
                }
            },
            "gate_config":{
                "info":{
                    "exchange":"kuna",
                    "instance":1,
                    "node":"gate",
                    "depth":10,
                    "ping_delay":1
                },
                "account":{
                    "api_key":"hNvghKfuZvZJftJY1fQskQ1t1wYyx2BxoblhBtXi",
                    "secret_key":"tzSP6gSIlSz3IwbKN2UroLCDtyhMSxJQwU3swPJB"
                },
                "aeron":{
                    "publishers":{
                        "orderbooks":{
                            "channel":"aeron:ipc",
                            "stream_id":1006
                        },
                        "balances":{
                            "channel":"aeron:ipc",
                            "stream_id":1005
                        },
                        "orders_statuses":{
                            "channel":"aeron:ipc",
                            "stream_id":1007
                        },
                        "logs":{
                            "channel":"aeron:ipc",
                            "stream_id":1008
                        }
                    },
                    "subscribers":{
                        "core":{
                            "channel":"aeron:ipc",
                            "stream_id":1004
                        }
                    }
                }
            }
        }
    }
}
nomnoms12 commented 2 years ago

Описал проблему в https://github.com/RoboTradeCode/configurator/issues/42