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
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.2] - 2024-12-12
### Fixed
- ignore closed markets

## [1.2.1] - 2024-10-24
### Updated
- remove non spot symbols from detection
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

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.1"
VERSION = "1.2.2"
11 changes: 9 additions & 2 deletions triangular_arbitrage/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down