Skip to content
Advertisement

Tag: websocket

Python Websocket-Client Package Frequent Ping-Pong Timeouts Upon Too Many Subscriptions

I am using the python websocket-client package (https://pypi.org/project/websocket-client/) to subscribe to multiple websocket channels. I implemented the basic ping-pong logic using the websocket client package as below. The ping-pong logic is working mostly fine under normal circumstances and I am able to run the code for hours without many disconnect/reconnect instances. However, when I try to increase the number of

Python websocket closes after few seconds

I am try subscribe API http://developers.xstore.pro/documentation/ Process how I am doing it. Login (Ok) Subscribe some command (Ok) The data starts coming in (Ok) After few second (cca 20s) (Fail) on: Python or API closes connection :( inicialize socket: Every 5s I am sending following ping There is a way to open new connection but this approach it’s not optimal.

Pandas won’t create CSV file?

just trying to save websockets to CSV’s. But it just doesnt make the file. Nothing in the directory. Tried running VScvode as admin, moving folder out of C: drive to documents .. nothing. no csv file, and no error. and no information on the internet about this either. So i kept stripping down the code to the most basic, and

Websocket Json Data to DataFrame

I am learning how to work with APIs and web sockets in finance. My goal for this code is to access data and create a DataFrame with only columns (index, ask, bid & quote) I have tried appending values to the DataFrame but it creates a new DataFrame every time I receive a message similar to the df = new_df.loc[0]

Can not get cookie from localhost websocket fast api

I’m testing websockets to work with cookies and trying to get them in fast api. I manually installed them in chrome but I get an empty dictionary inside the application. I used the fast api documentation templates and slightly redesigned it My html My websocket print(websocket.cookies) returns an empty dictionary {} Answer Cookies are domain-defined, so you should point at

missing some messages in websocket client?

I am trying to implement a websocket client that connects to the popular crypto exchange FTX. I have simplified my problem to the following example code below: The output of the program overall is as expected, but with one major problem: the cumulative trading volume that gets output to the console is WAY too low. It should be about 1,000x-10,000x

Python asyncio loop.run_forever()

I try to do a trading bot and the most things work fine. But everytime the internet connection is gone for a short time, the code fails. I use asyncio run_forever() function and I think that the code should run forever until it gets stopped, but it does not work. Here is my code: And I call the loop like

Python Binance multiple kline time intervals

I’m writing a program that collects cryptocurrency price information and I want to perform technical analysis on two different kline time intervals. I’ve been struggling to achieve this as I’m new to programming and even newer to Python specifically. Below is the code I’m currently trying to get two different kline streams in at the same time. Unfortunately I’m getting

Advertisement