Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTX close WebSocket connection with status code 1006 (CCXT Pro) #14557

Closed
Kinzowa opened this issue Aug 1, 2022 · 10 comments
Closed

FTX close WebSocket connection with status code 1006 (CCXT Pro) #14557

Kinzowa opened this issue Aug 1, 2022 · 10 comments
Assignees

Comments

@Kinzowa
Copy link

Kinzowa commented Aug 1, 2022

Hello,

I received abnormal disconnection events from FTX while using CCXT Pro, error code 1006 followed by error 1001. Please find below the traceback. It seems like a very similar issue than #14086 which I encountered recently when using Binance. The workaround that still work today was to ping api.binance.com evey 5 seconds, but unfortunnatly the same hack does not have effect with FTX. I tried to perform periodic REST API calls but unfortunnatly the 1006 error still happens.

Could you elaborate on how the ping pong mechanism is implemented in CCTX Pro and what is the value of the timer ? Maybe a reduction of this timer would improve the stability of the connection.

Thank you,

Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
-- Logs begin at Fri 2022-07-15 08:53:10 UTC, end at Mon 2022-08-01 08:45:41 UTC. --
Jul 31 12:28:32.744196 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Bad Request: http://example.com/
Jul 31 12:28:32.744636 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Bad Request: http://example.com/
Jul 31 12:28:32.745153 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: INFO:     2.57.122.209:39724 - "GET http%3A//example.com/ HTTP/1.1" 400 Bad Request
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: WARNING:  Invalid HTTP request received.
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Traceback (most recent call last):
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self.conn.next_event()
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 485, in next_event
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     exc._reraise_as_remote_protocol_error()
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise self
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 467, in next_event
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._extract_next_receive_event()
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._reader(self._receive_buffer)
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_readers.py", line 81, in maybe_read_from_IDLE_client
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise LocalProtocolError("illegal request line")
Jul 31 15:05:26.571294 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: h11._util.RemoteProtocolError: illegal request line
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Invalid HTTP request received.             
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Traceback (most recent call last):
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self.conn.next_event()
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 485, in next_event
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     exc._reraise_as_remote_protocol_error()
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise self
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 467, in next_event
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._extract_next_receive_event()
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._reader(self._receive_buffer)
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_readers.py", line 81, in maybe_read_from_IDLE_client
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise LocalProtocolError("illegal request line")
Jul 31 15:05:26.575159 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: h11._util.RemoteProtocolError: illegal request line
Jul 31 15:18:29.284663 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code 1006       [trading.methods] method=watch_ticker task=76c worker=5
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 71, in method_loop
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)(**args)
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 111, in watch_ticker
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch_public(symbol, 'ticker')
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 64, in watch_public
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, messageHash)
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: 1006
Jul 31 15:18:29.312579 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 15:34:51.904863 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Stopped target Main User Target.
Jul 31 15:34:51.904879 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Stopped target Basic System.
Jul 31 15:34:51.904888 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Stopped target Paths.
Jul 31 15:34:51.904896 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Stopped target Sockets.
Jul 31 15:34:51.904906 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Stopped target Timers.
Jul 31 15:34:51.904995 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: dbus.socket: Succeeded.
Jul 31 15:34:51.905560 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed D-Bus User Message Bus Socket.
Jul 31 15:34:51.905595 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: dirmngr.socket: Succeeded.
Jul 31 15:34:51.905645 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed GnuPG network certificate management daemon.
Jul 31 15:34:51.905670 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: gpg-agent-browser.socket: Succeeded.
Jul 31 15:34:51.905717 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jul 31 15:34:51.905759 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: gpg-agent-extra.socket: Succeeded.
Jul 31 15:34:51.905813 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Jul 31 15:34:51.905841 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: gpg-agent-ssh.socket: Succeeded.
Jul 31 15:34:51.905888 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Jul 31 15:34:51.905916 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: gpg-agent.socket: Succeeded.
Jul 31 15:34:51.905958 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed GnuPG cryptographic agent and passphrase cache.
Jul 31 15:34:51.905979 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: pk-debconf-helper.socket: Succeeded.
Jul 31 15:34:51.906016 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed debconf communication socket.
Jul 31 15:34:51.906036 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: snapd.session-agent.socket: Succeeded.
Jul 31 15:34:51.906072 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Closed REST API socket for snapd user session agent.
Jul 31 15:34:51.906083 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Reached target Shutdown.
Jul 31 15:34:51.906133 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: systemd-exit.service: Succeeded.
Jul 31 15:34:51.906163 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Finished Exit the Session.
Jul 31 15:34:51.906174 ubuntu-1cpu-2gb-pl-waw1 systemd[307421]: Reached target Exit the Session.
Jul 31 15:41:08.896061 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code Connection closed by remote server, closing code 1001 [trading.methods] method=watchMyTrades task=76c worker=5
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 56, in method_loop
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)()
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 449, in watch_my_trades
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     trades = await self.watch_private('fills', symbol)
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 78, in watch_private
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, channel)
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: Connection closed by remote server, closing code 1001
Jul 31 15:41:08.898394 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: WARNING:  Invalid HTTP request received.
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Traceback (most recent call last):
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self.conn.next_event()
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 485, in next_event
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     exc._reraise_as_remote_protocol_error()
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise self
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 467, in next_event
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._extract_next_receive_event()
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._reader(self._receive_buffer)
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_readers.py", line 81, in maybe_read_from_IDLE_client
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise LocalProtocolError("illegal request line")
Jul 31 17:11:01.958298 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: h11._util.RemoteProtocolError: illegal request line
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Invalid HTTP request received.             
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Traceback (most recent call last):
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self.conn.next_event()
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 485, in next_event
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     exc._reraise_as_remote_protocol_error()
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_util.py", line 77, in _reraise_as_remote_protocol_error
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise self
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 467, in next_event
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._extract_next_receive_event()
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_connection.py", line 409, in _extract_next_receive_event
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     event = self._reader(self._receive_buffer)
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:   File "/home/myuser/env/lib/python3.8/site-packages/h11/_readers.py", line 81, in maybe_read_from_IDLE_client
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]:     raise LocalProtocolError("illegal request line")
Jul 31 17:11:01.962569 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: h11._util.RemoteProtocolError: illegal request line
Jul 31 17:38:47.506035 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code 1006       [trading.methods] method=watchOrders task=76c worker=5
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 56, in method_loop
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)()
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 373, in watch_orders
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     orders = await self.watch_private('orders', symbol)
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 78, in watch_private
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, channel)
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: 1006
Jul 31 17:38:47.511137 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 17:46:24.560874 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code Connection closed by remote server, closing code 1001 [trading.methods] method=watchOrders task=76c worker=5
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 56, in method_loop
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)()
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 373, in watch_orders
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     orders = await self.watch_private('orders', symbol)
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 78, in watch_private
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, channel)
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: Connection closed by remote server, closing code 1001
Jul 31 17:46:24.563119 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 18:05:23.054154 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code 1006       [trading.methods] method=watch_ticker task=76c worker=5
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 71, in method_loop
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)(**args)
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 111, in watch_ticker
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch_public(symbol, 'ticker')
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 64, in watch_public
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, messageHash)
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: 1006
Jul 31 18:05:23.059278 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 18:15:09.822529 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] WebSocket close with status code Connection closed by remote server, closing code 1001 [trading.methods] method=watchMyTrades task=76c worker=5
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: [error    ] Traceback (most recent call last):
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/var/www/bot/trading/methods.py", line 56, in method_loop
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     response = await getattr(client, method)()
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 449, in watch_my_trades
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     trades = await self.watch_private('fills', symbol)
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:   File "/home/myuser/env/lib/python3.8/site-packages/ccxtpro/ftx.py", line 78, in watch_private
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:     return await self.watch(url, messageHash, request, channel)
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]: ccxt.base.errors.NetworkError: Connection closed by remote server, closing code 1001
Jul 31 18:15:09.824258 ubuntu-1cpu-2gb-pl-waw1 celery[308783]:  [trading.methods] task=76c worker=5
Jul 31 18:35:25.718635 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Invalid HTTP_HOST header: 'example.com'. You may need to add 'example.com' to ALLOWED_HOSTS.
Jul 31 18:35:25.721465 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Invalid HTTP_HOST header: 'example.com'. You may need to add 'example.com' to ALLOWED_HOSTS.
Jul 31 18:35:25.741688 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Bad Request: http://example.com/
Jul 31 18:35:25.742039 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: Bad Request: http://example.com/
Jul 31 18:35:25.742469 ubuntu-1cpu-2gb-pl-waw1 uvicorn[308764]: INFO:     45.148.10.81:34626 - "GET http%3A//example.com/ HTTP/1.1" 400 Bad Request
@carlosmiei carlosmiei self-assigned this Aug 1, 2022
@carlosmiei
Copy link
Collaborator

Hello @Kinzowa

We're following the specs described in their docs (https://docs.ftx.com/#websocket-api) regarding ping-pong messages, so every 15 seconds we send a ping JSON message with this format: { 'op': 'ping' };

You can always tweak this interval by doing this:

exchange.streaming['keepAlive'] = 10000 # changing it from 15s to 10s

@Kinzowa
Copy link
Author

Kinzowa commented Aug 1, 2022

Hi Carlos, thanks for your answer I will try this.

@Kinzowa
Copy link
Author

Kinzowa commented Aug 9, 2022

Hello @Kinzowa

We're following the specs described in their docs (https://docs.ftx.com/#websocket-api) regarding ping-pong messages, so every 15 seconds we send a ping JSON message with this format: { 'op': 'ping' };

You can always tweak this interval by doing this:

exchange.streaming['keepAlive'] = 10000 # changing it from 15s to 10s

Hi Carlos, I did several test with the FTX client in order to solve the 1006 disconnections, but without success. I modified the keepAlive and also the maxPingPongMisses, verbose enabled so I could see what was going on. It doesn't seems related with the ping pong mechanism because when I lower the keepAlive there is still a new disconnection that occurs before the next ping.

I notice that the 1006 error is generated by the library, could you please elaborate on which conditions ? It's not clear for me if it's because it receives a disconnnect from the exchange or if it's at CCXT sole initiative. I read the client.py and fast_client.py but couldn't figure it out. Thank you

