You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried just the example in the doc to stream the positions, but doesn't work.
I waited for 5min. but I didn't receive any message, neither error, nor information about the positions.
Any help?
Thanks
from pybit.unified_trading import WebSocket
from time import sleep
ws = WebSocket(
testnet=True,
channel_type="private",
api_key="XXXXX",
api_secret="XXXXX",
)
def handle_message(message):
print(message)
ws.position_stream(callback=handle_message)
while True:
sleep(1)
The text was updated successfully, but these errors were encountered:
Hi,
I tried just the example in the doc to stream the positions, but doesn't work.
I waited for 5min. but I didn't receive any message, neither error, nor information about the positions.
Any help?
Thanks
The text was updated successfully, but these errors were encountered: