Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Set Environment Variables
run: |
Expand All @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ccxt
networkx[default]
networkx[default]>=3.4, <3.5

OctoBot-Commons>=1.9, <1.10
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion triangular_arbitrage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PROJECT_NAME = "OctoBot-Triangular-Arbitrage"
VERSION = "1.2.0"
VERSION = "1.2.1"
4 changes: 4 additions & 0 deletions triangular_arbitrage/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
Expand All @@ -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)
]

Expand Down