feat: adds the rest of the polymarket endpoints#2
Merged
Conversation
Member
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.
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.
This was referenced Jan 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.