Execution · TypeScript
Kalshi AI Trading Bot
A TypeScript Kalshi bot combining market data, weather forecasts, and model-assisted trade decisions.
View repositoryGordon boundary
Gordon governs the project's paid agent actions. The repository keeps its own strategy, runtime, data ingestion, and execution logic.
How it works
The bot queries Kalshi markets, then calls Exa (news) and CoinGecko (reference prices) through Gordon to build a view on each contract. Gordon's spending constitution makes sure a rogue loop cannot exhaust the research budget. The planned approval step will add a policy gate that blocks any signed order above a configurable size threshold.
Integration recipe
How Gordon fits
Forecast data
SupportedGovern premium forecast and research API calls through Gordon so every market-data fetch is capped and auditable.
Trade approval
PlannedRequire a Gordon policy check before any signed Kalshi order is submitted.
Integration code
RESEARCH_PROMPT = """
Research recent news and reference data for {market_title}.
Use gordon_call_service with:
operation: exa.search.web
max_payment_units: 20000
session_id: kalshi-{market_ticker}-{run_id}
Return a sourced summary. Do not place or sign any order.
"""Connection path
Create an agent
Give this project its own Gordon identity, wallet, and API key.
Add MCP or SDK
Use Gordon MCP for hosted agents or gordon.fetch for application code.
Set policy
Allow only required services, then cap calls and daily spend.