diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e862784..4192846 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,7 @@ jobs: name: ubuntu-latest - Docker - lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Run hadolint uses: reviewdog/action-hadolint@v1 @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Set Environment Variables run: | @@ -53,7 +53,7 @@ jobs: use: true - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fcf158..f3d042e 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.1] - 2024-10-24 +### Updated +- remove non spot symbols from detection + ## [1.2.0] - 2024-10-24 ### Added - cycle detection by @ruidazeng diff --git a/main.py b/main.py index abb71d2..86b0da3 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,7 @@ import asyncio +import os +# allow minimal octobot_commons imports +os.environ["USE_MINIMAL_LIBS"] = "true" import octobot_commons.symbols as symbols import octobot_commons.os_util as os_util @@ -19,7 +22,7 @@ print("Scanning...") exchange_name = "binanceus" # allow pickable exchange_id from https://github.com/ccxt/ccxt/wiki/manual#exchanges - best_opportunities, best_profit = asyncio.run(detector.run_detection(exchange_name)) + best_opportunities, best_profit = asyncio.run(detector.run_detection(exchange_name, max_cycle=3)) def opportunity_symbol(opportunity): diff --git a/requirements.txt b/requirements.txt index 42c2968..547638e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ ccxt -networkx[default] +networkx[default]>=3.4, <3.5 OctoBot-Commons>=1.9, <1.10 diff --git a/setup.py b/setup.py index 8b447a3..9e937a4 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ REQUIRES_PYTHON = '>=3.10' setup( - name=PROJECT_NAME, + name=PROJECT_NAME.lower().replace("-", "_"), version=VERSION, url='https://github.com/Drakkar-Software/Triangular-Arbitrage', author='Drakkar-Software', diff --git a/triangular_arbitrage/__init__.py b/triangular_arbitrage/__init__.py index 0ffcad2..2407f98 100644 --- a/triangular_arbitrage/__init__.py +++ b/triangular_arbitrage/__init__.py @@ -1,2 +1,2 @@ PROJECT_NAME = "OctoBot-Triangular-Arbitrage" -VERSION = "1.2.0" +VERSION = "1.2.1" diff --git a/triangular_arbitrage/detector.py b/triangular_arbitrage/detector.py index 3d26b0b..3cb1ba6 100644 --- a/triangular_arbitrage/detector.py +++ b/triangular_arbitrage/detector.py @@ -15,6 +15,9 @@ class ShortTicker: last_price: float reversed: bool = False + def __repr__(self): + return f"ShortTicker(symbol={str(self.symbol)}, last_price={self.last_price}, reversed={self.reversed})" + async def fetch_tickers(exchange): return await exchange.fetch_tickers() if exchange.has['fetchTickers'] else [] @@ -41,6 +44,7 @@ def get_last_prices(exchange_time, tickers, ignored_symbols, whitelisted_symbols if tickers[key]['close'] is not None and not is_delisted_symbols(exchange_time, tickers[key]) and str(get_symbol_from_key(key)) not in ignored_symbols + and get_symbol_from_key(key).is_spot() and (whitelisted_symbols is None or str(get_symbol_from_key(key)) in whitelisted_symbols) ]