upgrade: migrate to Polymarket CLOB v2 (py-clob-client-v2)#3
Open
belalangeth wants to merge 1 commit into
Open
upgrade: migrate to Polymarket CLOB v2 (py-clob-client-v2)#3belalangeth wants to merge 1 commit into
belalangeth wants to merge 1 commit into
Conversation
belalangeth
commented
May 7, 2026
- Swap dependency from py-clob-client to py-clob-client-v2>=1.0.0
- Update all imports: py_clob_client -> py_clob_client_v2, add OrderPayload
- Rename create_or_derive_api_creds() -> create_or_derive_api_key() (v2 rename)
- Switch cancel() -> cancel_order(OrderPayload(orderID=...)) (v2 API change)
- Add defensive dual-key lookup for post_order response (orderID|transactionID)
- Add pUSD fallback key for get_balance_allowance response
- Add heartbeat thread (8s interval) — CLOB v2 cancels GTC orders after 10s without heartbeat
- Move CLOB host to CLOB_HOST env var (defaults to clob.polymarket.com)
- Add Executor.shutdown() to cleanly stop heartbeat on SIGINT/SIGTERM
- Bump version string v13 -> v14
- Swap dependency from py-clob-client to py-clob-client-v2>=1.0.0 - Update all imports: py_clob_client -> py_clob_client_v2, add OrderPayload - Rename create_or_derive_api_creds() -> create_or_derive_api_key() (v2 rename) - Switch cancel() -> cancel_order(OrderPayload(orderID=...)) (v2 API change) - Add defensive dual-key lookup for post_order response (orderID|transactionID) - Add pUSD fallback key for get_balance_allowance response - Add heartbeat thread (8s interval) — CLOB v2 cancels GTC orders after 10s without heartbeat - Move CLOB host to CLOB_HOST env var (defaults to clob.polymarket.com) - Add Executor.shutdown() to cleanly stop heartbeat on SIGINT/SIGTERM - Bump version string v13 -> v14 https://claude.ai/code/session_01Q44UhjnuFKdw6JMGfee8pa
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.