RoboTradeCode / gate-ftx

0 stars 0 forks source link

Гейт Ftx не отправляет ядру балансы, после того как ядро отослал команду. #7

Closed kleninmaxim closed 2 years ago

kleninmaxim commented 2 years ago

Gate на Ftx не может обработать сейчас данное сообщение:

{
  "event": "command",
  "exchange": "ftx",
  "node": "core",
  "instance": "1",
  "action": "get_balances",
  "message": "",
  "algo": "cross_3t_php",
  "timestamp": 1651847847121119,
  "data": {
    "assets": [
      "ETH",
      "BTC",
      "USDT"
    ]
  }
}

Вот что выводит ftxGateway в консоли:

May 06 17:37:27 ip-172-31-22-205 ftxGateway[29846]: [2022-05-06 17:37:27.121] [general] [info] ***************************************
May 06 17:37:27 ip-172-31-22-205 ftxGateway[29846]: [2022-05-06 17:37:27.121] [general] [info] (message from core): {"event":"command","exchange":"ftx","node":"core","instance": "1","action":"get_balances","message":"","algo":"cross_3t_php","timestamp":1651847847121119,"data":{"assets":["ETH","BTC","USDT"]}}
May 06 17:37:27 ip-172-31-22-205 ftxGateway[29846]: [2022-05-06 17:37:27.121] [general] [info] ***************************************
May 06 17:37:27 ip-172-31-22-205 ftxGateway[29846]: [2022-05-06 17:37:27.121] [general] [error] Не могу получить массив данных data {"event":"command","exchange":"ftx","node":"core","instance": "1","action":"get_balances","message":"","algo":"cross_3t_php","timestamp":1651847847121119,"data":{"assets":["ETH","BTC","USDT"]}}.

Соответственно нужно чтобы гейт умел обрабатывать и такое сообщение, когда data пустое при команде на получение баланса:

{
  "event": "command",
  "exchange": "ftx",
  "node": "core",
  "instance": "1",
  "action": "get_balances",
  "message": "",
  "algo": "cross_3t_php",
  "timestamp": 1651847847121119,
  "data": ""
}
ckatpskov commented 2 years ago

Исправил.