diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d042e..89a85d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.2] - 2024-12-12 +### Fixed +- ignore closed markets + ## [1.2.1] - 2024-10-24 ### Updated - remove non spot symbols from detection diff --git a/main.py b/main.py index 86b0da3..1de62b8 100644 --- a/main.py +++ b/main.py @@ -20,7 +20,7 @@ # start arbitrage detection print("Scanning...") - exchange_name = "binanceus" # allow pickable exchange_id from https://github.com/ccxt/ccxt/wiki/manual#exchanges + exchange_name = "bitget" # allow pickable exchange_id from https://github.com/ccxt/ccxt/wiki/manual#exchanges best_opportunities, best_profit = asyncio.run(detector.run_detection(exchange_name, max_cycle=3)) diff --git a/triangular_arbitrage/__init__.py b/triangular_arbitrage/__init__.py index 2407f98..2479678 100644 --- a/triangular_arbitrage/__init__.py +++ b/triangular_arbitrage/__init__.py @@ -1,2 +1,2 @@ PROJECT_NAME = "OctoBot-Triangular-Arbitrage" -VERSION = "1.2.1" +VERSION = "1.2.2" diff --git a/triangular_arbitrage/detector.py b/triangular_arbitrage/detector.py index 3cb1ba6..0276557 100644 --- a/triangular_arbitrage/detector.py +++ b/triangular_arbitrage/detector.py @@ -20,7 +20,7 @@ def __repr__(self): async def fetch_tickers(exchange): - return await exchange.fetch_tickers() if exchange.has['fetchTickers'] else [] + return await exchange.fetch_tickers() if exchange.has['fetchTickers'] else {} def get_symbol_from_key(key_symbol: str) -> symbols.Symbol: @@ -101,9 +101,16 @@ async def get_exchange_data(exchange_name): exchange_class = getattr(ccxt, exchange_name) exchange = exchange_class() tickers = await fetch_tickers(exchange) + filtered_tickers = { + symbol: ticker + for symbol, ticker in tickers.items() + if exchange.markets.get(symbol, {}).get( + "active", True + ) is True + } exchange_time = exchange.milliseconds() await exchange.close() - return tickers, exchange_time + return filtered_tickers, exchange_time async def get_exchange_last_prices(exchange_name, ignored_symbols, whitelisted_symbols=None):