docs: migrate Polymarket skill docs to CLOB V2 - #1
Open
wtfsayo wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Polymarket integration skill documentation to reflect CLOB V2 semantics, SDKs, and collateral/contracts so agents and developers follow the post-migration integration path.
Changes:
- Migrates trading/auth examples to
@polymarket/clob-client-v2/py-clob-client-v2, and updates order semantics (fees, builder attribution, signing fields). - Updates collateral and onchain references from USDC.e → pUSD, including exchange/CTF/relayer/bridge contract addresses.
- Refreshes market data guidance (keyset pagination, V2 market info/fees) and relayer (gasless) authentication guidance.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| order-patterns.md | Updates order types/examples and V2-specific signing/builder/collateral notes. |
| market-data.md | Updates data source overview, keyset pagination guidance, and V2 CLOB read patterns (incl. market info/fees). |
| gasless.md | Updates relayer auth/client setup and contract references for pUSD + V2 flows. |
| ctf-operations.md | Updates split/merge/redeem explanations and addresses for pUSD-collateralized positions. |
| bridge.md | Updates bridge narrative/examples to align with pUSD as trading collateral. |
| authentication.md | Clarifies V2 auth stability and replaces builder-header attribution with builderCode guidance; documents raw signing deltas. |
| SKILL.md | Updates skill entrypoint quick-reference for V2 endpoints/contracts and migration notes. |
| README.md | Updates repo-level overview and quick start to V2 packages, options-object constructors, and pUSD/builderCode concepts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The V2 docs update was directionally correct, but it flattened some of the original skill-manual structure and left a few migration-guide mismatches in place. This commit restores the progressive-disclosure/reference style while keeping the content aligned to Polymarket's V2 documentation. It also fixes snippet-level issues called out by review and by source validation: the `getLastTradePrices()` batch method name, missing snippet imports, and clarification that `userUSDCBalance` remains the documented SDK field name even though V2 trading collateral is pUSD. Constraint: Scope limited to documentation updates on the existing V2 migration branch Rejected: Revert to pre-migration docs structure wholesale | would reintroduce V1 guidance Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the original skill-doc reference density unless a source-backed change requires simplification Tested: Source validation against docs.polymarket.com/v2-migration.md and docs.polymarket.com/llms.txt; manual diff review Not-tested: Runtime execution of SDK snippets against installed Polymarket client packages Related: Polymarket#1
|
Hi, any update on this PR? I'm looking forward to the V2 documentation updates. Thanks |
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.
What this changes
This PR updates the Polymarket skill docs from V1-era guidance to CLOB V2.
It focuses only on migration-relevant documentation and aligns the skill with the current Polymarket docs index and migration guide.
Included updates
CLOB V2 client + order model
@polymarket/clob-client-v2py-clob-client-v2nonce,feeRateBps,takertimestamp,metadata,builder,builderCodegetClobMarketInfo()for fee parametersuserUSDCBalancehelper field as legacy naming for available pUSD collateral inputContracts + collateral
Builder + relayer flows
POLY_BUILDER_*headers for normal CLOB tradingbuilderCodeMarket data guidance
getClobMarketInfo()usage/events/keyset/markets/keysetgetLastTradePrices()naming and missing enum imports in examplesDocumentation shape preservation
authentication.md,market-data.md, andorder-patterns.mdwhile updating them to current V2 guidanceFiles updated
SKILL.mdREADME.mdauthentication.mdmarket-data.mdctf-operations.mdbridge.mdorder-patterns.mdgasless.mdValidation
Checked against:
Scope / non-goals
Note
Low Risk
Low risk: documentation-only updates, but they change critical integration guidance (auth, collateral, contracts), so inaccuracies could mislead integrators.
Overview
Updates all skill docs to CLOB V2 guidance: switches SDK references to
@polymarket/clob-client-v2/py-clob-client-v2, updates client constructor examples, and documents V2 order signing changes (fees no longer embedded; new signed-order fields;builderCodeattribution instead ofPOLY_BUILDER_*headers).Refreshes operational docs for V2 reality: trading collateral moves to pUSD, exchange/bridge/CTF/relayer contract addresses are updated to V2, relayer docs pivot to Relayer API Keys, and market data guidance adds
getClobMarketInfo()plus Gamma keyset pagination endpoints.Reviewed by Cursor Bugbot for commit 1e72f12. Bugbot is set up for automated code reviews on this repo. Configure here.