Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.
This repository was archived by the owner on May 25, 2026. It is now read-only.

order_version_mismatch on every order placement (SIGNATURE_TYPE=1, v0.34.6) starting ~Apr 27 #336

Description

@devglobalxxx

order_version_mismatch on every order placement (SIGNATURE_TYPE=1, v0.34.6)

Summary

Starting around 2026-04-27/28, every post_order call from a SIGNATURE_TYPE=1 (Polymarket Proxy) account is rejected by the CLOB API with:

PolyApiException[status_code=400, error_message={'error': 'order_version_mismatch'}]

Identical code and config placed orders successfully on 2026-04-26. The SDK main branch is already at the published v0.34.6 tag, so I can't pull a fresh fix from GitHub.

Environment

  • py_clob_client==0.34.6 (latest on PyPI; GitHub main matches)
  • Python 3.14
  • macOS 14, on Polygon mainnet (chainId 137)
  • Wallet: SIGNATURE_TYPE=1 (Polymarket Proxy, email/Magic-derived)
  • USDC.e allowance verified on-chain against all three exchange contracts:
    • CTF Exchange 0x4bFb41d5...82E — max-uint set ✅
    • NegRisk Exchange 0xC5d563A3...80a — max-uint set ✅
    • NegRisk Adapter 0xd91E80cF...296 — max-uint set ✅
  • client.get_api_keys() returns OK (auth fine)

Reproduction

from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds, OrderArgs, OrderType, PartialCreateOrderOptions
from py_clob_client.order_builder.constants import BUY

creds = ApiCreds(api_key=..., api_secret=..., api_passphrase=...)
client = ClobClient(
    "https://clob.polymarket.com",
    key=PK, chain_id=137,
    signature_type=1,                 # POLY_PROXY
    funder=PROXY_ADDR,
    creds=creds,
)

# Any active binary market with negRisk=False, tick=0.01:
args = OrderArgs(token_id=<token>, price=0.92, size=5, side=BUY)
opts = PartialCreateOrderOptions(neg_risk=False, tick_size="0.01")
signed = client.create_order(args, options=opts)   # ← signs locally, no error
client.post_order(signed, OrderType.GTC)           # ← raises order_version_mismatch

Tested with neg_risk=True/False, with and without PartialCreateOrderOptions, and across multiple markets and tick sizes — all reject with the same error. Local signing always succeeds; only the server rejects.

Expected

Order accepted, returns an orderID.

Actual

PolyApiException[status_code=400, error_message={'error': 'order_version_mismatch'}]

Hypothesis

py_clob_client/signing/eip712.py hardcodes CLOB_VERSION = "1". If Polymarket bumped the EIP-712 domain version on the CLOB server (or deployed a contract upgrade) between Apr 26 and Apr 28, every signature from this SDK release will mismatch the new expected version. The same broken state likely affects every published 0.34.x release.

Asks

  1. Can you confirm whether the EIP-712 domain version or order schema changed recently?
  2. Is a SDK release with the updated version planned, or is there a workaround for SIGNATURE_TYPE=1 accounts in the meantime?

Happy to provide additional diagnostics — order payload dump, signature bytes, RPC traces, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions