Wallets, keys and API credentials for Polymarket bots: what a bot needs, and how to give it nothing more

The four Polymarket wallet types, the difference between a signer key and L2 API credentials, what each one lets a bot do (and what it can't — API keys can't withdraw, but they can sell you out of positions), the approvals every account carries, and a setup that keeps a bot from ever touching more than it trades.

By the POLBOTS editorPublished Aug 21, 20264 min read
On this page7 sections

The pieces, and what each one can do

People say "give the bot your API key" as if there were one thing. There are four, and they differ enormously in what they permit.

CredentialWhat it isWhat it lets a holder do
Signer private keyThe key that controls your account walletSign orders; authorise wallet operations — which, for smart wallets via the relayer, includes moving funds
L2 API credentialsAPI key, secret and passphrase issued by the CLOB against a signature from your signerPlace and cancel orders; read your orders and trades; subscribe to your user WebSocket channel
Builder and relayer API keysKeys created in Settings for routing orders / gasless wallet operationsAttribute volume; submit gasless batches for the account
Token approvalsStanding permissions on PolygonLet the exchange contracts move pUSD and outcome shares when orders match

The important asymmetry: L2 credentials cannot withdraw — they have no way to move collateral out. They can, however, sell every position you hold into the book at the worst bid, or buy a worthless outcome with your whole balance, which for practical purposes is a withdrawal into someone else's wallet. And the signer key can do everything. A bot needs, at most, L2 credentials plus — to sign orders — a signer for a wallet you have deliberately kept small.

The four wallet types

TypeCodeWho has itGas
Deposit Wallet3Every account created since 4 May 2026; recommended for botsGasless via relayer
Proxy wallet1Older accounts made with Magic Link or Google sign-inGasless via relayer
Safe wallet2Older accounts made with MetaMask, Rabby and similarGasless via relayer
EOA0Accounts trading straight from a plain wallet; needs allowlistingPays POL

The unified SDKs work out which type an account is from the wallet address and signer, and sign accordingly; older libraries made you pass a signature type by hand, and getting it wrong was a classic first-day failure. For a new bot, a Deposit Wallet is the path of least resistance: the SDK can create one, it needs no gas, and it is a clean, separate account from whatever you trade by hand.

How credentials are made

  1. Your signer signs an EIP-712 attestation (L1) that it controls the wallet. Once.
  2. The CLOB issues L2 credentials against it — create with POST /auth/api-key, recover with GET /auth/derive-api-key — and every trading request thereafter carries headers HMAC-signed with the L2 secret.
  3. The account needs standing approvals before it can trade: pUSD approved to both the standard and the negative-risk exchange contracts, and the conditional tokens approved for both. The SDK and relayer handle this for smart wallets; an EOA does it on-chain with its own gas.

Revocation is the mirror image: delete the API key, empty the wallet, and — if the account is done — revoke the approvals.

A setup that gives a bot only what it trades

  • One account per bot, created for it, funded with the bot's working capital and nothing else. Profits are swept out on a schedule; the bot never sees your main stack.
  • Secrets live on the server, in environment variables or a secrets manager — never in the repository, never in a chat, never in a form on a website. Polymarket's own docs say the same of builder and relayer keys: server only, never exposed.
  • Read-only tools get nothing. A wallet tracker, an alert bot, an analytics dashboard needs no credential of yours — the data is public. If a read-only tool asks for a key, ask why.
  • Know what you handed over. If it was L2 credentials only, the blast radius is your open positions and balance on that account. If it was the signer key, the blast radius is the account. Treat a key that was ever on someone else's server as theirs.
  • Rotate on change. New vendor, new version, a contractor who left — new credentials.
  • Watch the wallet, not the dashboard. The wallet's positions and fills are public on Polygon and through the Data API; an independent tracker on your own bot's wallet is the cheapest audit there is.

Hosted bots and Telegram: assume custodial

