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.
| Credential | What it is | What it lets a holder do |
|---|---|---|
| Signer private key | The key that controls your account wallet | Sign orders; authorise wallet operations — which, for smart wallets via the relayer, includes moving funds |
| L2 API credentials | API key, secret and passphrase issued by the CLOB against a signature from your signer | Place and cancel orders; read your orders and trades; subscribe to your user WebSocket channel |
| Builder and relayer API keys | Keys created in Settings for routing orders / gasless wallet operations | Attribute volume; submit gasless batches for the account |
| Token approvals | Standing permissions on Polygon | Let 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
| Type | Code | Who has it | Gas |
|---|---|---|---|
| Deposit Wallet | 3 | Every account created since 4 May 2026; recommended for bots | Gasless via relayer |
| Proxy wallet | 1 | Older accounts made with Magic Link or Google sign-in | Gasless via relayer |
| Safe wallet | 2 | Older accounts made with MetaMask, Rabby and similar | Gasless via relayer |
| EOA | 0 | Accounts trading straight from a plain wallet; needs allowlisting | Pays 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
- Your signer signs an EIP-712 attestation (L1) that it controls the wallet. Once.
- 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.
- 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
- Dedicated account, Deposit Wallet, funded only with working capital.
- Signer key and L2 credentials in environment variables on the bot's server.
- Approvals set once; revoked when the account retires.
- Read-only tools: no credentials at all.
- Hosted or Telegram bots: small wallet, refilled, watched on-chain.
- Rotate on any change; treat exposed keys as lost.
- 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.

