Files
2025-10-03 15:28:16 +08:00

27 lines
609 B
Markdown

- [Watch Tickers](./examples/py/)
```python
import os
import sys
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
import asyncio
import ccxt.pro as ccxt # noqa: E402
# AUTO-TRANSPILE #
async def example():
binance = ccxt.binance({})
symbols = ['BTC/USDT', 'ETH/USDT', 'DOGE/USDT']
while True:
tickers = await binance.watch_tickers(symbols)
print(tickers['BTC/USDT'], tickers['ETH/USDT'], tickers['DOGE/USDT'])
await binance.close()
asyncio.run(example())
```