TradeViaPython / a3_aliceblue

Apache License 2.0
12 stars 4 forks source link

WebSocket Disconnected after few seconds #1

Closed RRR008 closed 2 years ago

RRR008 commented 2 years ago

Master Contract Downloading (After 8:00am today data available else previous day)....Completed Websocket : Connected {'t': 'dk', 'pp': '2', 'ml': '1', 'e': 'NSE', 'tk': '26009', 'ls': '1', 'ti': '0.05', 'c': '39042.30', 'lp': '39262.60', 'pc': '0.56', 'ft': '1660632734', 'o': '39284.10', 'h': '39444.60', 'l': '39208.10', 'toi': '14443100', 'ts': 'NIFTY BANK'} {'t': 'df', 'e': 'NSE', 'tk': '26009', 'lp': '39261.75', 'pc': '0.56', 'ft': '1660632735', 'ts': 'NIFTY BANK'} [Finished in 12.3s]

TradeViaPython commented 2 years ago

Make "run in background = False" in start websocket because you are not using any loop after starting websocket

RRR008 commented 2 years ago

Hi @TradeViaPython , When I am putting socket code in method it's not getting started.

Screenshot 2022-08-16 at 3 59 16 PM

it's getting stuck after downloading master contract: Master Contract Downloading (After 8:00am today data

available else previous day)....Completed [Finished in 12.0s]

TradeViaPython commented 2 years ago

You defined function start_socket() but you havn't called it

RRR008 commented 2 years ago

Even After that it wasn't working hence I put into the loop and it's working now. Thank You for your support @TradeViaPython .