Skip to content

Conversation

@bougyman
Copy link
Member

@bougyman 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

Copilot AI review requested due to automatic review settings January 4, 2026 15:56
Copy link

Copilot AI left a 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 Listable module to DRY up the #list methods across all Polymarket endpoints
  • Added 5 new endpoint classes: Orderbook, Activity, MarketPrice, Wallet, and WalletProfitAndLoss
  • Refactored existing endpoints (Markets, Candlesticks, TradeHistory) to use the Listable module

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.

@bougyman bougyman merged commit d6deb3e into main Jan 4, 2026
6 checks passed
@bougyman bougyman deleted the make-markets-match-candlesticks branch January 4, 2026 18:10
This was referenced Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants