Skip to content

feat: adds the rest of the polymarket endpoints - #2

Merged
bougyman merged 15 commits into
mainfrom
make-markets-match-candlesticks
Jan 4, 2026
Merged

feat: adds the rest of the polymarket endpoints#2
bougyman merged 15 commits into
mainfrom
make-markets-match-candlesticks

Conversation

@bougyman

Copy link
Copy Markdown
Member
  • feat: adds Orderbook endpoint
  • refactor: added Listable module to dry up the #list methods
  • feat: adds the rest of the polymarket endpoints

CopilotAI review requested due to automatic review settings January 4, 2026 15:56

CopilotAI left a comment

Copy link
Copy Markdown

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
FileDescription
lib/domeapi/polymarket/listable.rbNew shared module that provides common list method implementation for all endpoints
lib/domeapi/polymarket/orderbook.rbNew endpoint for fetching orderbook history with filtering support
lib/domeapi/polymarket/activity.rbNew endpoint for fetching user activity data
lib/domeapi/polymarket/market_price.rbNew endpoint for fetching current or historical market prices
lib/domeapi/polymarket/wallet.rbNew endpoint for wallet data with eoa/proxy validation
lib/domeapi/polymarket/wallet_profit_and_loss.rbNew endpoint for wallet profit and loss data with granularity support
lib/domeapi/polymarket/client.rbAdded accessor methods for all new endpoints
lib/domeapi/polymarket/markets.rbRefactored to use Listable module, removing duplicate list method
lib/domeapi/polymarket/candlesticks.rbRefactored to use Listable module, removing duplicate list method
lib/domeapi/polymarket/trade_history.rbRefactored to use Listable module, removing duplicate list method
lib/domeapi/polymarket.rbAdded require statements for all new endpoint classes
lib/domeapi/client.rbChanged polymarket client initialization from self to clone to prevent prefix modification side effects
test/domeapi/polymarket/*_test.rbComprehensive test coverage for all new endpoints with validation testing
test/helper.rbAdded minitest/spec and shoulda/context dependencies
GemfileAdded shoulda-context and simplecov gems
Readme.adocAdded documentation example for Orderbook endpoint usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadtest/helper.rb Outdated
Comment threadlib/domeapi/polymarket/orderbook.rb Outdated
Comment threadlib/domeapi/polymarket/orderbook.rb Outdated
Comment threadlib/domeapi/polymarket/trade_history.rb Outdated
Comment threadlib/domeapi/polymarket/orderbook.rb Outdated
Comment threadlib/domeapi/polymarket/markets.rb Outdated
Comment threadtest/helper.rb
@bougyman
bougyman merged commit d6deb3e into mainJan 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 freeto 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

@bougyman