hitbtc-com / hitbtc-api

HitBTC API
GNU Lesser General Public License v3.0
322 stars 153 forks source link

Cannot Send payload - Connection not established! #190

Closed lyonLeeLPL closed 5 years ago

lyonLeeLPL commented 6 years ago

Cannot Send payload - Connection not established!

hitbtc-com commented 6 years ago

Hi @a5601564

If problem not solved, please provide more information about error (language, code example)

hitbtc-com commented 5 years ago

see example https://gist.github.com/hitbtc-com/fc738c1b926d9d7aa7e3bd5247f792a1

monster1616 commented 4 years ago

import time import queue from hitbtc import HitBTC c = HitBTC() c.start() # start the websocket connection time.sleep(2) # Give the socket some time to connect c.subscribe_ticker(symbol='ETHBTC') # Subscribe to ticker data for the pair ETHBTC

while True: try: data = c.recv()

except queue.Empty:
    continue

# process data from websocket

c.stop()

Error: Cannot Send payload - Connection not established!

StelicaRusu commented 4 years ago

Set a higher value for time.sleep() and it works just fine