@Kinzowa
Copy link
Author

Kinzowa commented Aug 12, 2022

Could you support please or point me to the right direction @carlosmiei ? Actually I can't use the Pro version of the library with FTX. I contacted their support and they replied to see with CCXT teams. Thanks

@carlosmiei
Copy link
Collaborator

@Kinzowa you can't use it at all, or fails intermittently?

@Kinzowa
Copy link
Author

Kinzowa commented Aug 14, 2022

@Kinzowa you can't use it at all, or fails intermittently?

Hi Carlos, it fails intermittently several times a day. That's a real issue because if I detect the disconnection and restart the worker, I will miss trade events and order events at some point and it will create inconsistencies in the database. Restarting the worker take 10 seconds for one account, but if there are tens of accounts it will take even more.

That's the reason why I would like to investigate this issue a bit more. Could you please check under what conditions CCXT Pro initiates this failure ?

@carlosmiei
Copy link
Collaborator

@Kinzowa How many streams are you listening? Using a few of them, I don't have any issues

@Kinzowa
Copy link
Author

Kinzowa commented Aug 16, 2022

@Kinzowa How many streams are you listening? Using a few of them, I don't have any issues

I use 4 streams in total with FTX. 2 of them are public and 2 are private (same account). Wondering if it could be related to the infrastructure. My hosting sevice is not AWS.

Please find below the code that I use to initialize the exchange instance and open the streams. It's very common coroutines structure.


