-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Description
Operating System
WSL
Programming Language
Python
CCXT Version
4.5.26
Description
When using watch_ticker() on hyperliquid the updates take five seconds each. It seems they are not driven by pushing new data. In this case there is no point in using the watch method over fetch method which can provide a fresh data a lot more often.
import asyncio
import logging
import ccxt.pro as ccxtpro
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
async def main():
exchange = ccxtpro.hyperliquid({"newUpdates": True})
exchange.enableRateLimit = False
await exchange.load_markets()
exchange.verbose = True
symbol = "BTC/USDC:USDC"
try:
while True:
data = await exchange.watch_ticker(symbol)
logger.info(data)
# await asyncio.sleep(1)
except KeyboardInterrupt:
logger.info("\nShutting down...")
finally:
await exchange.close()
if __name__ == "__main__":
asyncio.run(main())
Metadata
Metadata
Assignees
Labels
No labels