Python Kalshi Trading Code Review

Job ID: 40221254

Budget: $25 – $50 USD

I have a working Python script that talks to the Kalshi prediction-market API, pulls live data, and fires off trades automatically through simple web-request helpers. Functionally it looks solid from my end, but I’m not a developer and would like an expert eye on it before I trust it with larger positions.

The review should cover every critical angle—accuracy of the trading logic, efficiency of each call or loop, and robust error-handling so a bad response or network hiccup never leaves an order hanging. Because the script relies heavily on APIs and a small amount of web-scraping, please verify that authentication, rate-limit handling, and data parsing follow best practices and won’t put the account at risk.

Deliverables
• A line-by-line code review (commented or as a pull request) highlighting any bugs, risky assumptions, or speed improvements
• Refactored snippets or patches where the fix is straightforward
• A short report summarising what was changed, why, and any next steps I should consider (tests, logging, monitoring, etc.)

Acceptance criteria: the revised script runs end-to-end on my machine without breaking existing functionality and handles simulated API failures gracefully.

If you’ve audited trading bots or other API-driven automations before, I’d love to work with you.