Prices converted from cents (0-100) to probabilities (0-1)
Both include CLI tools (sites/*/cmd/*/main.go) with search, event, and market subcommands
Both include comprehensive test suites using net/http/httptest (27 tests total, all passing)
Design Notes
These extractors use direct HTTP (net/http + encoding/json) rather than the Browser interface since both platforms have free, public REST APIs. This is faster, more reliable, and doesn't require Playwright.
Test plan
go build ./... compiles cleanly
go test ./sites/polymarket/... - 14 tests pass
go test ./sites/kalshi/... - 13 tests pass
Manual: go run ./sites/polymarket/cmd/polymarket search "olympic hockey"
Manual: go run ./sites/kalshi/cmd/kalshi search "olympic hockey"
## Summary
- Add **Polymarket** site extractor using the public Gamma REST API (no browser/Playwright needed)
- `Search()` - text search via `/public-search` endpoint
- `GetEvent()` / `GetMarket()` - lookup by slug or numeric ID
- `GetEventFromURL()` - parse `polymarket.com/event/...` URLs
- Handles Polymarket's inconsistent JSON encoding (fields can be arrays or stringified arrays)
- Add **Kalshi** site extractor using the public trade API (no auth needed for reads)
- `Search()` - fetches open events and filters client-side (Kalshi has no text search API)
- `GetMarket()` / `GetEvent()` - lookup by ticker
- `GetMarketFromURL()` / `GetEventFromURL()` - parse `kalshi.com/markets/...` URLs
- Prices converted from cents (0-100) to probabilities (0-1)
- Both include CLI tools (`sites/*/cmd/*/main.go`) with `search`, `event`, and `market` subcommands
- Both include comprehensive test suites using `net/http/httptest` (27 tests total, all passing)
## Design Notes
These extractors use direct HTTP (`net/http` + `encoding/json`) rather than the Browser interface since both platforms have free, public REST APIs. This is faster, more reliable, and doesn't require Playwright.
## Test plan
- [x] `go build ./...` compiles cleanly
- [x] `go test ./sites/polymarket/...` - 14 tests pass
- [x] `go test ./sites/kalshi/...` - 13 tests pass
- [ ] Manual: `go run ./sites/polymarket/cmd/polymarket search "olympic hockey"`
- [ ] Manual: `go run ./sites/kalshi/cmd/kalshi search "olympic hockey"`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add site extractors for two prediction market platforms using their
public REST APIs (no browser/Playwright dependency needed).
Polymarket: search via Gamma API, get events/markets by slug/ID/URL.
Handles inconsistent JSON encoding (stringified arrays).
Kalshi: get markets/events by ticker/URL, search via client-side
filtering of open events (no text search API available).
Both include CLI tools and comprehensive test suites using httptest.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Add Polymarket site extractor using the public Gamma REST API (no browser/Playwright needed)
Search()- text search via/public-searchendpointGetEvent()/GetMarket()- lookup by slug or numeric IDGetEventFromURL()- parsepolymarket.com/event/...URLsAdd Kalshi site extractor using the public trade API (no auth needed for reads)
Search()- fetches open events and filters client-side (Kalshi has no text search API)GetMarket()/GetEvent()- lookup by tickerGetMarketFromURL()/GetEventFromURL()- parsekalshi.com/markets/...URLsBoth include CLI tools (
sites/*/cmd/*/main.go) withsearch,event, andmarketsubcommandsBoth include comprehensive test suites using
net/http/httptest(27 tests total, all passing)Design Notes
These extractors use direct HTTP (
net/http+encoding/json) rather than the Browser interface since both platforms have free, public REST APIs. This is faster, more reliable, and doesn't require Playwright.Test plan
go build ./...compiles cleanlygo test ./sites/polymarket/...- 14 tests passgo test ./sites/kalshi/...- 13 tests passgo run ./sites/polymarket/cmd/polymarket search "olympic hockey"go run ./sites/kalshi/cmd/kalshi search "olympic hockey"🤖 Generated with Claude Code
Pull request closed