Building a Prediction Market Assistant with Perplexity Sonar and Kalshi APIs in Python

Building a Prediction Market Assistant with Perplexity Sonar and Kalshi APIs in Python

Part Time Larry via YouTube Direct link

19:53 Evaluate Bet button, callback function, odds markdown as context

15 of 22

15 of 22

19:53 Evaluate Bet button, callback function, odds markdown as context

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Building a Prediction Market Assistant with Perplexity Sonar and Kalshi APIs in Python

Automatically move to the next video in the Classroom when playback concludes

  1. 1 0:00 Demo of the App
  2. 2 2:16 Perplexity Sonar API with DeepSeek and Structured Output
  3. 3 3:36 Kalshi API and events as context
  4. 4 4:13 Grok3 has pretty good analysis of prediction markets
  5. 5 6:56 These models are more willing to speculate
  6. 6 7:21 Testing responses in Perplexity Sonar Reasoning playground
  7. 7 8:23 Going beyond an assistant to an agent
  8. 8 9:07 Getting the code from my Github
  9. 9 10:09 Python code walkthrough, dependencies, environment
  10. 10 11:32 Running the Streamlit app, caching Kalshi event data
  11. 11 12:40 Events vs. Markets, my Super Bowl and Kendrick Lamar bets
  12. 12 14:55 Event and category json, pagination, caching for speed
  13. 13 17:23 Quick Streamlit UI component review
  14. 14 18:33 Matching search term, capturing markdown for context
  15. 15 19:53 Evaluate Bet button, callback function, odds markdown as context
  16. 16 20:47 Evaluate bet function, Perplexity payload, system prompt
  17. 17 21:57 Pydantic model for contract data
  18. 18 22:49 Perplexity JSON output is in beta, not 100% reliable
  19. 19 23:47 Displaying the analysis in a dialog
  20. 20 24:58 Language models are not deterministic, not 100% reliable
  21. 21 26:05 Why I called it an assistant and not an agent
  22. 22 26:45 Wrapping up: do you want more prediction market content?

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.