fix: use CLOB_HOST constant in examples (#27)#29
Open
MackDing wants to merge 1 commit intoPolymarket:mainfrom
Open
fix: use CLOB_HOST constant in examples (#27)#29MackDing wants to merge 1 commit intoPolymarket:mainfrom
MackDing wants to merge 1 commit intoPolymarket:mainfrom
Conversation
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.
Fixes #27.
The examples hardcoded
https://clob-v2.polymarket.com, but per the v2 migration docs (https://docs.polymarket.com/v2-migration), as of April 28 2026 the CLOB endpoint ishttps://clob.polymarket.com.This PR:
pub const CLOB_HOST: &str = "https://clob.polymarket.com";insrc/lib.rs.examples/clob/**to import and useCLOB_HOSTrather than the stale literal.cargo check --examples --all-featurespasses locally.Note
Low Risk
Only changes example default URLs and introduces a new public constant; no core client logic or request/response handling is modified.
Overview
Updates the CLOB Rust examples to stop hardcoding the legacy
https://clob-v2.polymarket.comendpoint and instead default to a sharedCLOB_HOSTconstant (while still allowing override viaCLOB_API_URL).Adds
pub const CLOB_HOST: &str = "https://clob.polymarket.com";tosrc/lib.rsand switches allexamples/clob/**client construction to reference it for consistency with the v2 migration docs.Reviewed by Cursor Bugbot for commit 6364c9a. Bugbot is set up for automated code reviews on this repo. Configure here.