Hi qq, in python I'm trying to get all markets expiring in 3 days and have used the code below. What is the correct way of doing it? cutoff = datetime.now(timezone.utc) + timedelta(days=3) params = { "status": "open", "limit": 5000, "max_close_ts": int(cutoff.timestamp()) } url = "https://api.elections.kalshi.com/trade-api/v2/markets" response = requests.get(url, params=params, timeout=15).json() markets = response.get("markets", [])
Hi qq, in python I'm trying to get all markets expiring in 3 days and have used the code below. What is the correct way of doing it? cutoff = datetime.now(timezone.utc) + timedelta(days=3) params = { "status": "open", "limit": 5000, "max_close_ts": int(cutoff.timestamp()) } url = "https://api.elections.kalshi.com/trade-api/v2/markets" response = requests.get(url, params=params, timeout=15).json() markets = response.get("markets", [])