-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adds the rest of the polymarket endpoints #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bougyman
commented
Jan 4, 2026
- feat: adds Orderbook endpoint
- refactor: added Listable module to dry up the #list methods
- feat: adds the rest of the polymarket endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive support for additional Polymarket API endpoints by introducing new endpoint classes and refactoring existing ones to use a shared Listable module, eliminating code duplication.
Key changes:
- Introduced
Listablemodule to DRY up the#listmethods across all Polymarket endpoints - Added 5 new endpoint classes:
Orderbook,Activity,MarketPrice,Wallet, andWalletProfitAndLoss - Refactored existing endpoints (
Markets,Candlesticks,TradeHistory) to use theListablemodule
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/domeapi/polymarket/listable.rb | New shared module that provides common list method implementation for all endpoints |
| lib/domeapi/polymarket/orderbook.rb | New endpoint for fetching orderbook history with filtering support |
| lib/domeapi/polymarket/activity.rb | New endpoint for fetching user activity data |
| lib/domeapi/polymarket/market_price.rb | New endpoint for fetching current or historical market prices |
| lib/domeapi/polymarket/wallet.rb | New endpoint for wallet data with eoa/proxy validation |
| lib/domeapi/polymarket/wallet_profit_and_loss.rb | New endpoint for wallet profit and loss data with granularity support |
| lib/domeapi/polymarket/client.rb | Added accessor methods for all new endpoints |
| lib/domeapi/polymarket/markets.rb | Refactored to use Listable module, removing duplicate list method |
| lib/domeapi/polymarket/candlesticks.rb | Refactored to use Listable module, removing duplicate list method |
| lib/domeapi/polymarket/trade_history.rb | Refactored to use Listable module, removing duplicate list method |
| lib/domeapi/polymarket.rb | Added require statements for all new endpoint classes |
| lib/domeapi/client.rb | Changed polymarket client initialization from self to clone to prevent prefix modification side effects |
| test/domeapi/polymarket/*_test.rb | Comprehensive test coverage for all new endpoints with validation testing |
| test/helper.rb | Added minitest/spec and shoulda/context dependencies |
| Gemfile | Added shoulda-context and simplecov gems |
| Readme.adoc | Added documentation example for Orderbook endpoint usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.