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

error on start #8

Open
nateflanders opened this issue Aug 17, 2019 · 0 comments
Open

error on start #8

nateflanders opened this issue Aug 17, 2019 · 0 comments

Comments

@nateflanders
Copy link

authenticates and gets market data fine, then when it gets to resetting current position, it throws the following:

`python marketmaker
2019-08-16 23:26:22,494 - INFO - market_maker - BitMEX Market Maker Version: 1.0

2019-08-16 23:26:22,495 - INFO - ws_thread - Connecting to wss://www.bitmex.com/realtime?subscribe=quote:XBTUSD,trade:XBTUSD,orderBookL2_25:XBTUSD,instrument,order:XBTUSD,execution:XBTUSD,margin,position
2019-08-16 23:26:22,495 - INFO - ws_thread - Authenticating with API Key.
2019-08-16 23:26:22,495 - INFO - ws_thread - Started thread
2019-08-16 23:26:23,497 - INFO - ws_thread - Connected to WS. Waiting for data images, this may take a moment...
2019-08-16 23:26:25,447 - INFO - ws_thread - Got all market data. Starting.
2019-08-16 23:26:25,448 - INFO - market_maker - Using symbol XBTUSD.
2019-08-16 23:26:25,448 - INFO - market_maker - Order Manager initializing, connecting to BitMEX. Live run: executing real trades.
2019-08-16 23:26:25,448 - INFO - market_maker - Resetting current position. Cancelling all existing orders.
Traceback (most recent call last):
File "marketmaker", line 3, in
market_maker.run()
File "/home/toor/market-maker/market_maker/market_maker.py", line 589, in run
om.init()
File "/home/toor/market-maker/market_maker/market_maker.py", line 219, in init
self.reset()
File "/home/toor/market-maker/market_maker/market_maker.py", line 223, in reset
self.sanity_check()
File "/home/toor/market-maker/market_maker/market_maker.py", line 498, in sanity_check
ticker = self.get_ticker()
File "/home/toor/market-maker/market_maker/market_maker.py", line 252, in get_ticker
order_book = sorted(self.exchange.market_depth(), key=itemgetter('level'))
KeyError: 'level'
2019-08-16 23:26:27,225 - INFO - market_maker - Shutting down. All open orders will be cancelled.
2019-08-16 23:26:27,225 - INFO - market_maker - Resetting current position. Cancelling all existing orders.
close status: 31522
2019-08-16 23:26:28,430 - INFO - ws_thread - Websocket Closed
`

Any thoughts? @ericscheier @Behappy123

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

1 participant