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
When I try to use watch_balance for mexc, I get no message back at all. Like no error, no message, anything... I've tried to change balance while the script is running to see if it behaves like a ticker, but I didn't get any message. Then I tried to change watch_balance to fetch_balance and I got my balance message. So REST api works but websocket is not working. So it's not a apikey issue either. I really need to use watch_balance for mexc because fetch is too slow. Did someone have any problem like that?
Thank you in advance!
Code
import ccxt.pro as ccxt
import config_shawy
import asyncio
exchange_id = "mexc"
exchange_class = getattr(ccxt, exchange_id)
exchange = exchange_class({
'apiKey': getattr(config_shawy, f'{exchange_id}_pub_key'),
'secret': getattr(config_shawy, f'{exchange_id}_priv_key'),
'enableRateLimit': True
})
async def watch_balance():
if exchange.has['watchBalance']:
while True:
try:
balance = await exchange.watch_balance({'type' : 'spot'})
print(balance)
except Exception as e:
print(e)
# stop the loop on exception or leave it commented to retry
# raise e
else:
print("exchange has no watch balance mode")
async def main():
await watch_balance()
if __name__ == "__main__":
asyncio.run(main())
The text was updated successfully, but these errors were encountered:
Operating System
Windows 10
Programming Languages
Python
CCXT Version
4.2.77
Description
When I try to use watch_balance for mexc, I get no message back at all. Like no error, no message, anything... I've tried to change balance while the script is running to see if it behaves like a ticker, but I didn't get any message. Then I tried to change watch_balance to fetch_balance and I got my balance message. So REST api works but websocket is not working. So it's not a apikey issue either. I really need to use watch_balance for mexc because fetch is too slow. Did someone have any problem like that?
Thank you in advance!
Code
The text was updated successfully, but these errors were encountered: