Polymarket’s CLOB API uses Cloudflare protection that blocks POST requests from many IPs — including datacenter IPs and some residential ISPs. This affects the “sell unwanted tokens” step in every trade, which is where your pUSD split has already succeeded on-chain but the CLOB order cannot be submitted.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deniszidbaev-cmyk/polyclaw-cmyk/llms.txt
Use this file to discover all available pages before exploring further.
When do you need a proxy?
You need a proxy ifpolyclaw buy consistently fails at the CLOB sell step with a message like IP blocked by Cloudflare or an HTTP 403 error. Specifically:
- The
splitPositionstep is an on-chain transaction sent directly to your Chainstack RPC — it is not affected by Cloudflare blocking. - The CLOB sell step is an off-chain POST request to
clob.polymarket.com— this is what Cloudflare blocks. - Any datacenter IP range is blocked. Some residential ISPs are also flagged.
Recommended setup
Get a rotating residential proxy
You need a residential proxy service with a rotating IP feature so that each new request comes from a different IP address. Datacenter proxies will not work — Cloudflare blocks those too.Recommended services:
The rotating feature is essential: each time the CLOB client retries, it creates a fresh HTTP connection that picks up a new residential IP from the proxy pool.
| Service | Endpoint example | Notes |
|---|---|---|
| IPRoyal | geo.iproyal.com:12321 | Rotating residential, pay-as-you-go |
| BrightData | varies | Enterprise-grade |
| Oxylabs | varies | Enterprise-grade |
| Smartproxy | varies | Good residential pool |
Set the environment variables
Export Or set them in your
HTTPS_PROXY and optionally increase CLOB_MAX_RETRIES:openclaw.json under the polyclaw skill’s env block:Test the setup
First verify your wallet is reachable, then attempt a small buy:With the proxy configured, the CLOB client will retry up to
CLOB_MAX_RETRIES times. On each retry a new HTTP client is created, which — thanks to the rotating proxy — requests from a fresh residential IP. The trade typically succeeds within 5–10 attempts.How the retry logic works
The CLOB client inlib/clob_client.py implements the following behavior:
CLOB_MAX_RETRIES(default:5) — maximum number of POST attempts per CLOB order.- On each retry (attempt > 0),
_refresh_http_client()closes the existinghttpx.Clientand creates a new one. With a rotating proxy, the new client’s first request comes from a different residential IP. - A brief 1-second pause is inserted between retries to avoid hammering the endpoint.
- Only Cloudflare 403 errors trigger retries. Other errors — no liquidity at the sell price, malformed orders, authentication failures — cause an immediate failure without retrying.
Alternative workarounds
If you’d rather not set up a proxy, two options let you keep the on-chain split while skipping the CLOB sell: Option 1 — Use--skip-sell
Pass --skip-sell to keep both YES and NO tokens after the split. You can then sell the unwanted side manually on polymarket.com at your convenience:
HTTPS_PROXY format reference
The proxy URL must follow this format:
http:// scheme) as the value of HTTPS_PROXY.
The proxy is only used for CLOB POST requests routed through
httpx. The splitPosition on-chain transaction is submitted via your Chainstack RPC node directly and bypasses HTTPS_PROXY entirely — you don’t need the proxy to be active for on-chain operations.