Date: 2026-02-02
Status: β
API endpoint identified and working
The Kalshi API has been migrated to a new domain:
OLD URLs (No longer work):
https://trading-api.kalshi.com/trade-api/v2 β Returns: "API has been moved"
https://demo-trading-api.kalshi.com β DNS does not resolve (NXDOMAIN)
NEW URLs (Current, working):
https://api.elections.kalshi.com/trade-api/v2 β
ACTIVE (returns market data)
$ nslookup demo-trading-api.kalshi.com
** server can't find demo-trading-api.kalshi.com: NXDOMAIN
$ nslookup trading-api.kalshi.com
Name: trading-api.kalshi.com
Address: 18.225.22.0
$ nslookup api.elections.kalshi.com
Name: api.elections.kalshi.com
Address: [resolves successfully]The new endpoint returns valid market data:
$ curl https://api.elections.kalshi.com/trade-api/v2/ | head -100
{
"series": [...],
"milestones": [...],
"liveData": [...],
"structuredTargets": [...]
}Returns extensive data including:
- Active sports markets (NHL, NFL, NCAA Basketball)
- Political/prediction markets
- Live game data
- Team and player information
- Super Bowl LIX markets
Line 33-34:
# OLD (doesn't work)
PROD_URL = "https://trading-api.kalshi.com/trade-api/v2"
SANDBOX_URL = "https://demo-trading-api.kalshi.com/trade-api/v2"
# NEW (working)
PROD_URL = "https://api.elections.kalshi.com/trade-api/v2"
SANDBOX_URL = "https://api.elections.kalshi.com/trade-api/v2" # May be same as prodNote: The sandbox environment may not exist separately anymore, or might use the same URL with different credentials.
The API appears to be publicly accessible for market data (GET requests), but authentication is still required for:
- Account operations (balance, positions)
- Order placement
- Private data
Next Steps:
- Contact Kalshi support to request API credentials
- Determine if sandbox environment exists separately
- Test authentication flow with the new endpoint
You can test market data fetching without authentication:
import httpx
async def test_kalshi_markets():
url = "https://api.elections.kalshi.com/trade-api/v2/"
async with httpx.AsyncClient() as client:
response = await client.get(url)
data = response.json()
print(f"Found {len(data.get('series', []))} market series")Recommended approach:
- Visit https://kalshi.com
- Look for "Developers" or "API" section
- Email support@kalshi.com with:
- Request for sandbox/demo API access
- Purpose: Testing automated trading system
- Need: API credentials for development
Questions to ask:
- Is there a sandbox environment for testing?
- How do I obtain API credentials?
- What's the authentication method? (email/password, API keys, OAuth?)
- Rate limits and usage guidelines?
- Update code with new API endpoint β
- Update QUICKSTART.md to reflect correct process
- Test market data fetching without auth
- Contact Kalshi for credentials
- Document authentication flow once obtained
If you have existing Kalshi API credentials from the old system:
- They may still work with the new endpoint
- Test by updating the URL in your configuration
- If they don't work, request new credentials
Status: Ready to proceed with code updates and Kalshi outreach.