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

Over time, the websocket-client starts giving the same values #492

Open
andant7 opened this issue Jun 16, 2021 · 1 comment
Open

Over time, the websocket-client starts giving the same values #492

andant7 opened this issue Jun 16, 2021 · 1 comment

Comments

@andant7
Copy link

andant7 commented Jun 16, 2021

Over time, the websocket-client starts giving the same values.

Code:

ws1 = BitMEXWebsocket(endpoint="https://www.bitmex.com/api/v1", symbol="XBTUSD", api_key="xxx", api_secret="xxx")

while True:
    print(ws1.market_depth()[0]['bids'][0][0], ws1.market_depth()[0]['asks'][0][0])
    sleep(1)

Here's what happens. Direct line from quotes:
http://piccy.info/view3/14373179/d5c4e0b6634b596a560f67349e1c8560/

Why is this happening?

How to fix it?
Or
How to catch the moment when it starts? Maybe he writes something in the logs?

@LeonardSchick
Copy link

Got similar problem, trying to get current position size in market, which people say is under the topic 'position' under the key 'currentQty', but it doesn't update properly.

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