0.2.0 - 2026-07-25
Added
PolymarketClob.Order.Payload.post_body/2— converts a signed order (builder output) into the exactPOST /orderrequest body the official Python v2 client sends (orderwrapper,orderType,owner,deferExec,postOnly; side0/1 → "BUY"/"SELL", salt string → integer). Pinned byte-identical against thepost_bodyentries intest/fixtures/parity/orders.json. This closes the last gap in the local order pipeline: build → sign → payload → post.
Fixed
- Order salt bounded to 48 bits (
Order.Builder). Full 64-bit random salts (values > 2^63) intermittently broke the CLOB signature check: the exchange parses the POSTed salt as a limited-precision JSON integer, so any value above the JS/JSON safe-integer range (2^53) is silently rounded — the exchange then hashes a different salt than the one that was signed, and the signature no longer matches. Result: ~70% of otherwise-valid orders rejected with"Invalid order payload". Salt is now drawn from 48 bits (< 2^53), which serializes losslessly and stays collision-astronomically-safe at any real order volume.
0.1.0
- Initial package skeleton.
- Added parity-fixture-backed CLOB authentication and order-signing primitives.