Skip to content

feat: add CLOB_HOST constant (#30) - #35

Open
MackDing wants to merge 3 commits into
Polymarket:mainfrom
MackDing:feat/host-constant
Open

feat: add CLOB_HOST constant (#30)#35
MackDing wants to merge 3 commits into
Polymarket:mainfrom
MackDing:feat/host-constant

Conversation

@MackDing

@MackDing MackDing commented Apr 29, 2026

Copy link
Copy Markdown

Closes #30

Adds CLOB_HOST = "https://clob.polymarket.com" to py_clob_client_v2/constants.py and re-exports it from the top-level package so users can do from py_clob_client_v2 import CLOB_HOST rather than redefining their own.

Verification

$ python -c 'import importlib.util; spec=importlib.util.spec_from_file_location("c","py_clob_client_v2/constants.py"); m=importlib.util.module_from_spec(spec); spec.loader.exec_module(m); print(m.CLOB_HOST)'
https://clob.polymarket.com

Files changed

  • py_clob_client_v2/constants.py — define CLOB_HOST
  • py_clob_client_v2/__init__.py — re-export and add to __all__

Note

Low Risk
Additive constant and public export only; no runtime or API behavior changes.

Overview
Adds a shared CLOB_HOST (https://clob.polymarket.com) in constants.py and re-exports it from py_clob_client_v2 so callers can import the official CLOB base URL instead of duplicating it locally.

No client or request behavior changes—only a new public constant.

Reviewed by Cursor Bugbot for commit 8ee30d6. Bugbot is set up for automated code reviews on this repo. Configure here.

@MackDing

Copy link
Copy Markdown
Author

Quick follow-up: I merged the latest main into this branch and resolved the export conflict in py_clob_client_v2/__init__.py. I verified the touched module with python3 -m py_compile py_clob_client_v2/__init__.py; full pytest could not be run locally because poly_eip712_structs==0.0.1 was not resolvable from PyPI in this environment. From my side the remaining blocker appears to be maintainer review.

@MackDing

Copy link
Copy Markdown
Author

Checking in on this PR. It is still open and appears to be waiting on maintainer review.

I am happy to adjust the scope or add verification details if that would make review easier.

@MackDing

MackDing commented Aug 6, 2026

Copy link
Copy Markdown
Author

Refreshed this PR against the current main with a non-rewriting merge commit.

Verification on the merged tree:

  • python -m pytest -q: 227 passed
  • top-level import check: from py_clob_client_v2 import CLOB_HOST
  • verified CLOB_HOST == https://clob.polymarket.com

The final PR diff remains limited to defining CLOB_HOST in constants.py and re-exporting it from __init__.py. PR #80 was also closed by its author in favor of this earlier contribution.

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.

Consider adding constant for CLOB host

2 participants