BINANCE:BTCUSD   Bitcoin
import ccxt
import time
import logging
from datetime import datetime

# Настройка логирования
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

# Инициализация биржи Binance через библиотеку ccxt
exchange = ccxt.binance()

# Функция для получения последних сделок
def fetch_trades(symbol='BTC/USDT', limit=50):
try:
trades = exchange.fetch_trades(symbol, limit=limit)
return trades
except Exception as e:
logging.error(f"Ошибка при получении сделок: {e}")
return

# Функция для анализа и выв⬤
Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.