A bot that runs on a vendor's server with your credentials is, whatever its landing page says, holding signing power over a wallet. The least bad design uses credentials you created, for a wallet you control, and shows you the address so you can watch it. The worst has you deposit to an address the vendor owns. Either way the rule is the same: the wallet holds what you are actively trading and is refilled as needed. The Telegram guide and the scam checklist cover the patterns.

Self-hosted bots: what to look for in the code

Bots that ship source — PolymTradeBot, Uruguabot, the open-source 15-minute bot — let you check the one thing that matters before you fund them: where the key is loaded and where it goes. Read the code that handles credentials first. It should read them from the environment, use them to sign, and send nothing but orders to Polymarket. Uruguabot's listing makes the point explicitly — no licence server, no telemetry — and that is the standard to hold everything to.

A checklist

  1. Dedicated account, Deposit Wallet, funded only with working capital.
  2. Signer key and L2 credentials in environment variables on the bot's server.
  3. Approvals set once; revoked when the account retires.
  4. Read-only tools: no credentials at all.
  5. Hosted or Telegram bots: small wallet, refilled, watched on-chain.
  6. Rotate on any change; treat exposed keys as lost.
  7. Sweep profits out; never let the bot account become the main account.

Frequently asked questions

Can a bot with my API key withdraw my funds?
Not with the L2 API credentials alone — they place and cancel orders and read your orders and trades. But an order is enough to hurt you: credentials can sell your positions into a thin book at any price, or buy something worthless. And a bot that also holds the signer key for a smart-wallet account can authorise relayer operations that do move funds. Assume the worst a credential can do, and size the wallet accordingly.
What is a Deposit Wallet?
The smart wallet Polymarket gives every account created since 4 May 2026 — the default for new users and the recommended type for bots. The SDK can deploy it for you, it executes gaslessly through Polymarket's relayer, and it is controlled by your signer key. Older accounts have a proxy wallet (Magic Link or Google sign-in) or a Safe (MetaMask and similar).
Do I need POL for gas?
Only if your account is a plain externally-owned wallet (type 0), which also needs allowlisting. Deposit, proxy and Safe wallets batch their contract calls through the relayer and pay no gas. For a bot, a Deposit Wallet is simpler, cheaper and safer than an EOA.
How do I revoke a bot's access?
Three layers, in order: revoke the L2 API key (DELETE on the API-key endpoint, or from the site), move funds out of the wallet it could sign for, and revoke the token approvals if the account is retired. Rotate the signer key if it was ever exposed — a key that was on someone else's server is not yours any more.

Bots mentioned in this guide

Browse the catalog
PolymTradeBot preview

PolymTradeBot

Editor's Choice
Crypto Markets

Automated Python bot for Polymarket's 5- and 15-minute Bitcoin & Ethereum up/down markets. Trades live or in paper mode with configurable risk controls, self-hosted from full source.

Bot
one-time
Uruguabot preview

Uruguabot

Verified Partner
Crypto Markets

Self-hosted Python bot for Polymarket's 5-minute BTC and ETH up/down markets, sold with its complete live trading record — losses included. A free GitHub repo publishes every fill from two generations of testing plus a 1,934-window study in which every automated signal scored roughly coin-flip against the human's 59%; the published numbers reproduce exactly from the raw CSVs, though the logs omit market ids, so the record is self-attested rather than on-chain verifiable. Both generations together lost about $270 — mostly execution and a since-fixed ghost-fill bug — while the configuration that ships as default closed its live run at +7.3% ROI on a 40% win rate over a small 25-trade sample: momentum entries, stop re-anchored to execution price minus 10¢, winners held to binary resolution. Dry-run is the default, with fills simulated from slippage measured on real trades; live mode takes two explicit flags and a dedicated wallet.

Bot
one-time
BTC 15-Min Bot
Open source · GitHub

BTC 15-Min Bot

Crypto Markets

Open-source Python bot for Polymarket's 15-minute Bitcoin up/down markets. A 7-phase engine fuses spike detection, Fear & Greed sentiment and cross-exchange divergence via weighted voting. Runs live or in paper mode with Grafana dashboards.

Bot
open-source