{"id":36493021,"url":"https://github.com/ivanzzeth/polymarket-go-gamma-client","last_synced_at":"2026-01-12T01:57:48.343Z","repository":{"id":322772594,"uuid":"1090321078","full_name":"ivanzzeth/polymarket-go-gamma-client","owner":"ivanzzeth","description":"Go SDK for the Polymarket Gamma RESTful API at https://gamma-api.polymarket.com","archived":false,"fork":false,"pushed_at":"2025-12-23T07:50:36.000Z","size":158,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-24T22:17:50.786Z","etag":null,"topics":["polymarket","polymarket-api","prediction-markets","web3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanzzeth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-05T14:09:30.000Z","updated_at":"2025-12-23T13:00:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ivanzzeth/polymarket-go-gamma-client","commit_stats":null,"previous_names":["ivanzzeth/polymarket-go-gamma-client"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ivanzzeth/polymarket-go-gamma-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanzzeth%2Fpolymarket-go-gamma-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanzzeth%2Fpolymarket-go-gamma-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanzzeth%2Fpolymarket-go-gamma-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanzzeth%2Fpolymarket-go-gamma-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanzzeth","download_url":"https://codeload.github.com/ivanzzeth/polymarket-go-gamma-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanzzeth%2Fpolymarket-go-gamma-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["polymarket","polymarket-api","prediction-markets","web3"],"created_at":"2026-01-12T01:57:47.762Z","updated_at":"2026-01-12T01:57:48.337Z","avatar_url":"https://github.com/ivanzzeth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polymarket-go-gamma-client\n\nGo SDK for the Polymarket Gamma RESTful API.\n\nAll market data necessary for market resolution is available on-chain (ie ancillaryData in UMA 00 request), but Polymarket also provides a hosted service, Gamma, that indexes this data and provides additional market metadata (ie categorization, indexed volume, etc). This service is made available through a REST API. For public users, this resource read only and can be used to fetch useful information about markets for things like non-profit research projects, alternative trading interfaces, automated trading systems etc.\n\n**API Endpoint:** https://gamma-api.polymarket.com\n\n## Features\n\n- Complete Go SDK for Polymarket Gamma API\n- Type-safe API with comprehensive market data structures\n- Support for Markets, Events, Series, Search, Sports, and Tags endpoints\n- Real-world examples for trading opportunity discovery\n\n## Installation\n\nRequires Go 1.24 or later.\n\n```bash\ngo get github.com/ivanzzeth/polymarket-go-gamma-client\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"log\"\n    \"net/http\"\n\n    polymarketgamma \"github.com/ivanzzeth/polymarket-go-gamma-client\"\n)\n\nfunc main() {\n    client := polymarketgamma.NewClient(http.DefaultClient)\n\n    // Fetch markets\n    closed := false\n    params := \u0026polymarketgamma.GetMarketsParams{\n        Limit:  10,\n        Closed: \u0026closed,\n    }\n\n    markets, err := client.GetMarkets(context.Background(), params)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    for _, market := range markets {\n        fmt.Printf(\"%s: $%.2f (24h vol: $%.2f)\\n\",\n            market.Question, market.LastTradePrice, market.Volume24hr)\n    }\n}\n```\n\n## API Coverage\n\n### Markets\n- `GetMarkets()` - List markets with filtering\n- `GetMarketByID()` - Get single market by ID\n- `GetMarketBySlug()` - Get single market by slug\n\n### Events\n- `GetEvents()` - List events with filtering\n- `GetEventByID()` - Get single event by ID\n- `GetEventBySlug()` - Get single event by slug\n\n### Series\n- `GetSeries()` - List series with filtering\n- `GetSeriesByID()` - Get single series by ID\n\n### Search\n- `Search()` - Search markets, events, and profiles\n\n### Health\n- `HealthCheck()` - Check API health status\n\n### Sports\n- `GetTeams()` - List sports teams with filtering\n- `GetSportsMetadata()` - Get sports metadata including images and resolution sources\n\n### Tags\n- `GetTags()` - List tags with filtering\n- `GetTagByID()` - Get single tag by ID\n- `GetTagBySlug()` - Get single tag by slug\n- `GetRelatedTagsByID()` - Get related tags by tag ID\n- `GetRelatedTagsBySlug()` - Get related tags by tag slug\n- `GetRelatedTagsDetailByID()` - Get detailed tag information for related tags by ID\n- `GetRelatedTagsDetailBySlug()` - Get detailed tag information for related tags by slug\n\n## Examples\n\nThis repository includes comprehensive examples demonstrating various trading opportunity detection strategies:\n\n### 1. Market Making Opportunities\n\n#### [Wide Spread Markets](./examples/find-wide-spread-markets/)\nFind markets where the bid-ask spread is significantly larger than the minimum tick size.\n- Identifies inefficient markets with wide spreads\n- Great for market makers to capture spread profits\n- Filters out false positives (closed markets)\n\n```bash\ncd examples/find-wide-spread-markets\ngo run main.go\n```\n\n#### [Low Liquidity, High Volume Markets](./examples/find-low-liquidity-high-volume/)\nDiscover markets with high trading activity but insufficient liquidity.\n- High volume indicates strong interest\n- Low liquidity means wider spreads\n- Excellent opportunity for liquidity providers\n- Provides detailed market making analysis\n\n```bash\ncd examples/find-low-liquidity-high-volume\ngo run main.go\n```\n\n#### [New Active Markets](./examples/find-new-active-markets/)\nFind recently launched markets with early mover advantages.\n- Markets less than 7 days old\n- Low competition from other market makers\n- Wide spreads and early positioning opportunities\n- Includes opportunity scoring system\n\n```bash\ncd examples/find-new-active-markets\ngo run main.go\n```\n\n### 2. Arbitrage Opportunities\n\n#### [Related Markets Arbitrage](./examples/find-related-markets-arbitrage/)\nIdentify events where probabilities don't sum to 100%.\n- Exploits pricing inefficiencies across related markets\n- Detects both underpriced and overpriced scenarios\n- Calculates expected returns and ROI\n- Provides detailed execution strategies\n\n```bash\ncd examples/find-related-markets-arbitrage\ngo run main.go\n```\n\n#### [NegRisk Opportunities](./examples/find-negrisk-opportunities/)\nDiscover capital-efficient trading using Negative Risk markets.\n- Reduced collateral requirements\n- NegRisk-specific arbitrage strategies\n- Capital efficiency analysis\n- Detailed fee impact calculations\n\n```bash\ncd examples/find-negrisk-opportunities\ngo run main.go\n```\n\n### 3. Price Anomaly Detection\n\n#### [Rapid Price Movement](./examples/find-rapid-price-movement/)\nDetect markets with significant 24-hour price changes.\n- Identifies potential mean reversion opportunities\n- Detects momentum trading signals\n- Compares short-term vs long-term trends\n- Suggests trading strategies based on movement type\n\n```bash\ncd examples/find-rapid-price-movement\ngo run main.go\n```\n\n#### [Markets Closing Soon](./examples/find-closing-soon-markets/)\nFind markets approaching resolution where outcomes may be predictable.\n- Markets closing within 48 hours\n- Identifies potential mispricing near expiration\n- Distinguishes automatically vs manually resolved markets\n- Includes resolution risk assessment\n\n```bash\ncd examples/find-closing-soon-markets\ngo run main.go\n```\n\n## Trading Strategy Analysis\n\nSee [ANALYSIS.md](./ANALYSIS.md) for comprehensive documentation on:\n- Market making strategies\n- Arbitrage techniques\n- Statistical analysis approaches\n- Risk management considerations\n- Implementation guides\n\n## Key Data Structures\n\n### Market\nContains comprehensive market data including:\n- Pricing (bid, ask, last trade, spread)\n- Volume (24h, 1w, 1m, total)\n- Liquidity (CLOB, AMM, total)\n- Order book settings (tick size, min size, fees)\n- Price changes (1h, 1d, 1w, 1m)\n- Resolution information\n- Metadata and categorization\n\n### Event\nRepresents trading events with:\n- Multiple markets\n- Series information\n- Tags and categories\n- Volume and liquidity aggregates\n- NegRisk configuration\n\n### Search\nUnified search across:\n- Markets\n- Events\n- Tags\n- Profiles\n\n## Best Practices\n\n1. **Rate Limiting**: Respect API rate limits\n2. **Error Handling**: Always check for errors\n3. **Data Validation**: Verify market status and data quality\n4. **Risk Management**: Use appropriate position sizing\n5. **Fee Awareness**: Consider maker/taker fees in strategies\n\n## Disclaimer\n\nThis SDK and examples are for educational and research purposes only. Trading prediction markets involves substantial risk. Always:\n- Conduct thorough research\n- Understand market mechanics\n- Never risk more than you can afford to lose\n- Verify all information independently\n- Comply with local regulations\n\nPast opportunities do not guarantee future results.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Resources\n\n- [Polymarket Documentation](https://docs.polymarket.com/)\n- [Gamma API Documentation](https://docs.polymarket.com/#gamma-markets-api)\n- [CLOB API Documentation](https://docs.polymarket.com/#clob-api) (for actual trading)\n\n## Support\n\nFor issues and questions:\n- Open an issue on GitHub\n- Check existing examples for reference\n- Review ANALYSIS.md for strategy details","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanzzeth%2Fpolymarket-go-gamma-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanzzeth%2Fpolymarket-go-gamma-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanzzeth%2Fpolymarket-go-gamma-client/lists"}