def ws_loops():

    async def method_loop(client, exid, tp, method, private, args):

        if private:
            log.info('Method -> {2} {1} ({0})'.format(method, 'account_2', exid))
        else:
            symbol = args['symbol']
            log.info('Method -> {3} {1} {2} ({0})'.format(method, symbol, tp, exid))

        while True:

            try:

                if private:

                    response = await getattr(client, method)()

                    try:
                        if method == 'watchMyTrades':
                            log.info(response)

                        elif method == 'watchOrders':
                            log.info(response)

                    except Exception as e:
                        log.error(traceback.format_exc())
                        log.error(str(e), exid=exid, tp=tp, method=method)

                else:
                    response = await getattr(client, method)(**args)
                    if method == 'watch_ticker':
                        log.info('{0} {1}'.format(response['symbol'], response['close']))

                if not private:
                    await asyncio.sleep(2)

            except ccxt.NetworkError as e:
                log.error('********************************')
                log.error('WebSocket close with status code {0}'.format(str(e)), method=method)
                log.error(traceback.format_exc())
                break

        await client.close()

    async def clients_loop(loop, dic):

        exid, tp, method, private, args = dic.values()
        client = ccxtpro.ftx()

        if private:
            client.secret = SECRET
            client.apiKey = API_KEY

        client.enableRateLimit = True
        client.asyncio_loop = loop
        client.newUpdates = True

        await asyncio.gather(method_loop(client, 'ftx', tp, method, private, args))
        await client.close()

    async def main(loop):

        lst = []
        markets = PARAMS['supported_markets']

        for tupl in markets:

            exid, symbol, tp = tupl

            for method in PARAMS['ws_private_methods']:

                item = dict(exid=exid,
                            tp=tp,
                            method=method,
                            private=True,
                            args=dict(account='ftx')
                            )

                # Avoid inserting the same method twice for an account
                items_private = [i for i in lst if 'account' in i['args']]
                items_account = [i for i in items_private if i['args']['account'] == 'ftx']
                if method not in [i['method'] for i in items_account]:
                    lst.append(item)

            for method in PARAMS['ws_public_methods']:
                lst.append(dict(exid=exid,
                                tp=tp,
                                method=method,
                                private=False,
                                args=dict(symbol=symbol)
                                ))

        loops = [clients_loop(loop, dic) for dic in lst]

        try:
            await asyncio.gather(*loops)

        except Exception as e:
            log.error(traceback.format_exc())
            log.error(str(e))
        else:
            pass

    loop = asyncio.new_event_loop()
    loop.run_until_complete(main(loop))

This the PARAMS variable

PARAMS = {
    'supported_markets': [('ftx', 'BTC/USD', 'spot'),
                          ('ftx', 'BTC/USD:USD', 'perpetual')],
    'ws_public_methods': ['watch_ticker'],
    'ws_private_methods': ['watchMyTrades', 'watchOrders']
}

@Kinzowa
Copy link
Author

Kinzowa commented Aug 17, 2022

Hi @carlosmiei I did the test with another server located in Germany (instead of Poland, but the provider is the same) and it also fails with 1006 disconnection after less than 3 hours.

