We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Bitmex Trade subscription is crashing with a weird error in the library
To Reproduce Steps to reproduce the behavior:
f = FeedHandler() f.add_feed(Bitmex(symbols=['BTC-USD-PERP'], channels=[TRADES], callbacks={TRADES: bitmex_trade}))
Expected behavior
Screenshots
File "/home/ubuntu/xxxxxx/venv/lib/python3.11/site-packages/cryptofeed/exchanges/bitmex.py", line 61, in _parse_symbol_data 3|Websocket Price trigger | s = Symbol(base, quote, type=stype, expiry_date=entry['expiry']) 3|Websocket Price trigger | ~~~~~^^^^^^^^^^ KeyError: 'expiry'
Operating System:
Cryptofeed Version
The text was updated successfully, but these errors were encountered:
I tried creating a PR for this fix but unfortunately I don't have the correct permissions. This is the required change in bitmex.py:
if entry['typ'] == 'FFWCSX': stype = PERPETUAL expiry = None elif entry['typ'] == 'FFCCSX': stype = FUTURES expiry = entry['expiry'] elif entry['typ'] == 'IFXXXP': stype = SPOT expiry = None else: LOG.info('Unsupported type %s for instrument %s', entry['typ'], entry['symbol']) s = Symbol(base, quote, type=stype, expiry_date=expiry)
As BitMEX no longer sends values in the instrument feed if they are null.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Bitmex Trade subscription is crashing with a weird error in the library
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Operating System:
Cryptofeed Version
The text was updated successfully, but these errors were encountered: