AJAY KASU commited on
Commit ·
a6c0850
1
Parent(s): b02119b
Fix Kalshi 401 error by migrating REST URL to api.elections.kalshi.com domain
Browse files
app.py
CHANGED
|
@@ -77,7 +77,7 @@ async def fetch_and_scan():
|
|
| 77 |
headers = {"Authorization": f"Bearer {kalshi_key}"} if kalshi_key else {}
|
| 78 |
async with aiohttp.ClientSession(headers=headers) as session:
|
| 79 |
async with session.get(
|
| 80 |
-
"https://
|
| 81 |
params={"status": "open", "limit": 100},
|
| 82 |
timeout=aiohttp.ClientTimeout(total=10)
|
| 83 |
) as resp:
|
|
|
|
| 77 |
headers = {"Authorization": f"Bearer {kalshi_key}"} if kalshi_key else {}
|
| 78 |
async with aiohttp.ClientSession(headers=headers) as session:
|
| 79 |
async with session.get(
|
| 80 |
+
"https://api.elections.kalshi.com/trade-api/v2/markets",
|
| 81 |
params={"status": "open", "limit": 100},
|
| 82 |
timeout=aiohttp.ClientTimeout(total=10)
|
| 83 |
) as resp:
|