Aug 17 15:11:29 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23388.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:31 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23387.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:32 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23387.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:33 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23388.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:34 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23387.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:35 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23388.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:37 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23396.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:39 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23399.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:41 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23399.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] ********************************            [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] WebSocket close with status code 1006       [strategy.tasks] method=watch_ticker task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] Traceback (most recent call last):
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/var/www/myapp/strategy/tasks.py", line 96, in method_loop
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     response = await getattr(client, method)(**args)
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 112, in watch_ticker
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch_public(symbol, 'ticker')
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 65, in watch_public
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch(url, messageHash, request, messageHash)
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]: ccxt.base.errors.NetworkError: 1006
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]:  [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:43 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23399.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:45 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23399.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:47 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23400.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:49 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23399.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:51 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23406.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:53 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23410.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:55 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23410.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:11:58 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23406.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 15:12:00 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23396.0              

As you can see, a few minutes later the remaining watch_ticker stream get disconnected too.

Aug 17 16:26:36 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:38 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:40 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:42 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23380.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:44 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23377.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:46 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23375.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:48 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23375.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:50 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23375.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:52 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23374.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:55 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23374.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:57 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23374.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:26:59 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23375.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:27:01 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23375.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] ********************************            [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] WebSocket close with status code 1006       [strategy.tasks] method=watch_ticker task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] Traceback (most recent call last):
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/var/www/myapp/strategy/tasks.py", line 96, in method_loop
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     response = await getattr(client, method)(**args)
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 112, in watch_ticker
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch_public(symbol, 'ticker')
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 65, in watch_public
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch(url, messageHash, request, messageHash)
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]: ccxt.base.errors.NetworkError: 1006
Aug 17 16:27:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]:  [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0

Here you can see the 4 streams that were initiated.

Aug 17 18:07:04 ubuntu-2cpu-4gb-de-fra1 celery[72870]: [info     ] Establish ws streams with PID 0             [strategy.tasks] task=5cc task_id=5ccb8bc2-0c54-44e6-b8b4-5099ed2719b2 worker=0
Aug 17 18:07:04 ubuntu-2cpu-4gb-de-fra1 celery[72870]: [info     ] Method -> ftx account_2 (watchMyTrades)     [strategy.tasks] task=5cc task_id=5ccb8bc2-0c54-44e6-b8b4-5099ed2719b2 worker=0
Aug 17 18:07:04 ubuntu-2cpu-4gb-de-fra1 celery[72870]: [info     ] Method -> ftx account_2 (watchOrders)       [strategy.tasks] task=5cc task_id=5ccb8bc2-0c54-44e6-b8b4-5099ed2719b2 worker=0
Aug 17 18:07:04 ubuntu-2cpu-4gb-de-fra1 celery[72870]: [info     ] Method -> ftx BTC/USD spot (watch_ticker)   [strategy.tasks] task=5cc task_id=5ccb8bc2-0c54-44e6-b8b4-5099ed2719b2 worker=0
Aug 17 18:07:04 ubuntu-2cpu-4gb-de-fra1 celery[72870]: [info     ] Method -> ftx BTC/USD:USD perpetual (watch_ticker) [strategy.tasks] task=5cc task_id=5ccb8bc2-0c54-44e6-b8b4-5099ed2719b2 worker=0

@Kinzowa
Copy link
Author

Kinzowa commented Aug 17, 2022

I just saw that methods watch_my_trades and watch_orders got disconnected before. At 2pm and then 2.39pm.

Aug 17 14:02:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23380.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:02:58 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23389.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:02:58 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23390.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:00 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23391.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:00 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23392.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23398.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] ********************************            [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] WebSocket close with status code 1006       [strategy.tasks] method=watchMyTrades task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] Traceback (most recent call last):
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/var/www/myapp/strategy/tasks.py", line 82, in method_loop
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     response = await getattr(client, method)()
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 466, in watch_my_trades
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     trades = await self.watch_private('fills', symbol)
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 79, in watch_private
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch(url, messageHash, request, channel)
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: ccxt.base.errors.NetworkError: 1006
Aug 17 14:03:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]:  [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:03 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23395.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:04 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23397.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:05 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23399.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:06 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23403.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:07 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23404.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:08 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23405.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:09 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23404.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:10 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23405.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:11 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23405.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:03:12 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23408.0

Aug 17 14:39:51 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23379.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:52 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23379.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:53 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23379.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:54 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23379.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:55 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23380.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] ********************************            [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] WebSocket close with status code 1006       [strategy.tasks] method=watchOrders task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [error    ] Traceback (most recent call last):
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/var/www/myapp/strategy/tasks.py", line 82, in method_loop
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     response = await getattr(client, method)()
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 390, in watch_orders
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     orders = await self.watch_private('orders', symbol)
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:   File "/home/user/.local/lib/python3.7/site-packages/ccxtpro/ftx.py", line 79, in watch_private
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:     return await self.watch(url, messageHash, request, channel)
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]: ccxt.base.errors.NetworkError: 1006
Aug 17 14:39:56 ubuntu-2cpu-4gb-de-fra1 celery[60415]:  [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:57 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23379.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:58 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:39:59 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23380.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:40:00 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0                             [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:40:01 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD:USD 23380.0                         [strategy.tasks] task=38b task_id=38b199c6-99b7-4502-a9a9-fcd74af06a8e worker=0
Aug 17 14:40:02 ubuntu-2cpu-4gb-de-fra1 celery[60415]: [info     ] BTC/USD 23381.0 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants