Skip to content

Commit

Permalink
Fix ticket_time None check
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed Jan 9, 2024
1 parent c76ca00 commit 132d532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion triangular_arbitrage/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def get_symbol_from_key(key_symbol: str) -> symbols.Symbol:

def is_delisted_symbols(exchange_time, ticker, threshold = 1 * constants.DAYS_TO_SECONDS * constants.MSECONDS_TO_SECONDS) -> bool:
ticker_time = ticker['timestamp']
return ticker_time is None or not (exchange_time - ticker_time <= threshold)
return ticker_time is not None or not (exchange_time - ticker_time <= threshold)

def get_last_prices(exchange_time, tickers, ignored_symbols):
return [
Expand Down

0 comments on commit 132d532

Please sign in to comment.