Skip to content

Commit

Permalink
Add timestamp in redis upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed Oct 15, 2023
1 parent 2c27b5b commit e2543f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion triangular_arbitrage/detector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import time
import ccxt.async_support as ccxt
from typing import List
from tqdm.auto import tqdm
Expand Down Expand Up @@ -115,6 +116,7 @@ def upload_result(best_opportunities, best_profit):

data = {
'best_opportunity': [str(best_opportunity.symbol) for best_opportunity in best_opportunities],
'best_profit': best_profit
'best_profit': best_profit,
'timestamp': time.time()
}
redis_client.json().set(f"{os.getenv(REDIS_KEY_ENV, None)}", '$', data)

0 comments on commit e2543f3

Please sign in to comment.