Implement initial project structure with logging and token fetching functionality

This commit is contained in:
Nawaz Haider
2026-01-01 18:41:11 +06:00
parent 3e20a07f39
commit bac5bca57d
7 changed files with 170 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import pytz
from datetime import datetime
MARKET_INTERVAL_SECONDS = 900
TIMEZONE = "US/Eastern"
def get_market_slug(coin: str = "btc") -> str:
if not coin or not isinstance(coin, str):
raise ValueError("Coin must be a non-empty string")
et_tz = pytz.timezone(TIMEZONE)
now = datetime.now(et_tz)
ts = int(now.timestamp())
start = (ts // MARKET_INTERVAL_SECONDS) * MARKET_INTERVAL_SECONDS
return f"{coin.lower()}-updown-15m-{start}"