Polymarket Session Keys: Secure Bot Trading Without Exposing Wallets (2026)
Session keys on Polymarket follow one design goal: a compromised bot should risk a scoped, revocable account — never your treasury. The pattern separates the main EOA (identity, cold storage), the proxy wallet (collateral holder), and the proxy key (the session key that signs trades and authenticates API reads). On perps, the account keys off the EOA even while the proxy secret handles day-to-day signing.
What are the three keys?
| Key | Role | Where it lives | If leaked |
|---|---|---|---|
| Main EOA key | Identity; signs create-proxy once | Cold storage | Account control — worst case |
| Proxy address | Holds collateral, receives fills | On-chain | Nothing (it’s an address) |
| Proxy key/secret | Signs orders; authenticates REST/WS reads | Bot server | That account’s working capital |
The session key is the proxy credential. It can be rotated, and its blast radius is the collateral in that one proxy account.
How does this work in practice?
Spot (CLOB):
client = ClobClient(
host="https://clob.polymarket.com",
key=PROXY_PRIVATE_KEY, # session key
chain_id=137,
signature_type=1, # Polymarket proxy
funder=PROXY_ADDRESS, # collateral source
)
Perps: your EOA signs the one-time createProxy; the returned proxy address
and secret authenticate private REST and WebSocket reads. The perps account itself
is keyed by the EOA base address — not a Safe address, even if you use Safe
elsewhere on Polymarket.
What does a good session-key hygiene checklist look like?
- One proxy per bot — dev, test, and prod each get their own; no shared signing identity across environments
- Environment variables over files —
chmod 600env files, nothing in git - Fund bots with working capital only — the treasury stays behind the main EOA; top up proxies deliberately
- Rotate on schedule and on suspicion — a fresh proxy credential takes minutes to deploy; an unrotated leaked key takes your account
- Fresh timestamps always — signed requests need current
tsandsalt; sync clocks (GET /v1/info/time) or face intermittent rejections - Separate read and write scopes mentally — public market data needs no key at all; keep authenticated surfaces minimal
How does this compare to a CEX API key?
Familiar shape (key + secret, scoped access), different trust root: Polymarket session keys derive from your own wallet signature rather than a company’s database, and order validity is enforced by signature at the protocol level. The practical consequences: no “IP whitelist” theater to lean on, rotation is self-service, and the collateral separation (proxy holds funds, key signs) does the work a CEX sub-account would.
What are the failure modes to design against?
| Failure | Consequence | Mitigation |
|---|---|---|
| Proxy key leaked via logs | Working capital at risk | Log scrubbing; rotation runbook |
| Clock drift | Random signature rejections | NTP + time-endpoint sync |
| Key committed to git | Immediate compromise | Pre-commit hooks; env-only config |
| Shared key across bots | One bug drains both | One proxy per bot, always |
| Stale reconnect auth | Bot goes silent | Re-derive credentials, don’t retry dead sessions |
FAQ
Q: What is a session key on Polymarket? A: The proxy wallet’s signing credential — a scoped key that trades and authenticates without exposing your main EOA. Rotatable, per-bot, and collateral- limited in blast radius.
Q: Does my main wallet key ever touch the bot server? A: No. The EOA signs the one-time proxy creation (ideally cold) and never appears in daily bot traffic.
Q: Why is my perps account keyed by my EOA? A: By design — perps balances, positions, and history track the EOA base address even when a Safe wallet is used elsewhere on Polymarket. Support requests and API lookups use the EOA.
Q: How do I rotate a compromised session key? A: Create/re-derive a new proxy credential, redeploy the bot with it, and move remaining collateral if needed. The old key’s scope ends with its proxy account.
Q: Can one key run multiple bots? A: Technically yes, practically no — shared keys collapse your rate-limit tier into one bucket and entangle failures. One proxy per bot.
Sources
Disclaimer
Not financial advice. Educational purposes only. Updated October 2026.