秋田预测市场 · Discord 审计

Infinitepunch参与话题 0消息总数 1

该用户的聊天记录定位。

Reset

聊天记录

共 1 条,显示第 1-1 条
Infinitepunch 2026-06-27 14:50:40 Kalshi

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", [])