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

Bot start on FTX futures exchange -> problem generating trade report #799

Closed
gaugau3000 opened this issue Oct 3, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@gaugau3000
Copy link
Contributor

Bug Report

Expected Behavior

No error message

Actual Behavior

2022-10-03T18:11:03.588702885Z [INF] TESTER-001.ExecClient-FTX: Generating ExecutionMassStatus for FTX...
2022-10-03T18:11:03.588765194Z [INF] TESTER-001.ExecClient-FTX: Generating OrderStatusReports for FTX...
2022-10-03T18:11:03.589053835Z [INF] TESTER-001.ExecClient-FTX: Generating TradeReports for FTX...
2022-10-03T18:11:03.589282894Z [INF] TESTER-001.ExecClient-FTX: Generating PositionStatusReports for FTX...
2022-10-03T18:11:03.939116645Z [INF] TESTER-001.ExecClient-FTX: Generated 0 TradeReports.
2022-10-03T18:11:03.974565033Z [ERR] TESTER-001.ExecClient-FTX: Cannot generate position status report: no instrument found for CEL-PERP.FTX.
2022-10-03T18:11:03.974612471Z [ERR] TESTER-001.ExecClient-FTX: Cannot generate position status report: no instrument found for ALT-PERP.FTX.
2022-10-03T18:11:03.974613741Z [INF] TESTER-001.ExecClient-FTX: Generated 0 PositionStatusReports.
2022-10-03T18:11:04.764067482Z [ERR] TESTER-001.ExecClient-FTX: Cannot generate trade report: 
FTXClientError()
Traceback (most recent call last):
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/http/client.py", line 138, in _send_request
    resp: ClientResponse = await self.request(
  File "nautilus_trader/network/http.pyx", line 173, in request
  File "nautilus_trader/network/http.pyx", line 180, in nautilus_trader.network.http.HttpClient.request
  File "/usr/local/pip-global/aiohttp/client_reqrep.py", line 1005, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url=URL('https://ftx.com/api/conditional_orders/174803174/triggers')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/execution.py", line 397, in _get_trigger_order_status_reports
    trigger_reports = await asyncio.gather(
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/http/client.py", line 287, in get_trigger_order_triggers
    return await self._sign_request(
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/http/client.py", line 116, in _sign_request
    return await self._send_request(
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/http/client.py", line 145, in _send_request
    await self._handle_exception(e)
  File "/usr/local/pip-global/nautilus_trader/adapters/ftx/http/client.py", line 160, in _handle_exception
    raise FTXClientError(

This error message don't stop the bot.

Steps to Reproduce the Problem

  1. Run an instance on the bot on FTX futures

Specifications

  • OS platform: Linux
  • Python version: 3.9.14
  • nautilus_trader version: 1.155.0
@gaugau3000 gaugau3000 added the bug Something isn't working label Oct 3, 2022
@cjdsellers
Copy link
Member

I'm not sure halting the trading node on a 429 should be the default behavior? at least it should be configurable I think

The lack of rate limiting for HTTP requests is becoming a running theme for issues though #780

Which brings this higher up on the list of priorities #547

Ideally requests will be throttled with a timeout for what an acceptable delay is?

@cjdsellers cjdsellers self-assigned this Oct 3, 2022
@cjdsellers cjdsellers changed the title Bot start on FTX futures exchange -> problem generate trade report Bot start on FTX futures exchange -> problem generating trade report Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants