Pam Trade Readiness Update - 2026-05-30
Current answer
Pam is still not ready for autonomous live trading. It is much closer to manual, tightly guarded order placement.
The immediate Polymarket issue is not a missing key. The configured key and proxy wallet initialize against CLOB v2, and Pam can sign a CLOB v2 order without posting it. The funding issue is that the proxy wallet holds legacy Polygon USDC.e, while current Polymarket CLOB v2 requires pUSD collateral and pUSD exchange allowance.
Verified state
- Full local test suite:
227 passed. - Production canary: pass, with one warning because Polymarket pUSD balance is
0.00. - Kalshi balance:
$318.87. - Polymarket configured signer: masked as
0xA41d...6983. - Polymarket configured proxy/funder: masked as
0x7AA1...FB80. - Polymarket CLOB client version:
v2. - Polymarket CLOB collateral: balance
0, exchange allowances0. - Polygon on-chain proxy balance:
242.851157USDC.e,0.0pUSD,0.0POL. - Polymarket relayer deployment check: proxy appears deployed for both SAFE and WALLET paths.
Post-migration verification - 2026-05-30
After the Polymarket migration, Pam now sees the proxy wallet as funded for CLOB v2:
- Polymarket CLOB collateral:
242.851157pUSD. - Polymarket CLOB allowances: set for the relevant v2 spender addresses.
- Polygon on-chain proxy balance:
242.851157pUSD,0.0USDC.e. - Production canary: pass with usable split, Kalshi
$318.87and Polymarket242.85pUSD. - Sign-only v2 order canary: pass.
- Open Polymarket orders: none at verification time.
Live smoke-test result - 2026-05-30
A user-approved post-only BUY smoke test was attempted for 1 share at $0.01.
Result: Polymarket rejected the order with HTTP 403 before placement: Trading restricted in your region.
Follow-up checks:
- Open Polymarket orders: none.
- Polymarket pUSD balance: unchanged at
242.851157. - Production canary: pass.
- Added a Polymarket geoblock check to the production canary so this is detected before future live-order attempts.
This means Pam’s signing, funding, and allowance path is working, but this execution environment cannot currently place new Polymarket orders because of Polymarket’s geographic restrictions.
Kalshi live smoke test - 2026-05-30
A user-approved Kalshi post-only BUY smoke test was completed:
- Order: BUY YES, 1 contract at
$0.01, post-only, good-till-canceled. - Selected ticker:
KXMVESPORTSMULTIGAMEEXTENDED-S20263304257E40C-9964FC29CC5. - Order id:
37142458-1cb3-452f-9a74-2ac135ea2a64. - Placement result:
fill_count=0.00,remaining_count=1.00, statusresting. - Cancel result:
reduced_by=1.00. - Post-cancel status:
canceled,remaining_count_fp=0.00,fill_count_fp=0.00. - Balance before and after:
$318.87.
Pam can now place, inspect, and cancel a small Kalshi order through the live API path.
Post-test canaries:
- Production canary: pass.
- Polymarket geoblock endpoint after location change:
blocked=false,country=CH,region=ZH. - Full test suite:
229 passed.
Polymarket live smoke retry - 2026-05-30
After the geography change, the same one-share Polymarket smoke test reached the CLOB order endpoint but was rejected before placement because the order size was below Polymarket’s minimum:
- Attempted order: post-only BUY, 1 share at
$0.01. - Result: rejected with
Size (1) lower than the minimum: 5. - Open Polymarket orders after attempt: none.
- Polymarket pUSD balance after attempt: unchanged at
242.851157. - Production canary: pass, with geoblock
blocked=false,country=CH,region=ZH.
The next Polymarket smoke test must use at least 5 shares. At $0.01, maximum risk is $0.05.
Polymarket live smoke test - 2026-05-30
A user-approved Polymarket post-only BUY smoke test was completed:
- Order: BUY YES, 5 shares at
$0.01, post-only, GTC. - Market sample:
New Rihanna Album before GTA VI?. - Token id:
98022490269692409998126496127597032490334070080325855126491859374983463996227. - CLOB order id:
0x0a4f5d65569b6c1b860de0e242ef27d7973112f0b04fe5313492918bf5d2d8f4. - Placement result: status
live, successtrue. - Cancel result: order id returned under
canceled. - Post-cancel status:
CANCELED,size_matched=0. - Open Polymarket orders after cancel: none.
- Polymarket pUSD balance after cancel: unchanged at
242.851157. - Production canary: pass.
Pam can now place, inspect, and cancel a small Polymarket CLOB v2 order through the live API path from the current execution geography.
12-hour five-trade readiness plan - 2026-05-30
Goal: make it operationally possible to place five manually approved trades within the next 12 hours.
Current blockers:
- Pam has no auto-deployable trades. Fresh review still classifies candidates as
review_candidate, notdeployable_trade. - Cross-venue arbitrage scan still found no executable Kalshi/Polymarket arb.
- Most candidate blockers are intentional manual-review blockers: missing allowlist, long time-to-resolution, wide spreads, or price above the configured live threshold.
What is now unblocked:
- Venue connectivity: Kalshi and Polymarket can both place, inspect, and cancel live orders.
- Funding: Kalshi has
$318.87, Polymarket has242.851157pUSD. - Geography: Polymarket geoblock check is currently clear.
- Exposure: Kalshi positions
0, Kalshi open orders0, Polymarket open orders0.
New operator tooling:
tools/build_trade_tickets.py: builds exact manual Kalshi trade tickets from a fresh scan and live order books.tools/kalshi_order_post.py: guarded Kalshi live order CLI withFORCE_DRY_RUN, confirmation phrase, time-in-force, and max-cost cap.tools/kalshi_order_admin.py: inspect/cancel Kalshi orders.
Candidate slate generated from fresh books, using 1 contract each, IOC, current marketable YES limit, and small max-cost caps:
| # | Venue | Ticker | Side | Limit | Max cost | Title |
|---|---|---|---|---|---|---|
| 1 | Kalshi | KXGOVTCUTS-28-750 |
YES | $0.10 |
$0.10 |
Will government spending decrease by 750 before 2028? |
| 2 | Kalshi | KXTRILLIONAIRE-30-MZ |
YES | $0.08 |
$0.08 |
Will Mark Zuckerberg be the world’s first trillionaire? |
| 3 | Kalshi | KXGOVTCUTS-28-2000 |
YES | $0.26 |
$0.26 |
Will government spending decrease by 2000 before 2028? |
| 4 | Kalshi | KXGOVTCUTS-28-500 |
YES | $0.14 |
$0.14 |
Will government spending decrease by 500 before 2028? |
| 5 | Kalshi | KXNEXTUKPM-30-ACAR |
YES | $0.04 |
$0.04 |
Will Al Carns be the next Prime Minister of United Kingdom? |
Total maximum entry cost for this proposed 5-ticket micro-slate: $0.62, before fees/slippage/rejection behavior.
Recommended execution workflow:
- Rerun
python3 tools/production_canary.py. - Rerun
python3 tools/build_trade_tickets.py --count 5 --contracts 1 --max-resolution-days 1500 --max-price 0.30 --max-marketable-price-cents 35 --max-spread-bps 1000 --diversify-titles. - Human explicitly approves the exact generated five-ticket slate.
- Execute one ticket at a time with
tools/kalshi_order_post.py. - After each order, immediately inspect status and balances.
- If any order rests unexpectedly under a non-IOC setting, cancel it before continuing.
- Stop after any API error, partial unexpected behavior, or slate mismatch.
This workflow is suitable for a small manual test slate. It is not yet suitable for unattended automated trading.
Higher-risk $50 cap update - 2026-05-30
User requested increasing total risk to $50.
Updated ticket-builder behavior:
--total-risk-dollars 50sizes tickets toward an equal per-ticket budget.- Ticket size is capped by visible top-of-book ask liquidity, so Pam does not intentionally pay through deeper levels.
--min-ticket-risk-dollarscan reject tickets that cannot absorb enough size at the current top ask.--skip-malformed-titlesexcludes malformed market titles from the live slate.
Current regenerated five-ticket slate, capped by live top-of-book liquidity:
| # | Venue | Ticker | Side | Limit | Contracts | Max cost |
|---|---|---|---|---|---|---|
| 1 | Kalshi | KXNEXTISRAELPM-45JAN01-IKAT |
YES | $0.24 |
37 | $8.88 |
| 2 | Kalshi | KXNEWPOPE-70-PPIZ |
YES | $0.11 |
90 | $9.90 |
| 3 | Kalshi | KXTRILLIONAIRE-30-MZ |
YES | $0.08 |
125 | $10.00 |
| 4 | Kalshi | KXGOVTCUTS-28-2000 |
YES | $0.26 |
38 | $9.88 |
| 5 | Kalshi | KXNEXTISRAELPM-45JAN01-IBEN |
YES | $0.16 |
62 | $9.92 |
Total max cost: $48.58.
Command used:
python3 tools/build_trade_tickets.py \
--count 5 \
--total-risk-dollars 50 \
--min-ticket-risk-dollars 8 \
--max-contracts 250 \
--any-horizon \
--max-price 0.30 \
--max-marketable-price-cents 35 \
--max-spread-bps 1000 \
--diversify-titles \
--skip-malformed-titles
Execution still requires explicit human approval of the exact regenerated slate immediately before placing orders, because prices and visible size can change.
Mixed Kalshi/Polymarket slate update - 2026-05-30
User asked whether the $50 slate included both Kalshi and Polymarket. It did not; it was Kalshi-only. Pam now has mixed-slate tooling:
tools/build_polymarket_tickets.py: builds Polymarket tickets from active CLOB books, sorting bids/asks correctly, respecting tick size, negative-risk flags, minimum order size, visible top ask size, liquidity, volume, spread, and risk caps.tools/build_mixed_trade_tickets.py: combines Kalshi and Polymarket tickets into one manual slate.
Current mixed slate generated from live books:
| # | Venue | Ticker / Market | Side | Limit | Size | Max cost |
|---|---|---|---|---|---|---|
| 1 | Kalshi | KXNEXTISRAELPM-45JAN01-IKAT |
YES | $0.24 |
37 | $8.88 |
| 2 | Kalshi | KXNEWPOPE-70-PPIZ |
YES | $0.11 |
90 | $9.90 |
| 3 | Kalshi | KXTRILLIONAIRE-30-MZ |
YES | $0.08 |
125 | $10.00 |
| 4 | Polymarket | Brazil wins 2026 FIFA World Cup | YES | $0.09 |
111 | $9.99 |
| 5 | Polymarket | England wins 2026 FIFA World Cup | YES | $0.113 |
88 | $9.94 |
Total max cost: $48.71.
Command used:
python3 tools/build_mixed_trade_tickets.py \
--total-risk-dollars 50 \
--kalshi-count 3 \
--polymarket-count 2
Current pre-execution checks:
- Production canary: pass.
- Kalshi open orders: none.
- Polymarket open orders: none.
- Full test suite:
229 passed.
Execution still requires explicit approval of the exact regenerated mixed slate immediately before order placement.
Near-horizon constraint - 2026-05-30
User clarified that future trades should only target near-horizon markets, approximately two months or less. The mixed slate builder now defaults to --max-horizon-days 60.
Because the user manually bought Argentina after the initial replacement failed, future slate generation should exclude Argentina to avoid duplicate exposure. Brazil should also be excluded unless intentionally adding to the already filled Brazil position.
Current near-horizon mixed slate, excluding Argentina and Brazil, generated with:
python3 tools/build_mixed_trade_tickets.py \
--total-risk-dollars 50 \
--kalshi-count 1 \
--polymarket-count 4 \
--max-horizon-days 60 \
--exclude-polymarket-title-contains Argentina \
--exclude-polymarket-title-contains Brazil
Result:
| # | Venue | Market | Side | Limit | Size | Max cost | Expiry |
|---|---|---|---|---|---|---|---|
| 1 | Kalshi | KXAGICO-COMP-26Q2 |
YES | $0.12 |
83 | $9.96 |
Jul 1, 2026 |
| 2 | Polymarket | England wins 2026 FIFA World Cup | YES | $0.113 |
88 | $9.94 |
Jul 20, 2026 |
| 3 | Polymarket | Germany wins 2026 FIFA World Cup | YES | $0.052 |
192 | $9.98 |
Jul 20, 2026 |
| 4 | Polymarket | Portugal wins 2026 FIFA World Cup | YES | $0.101 |
99 | $10.00 |
Jul 20, 2026 |
| 5 | Polymarket | Netherlands wins 2026 FIFA World Cup | YES | $0.041 |
243 | $9.96 |
Jul 20, 2026 |
Total max cost: $49.84.
No orders were placed from this updated near-horizon slate.
What changed in Pam
- Added
py-clob-client-v2==1.0.1while keeping the legacy client as fallback. - Updated
arbitrage/polymarket_api.pyto prefer CLOB v2, derive L2 API credentials, report pUSD balances, refresh collateral status, and create/post v2 orders. - Added
tools/polymarket_funding_diagnostic.pyfor repeatable read-only diagnosis of signer/proxy CLOB collateral, on-chain USDC.e/pUSD/POL balances, and relayer deployment. - Added
tools/polymarket_order_sign_canary.pyto create a signed Polymarket order without posting. - Added
tools/polymarket_order_post.pyas a guarded live-order CLI. It refuses whileFORCE_DRY_RUN=1, requires an exact confirmation phrase, and checks pUSD before BUY orders. - Added
tools/polymarket_order_admin.pyto list open orders, fetch one order, and cancel one order. - Updated
tools/production_canary.pyand balance tests for pUSD.
Polymarket interpretation
Polymarket migrated production CLOB to v2 on April 28, 2026. Official docs say old py-clob-client / CLOB v1 orders no longer work on production and current Python integrations should use py-clob-client-v2. They also say collateral changed from USDC.e to pUSD.
Pam was previously checking a CLOB collateral balance that now needs to be pUSD. The proxy wallet has funds, but they are sitting as USDC.e. That is why Pam reports no spendable Polymarket balance.
The next external step is to convert or deposit the proxy wallet’s USDC.e into pUSD, or otherwise fund the correct Polymarket wallet with pUSD. The official path is Polymarket’s pUSD flow: frontend auto-wrapping for normal users, or API-only wrapping through the Collateral Onramp after approving USDC.e.
Trade placement path
- Keep
FORCE_DRY_RUN=1while diagnosing. - Use
python3 tools/polymarket_funding_diagnostic.pyto confirm where funds sit. - In Polymarket, migrate/wrap/deposit the proxy wallet’s USDC.e into pUSD.
- Re-run
python3 tools/polymarket_funding_diagnostic.py --refresh-clob; expected result is proxy pUSD greater than zero and CLOB collateral greater than zero. - Use
python3 tools/polymarket_order_sign_canary.pyfor a sign-only order check. - For a real Polymarket manual order, use
tools/polymarket_order_post.pyonly after choosing the exact token id, side, price, size, tick size, and negative-risk flag.
Example guarded command shape:
FORCE_DRY_RUN=0 python3 tools/polymarket_order_post.py \
--token-id "<CLOB_TOKEN_ID>" \
--side BUY \
--price 0.01 \
--size 1 \
--tick-size 0.01 \
--confirm LIVE_POLYMARKET_ORDER
Strategy status
Cross-venue Kalshi/Polymarket arbitrage is still present in code, but the latest scans do not show executable cross-venue arb. The practical landing point is still:
- Use Pam for research, scans, candidate review, canaries, and manual trade packets.
- Treat cross-venue arbitrage as research until matching produces stable executable pairs.
- Treat Kalshi-only and Polymarket-only opportunities as manual-review candidates.
- Do not enable autonomous two-leg execution until pUSD funding, order status handling, partial-fill handling, and cancel/unwind flows are tested with small real orders.
Sources
- Polymarket CLOB v2 migration: https://docs.polymarket.com/v2-migration
- Polymarket CLOB trading overview: https://docs.polymarket.com/trading/overview
- Polymarket pUSD collateral: https://docs.polymarket.com/concepts/pusd
- Polymarket create-order docs: https://docs.polymarket.com/trading/orders/create