Alpaca Trader

This commit is contained in:
Justin Oros
2026-01-30 16:30:43 -07:00
commit be9f5fb95b
15 changed files with 1247 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from datetime import datetime, timedelta
import pytz
EASTERN = pytz.timezone('US/Eastern')
def seconds_to_human_readable(seconds):
if seconds < 60:
return f"{seconds}s"
elif seconds < 3600:
return f"{seconds // 60}m {seconds % 60}s"
elif seconds < 86400:
hours = seconds // 3600
minutes = (seconds % 3600) // 60
return f"{hours}h {minutes}m"
else:
days = seconds // 86400
hours = (seconds % 86400) // 3600
minutes = (seconds % 3600) // 60
return f"{days}d {hours}h {minutes}m"