Comments (3)
Can you send a sample code when you got this error, in what case?
from pymexc.
I also got this error with about any futures stream right now. Here is a exemple:
api_key = ""
api_secret = ""
def handle_message(message):
print(message)
futures_client = futures.HTTP(api_key = api_key, api_secret = api_secret)
ws_futures_client = futures.WebSocket(api_key = api_key, api_secret = api_secret)
print(futures_client.index_price("MX_USDT"))
ws_futures_client.deal_stream(handle_message, "MX_USDT")
while True:
pass
I got this error!
Exception in thread Thread-2 (<lambda>):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/martin/.virtualenvs/mexc/lib/python3.10/site-packages/pymexc/base_websocket.py", line 151, in <lambda>
self.wsl = threading.Thread(target=lambda: self._ping_loop(
File "/home/martin/.virtualenvs/mexc/lib/python3.10/site-packages/pymexc/base_websocket.py", line 101, in _ping_loop
self.ws.send(ping_payload)
File "/home/martin/.virtualenvs/mexc/lib/python3.10/site-packages/websocket/_app.py", line 253, in send
raise WebSocketConnectionClosedException(
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.
from pymexc.
Fixed with commit 2e14ff8c...f044cc47
from pymexc.
Related Issues (7)
- {'success': False, 'code': 602, 'message': 'Signature verification failed!'} HOT 3
- spot_client.ticker_price() doesn't work HOT 2
- Signature verification failed on futures api HOT 3
- futures websocket private channel empty
- Timestamp for this request is outside of the recvWindow. HOT 1
- Unable to use ws that require paramter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymexc.