hyperliquid-dex / hyperliquid-python-sdk

SDK for Hyperliquid API trading with Python.
MIT License
238 stars 97 forks source link

Exception handling type issue #30

Closed Pack-Yak1 closed 6 months ago

Pack-Yak1 commented 6 months ago
  File "<venv_path>/lib/python3.10/site-packages/hyperliquid/info.py", line 226, in funding_history
    return self.post("/info", {"type": "fundingHistory", "coin": coin, "startTime": startTime})
  File "<venv_path>/lib/python3.10/site-packages/hyperliquid/api.py", line 37, in post
    self._handle_exception(response)
  File "<venv_path>/lib/python3.10/site-packages/hyperliquid/api.py", line 54, in _handle_exception
    if "data" in err:
TypeError: argument of type 'NoneType' is not iterable

Request was made with coin="ETH and startTime=1712665072000

traderben commented 6 months ago

This is likely a duplicate of https://github.com/hyperliquid-dex/hyperliquid-python-sdk/issues/28 if you were getting rate limited err would be none and the code shouldn't be checking for data inside of err