Skip to content
5-MINUTE

Polymarket US 5-minute Bitcoin, every window live

5-minute board · results

FED DESK

Kalshi vs Polymarket vs futures on the next FOMC decision

Fed Rate Tracker · live

15-MINUTE

Every Kalshi 15-minute window, priced against the late-flip risk

Bitcoin · gold · silver · oil

MIDTERMS

Every 2026 race priced on Kalshi and Polymarket

Senate · House · governors

COMBO EDGE

Correlation-aware Kalshi combos — free

Polymarket US Trading Bot Setup: API Keys, Ed25519 Signing and a Copy-Paste AI Prompt

How to connect a trading bot to Polymarket US: get API keys from the developer page, sign requests with Ed25519, build the bot with a copy-paste AI prompt, and fund it with hard caps.

Share
Polymarket US API setup card: three gold nodes labeled ingest, math and trade, above a data strip reading developer key, Ed25519 signing, dry-run and the PMP Bot Playbook.
Polymarket US API setup card: three gold nodes labeled ingest, math and trade, above a data strip reading developer key, Ed25519 signing, dry-run and the PMP Bot Playbook.
FSWA Award Winner · Published Author · Ran 4Deep Sports · Led FTN Marketing · Traded Bonds on Wall Street
December 2, 2026

Paid partnership with Polymarket.

Sponsored by Polymarket US

18+ Only. Restrictions and eligibility requirements apply. Not available in all jurisdictions. Trading is risky. 100% loss can occur. See https://polymarketexchange.com/files/legal/Polymarket%20US%20Rulebook%20(2026.09.30).pdf for more information. The Polymarket US App serves as an independent software provider and affiliate of Polymarket US and Polymarket Clearing, the CFTC-regulated exchange and clearing organization.

Polymarket US has a real retail API: developer keys, signed REST, live WebSockets and an official SDK. Here's how to connect a bot to it, build it with AI, and fund it with a hard ceiling on what it can lose.

New to the overall setup? Read the prediction market bot overview first.

Step 1: connect your Polymarket US account

Open an account in the Polymarket US app. New users get a $25 trading bonus when they deposit $10 with code PMP. The code has to go in at sign-up; it can't be added later. Finish KYC, because API keys only unlock after it.

Create your API keys. Once you're verified, go to the developer page at polymarket.us/developer and create a key. You get a Key ID and a Secret Key (base64). Store the secret like a password: a password manager or a file outside your code folder, read by an environment variable. Never paste it into a chat or a repo.

How signing works, so the code the AI writes makes sense to you:

HeaderWhat goes in it
X-PM-Access-KeyYour Key ID
X-PM-TimestampThe current time in milliseconds
X-PM-SignatureBase64 Ed25519 signature over timestamp + METHOD + path

The pieces you'll use:

  • REST base: https://api.polymarket.us
  • Market data stream: wss://api.polymarket.us/v1/ws/markets
  • Your orders, positions and balance stream: wss://api.polymarket.us/v1/ws/private
  • Official TypeScript SDK: npm install polymarket-us
  • Docs: docs.polymarket.us (there's also a plain-text index at docs.polymarket.us/llms.txt, which is handy to hand to an AI)

Contracts trade in one-cent ticks from $0.01 to $0.99 and pay $1. There's a weekly maintenance window on Thursdays, 6:00 to 8:00 AM ET. Build the bot to pause through it.

Step 2: build the bot with AI

Paste this into Claude or ChatGPT, then fill in the market and your rule.

You are a senior engineer helping me build a small, safe trading bot for Polymarket US
(the US exchange; never Polymarket.com, and no VPNs or proxies).

API facts:
- REST base: https://api.polymarket.us
- Docs: https://docs.polymarket.us (index: https://docs.polymarket.us/llms.txt)
- Official TypeScript SDK: npm package "polymarket-us". Prefer it where it covers a call.
- Auth headers: X-PM-Access-Key (Key ID), X-PM-Timestamp (ms),
  X-PM-Signature = base64 Ed25519 signature over timestamp + METHOD + path.
  The Secret Key is base64. Read PMUS_KEY_ID and PMUS_SECRET_PATH from environment
  variables. Never print or log the secret. Never ask me to paste it here.
- WebSockets: wss://api.polymarket.us/v1/ws/markets (market data) and
  wss://api.polymarket.us/v1/ws/private (orders, positions, balance), both signed.
- Weekly maintenance: Thursday 6:00-8:00 AM ET. Pause, don't error.

Market: [e.g. Bitcoin 15-minute up/down windows].
Rule: [YOUR RULE IN ONE OR TWO SENTENCES].

Build:
1. Node 24, TypeScript. No axios.
2. ingest.ts: subscribe to the market stream, keep a fresh order book,
   and refuse to act on a book older than [N] seconds.
3. decide.ts: apply my rule, return side, limit price and size.
4. execute.ts: place limit orders, track them on the private stream,
   cancel anything still resting at window close.
5. Rails in config.json: max dollars per position, max open positions,
   daily loss stop, and a KILL file that halts all trading.
6. DRY_RUN=true by default. Log every decision and every skip, with a reason, to CSV.
7. Reconnect with backoff. Stale data = no trade.
8. If you are unsure of an endpoint or field, say so and tell me which page of
   docs.polymarket.us to check. Do not invent endpoints.

List the files first, then write them one at a time, then give me a dry-run test plan.

Before arming it, have the AI explain execute.ts back to you line by line and write tests for every rail. Fees decide whether a small edge survives; we ran the numbers on a common idea in the Polymarket US 5-minute fee math.

Step 3: fund it and fence it

Deposit in the Polymarket US app. Then put the fence in code, because the API key can trade whatever the account holds:

  • A max per position and a max number of open positions.
  • A daily loss stop that halts the bot until tomorrow.
  • A lifetime stop and a kill switch: one file or flag that stops everything.
  • Keep the account balance to what the bot may lose. Leave the rest off the exchange.

Then dry-run against live prices, and arm at minimum size only once the log reads like your own judgment.

Step 4: the data to build on

The boards below are information, not trade calls. They show what the market priced and how each window settled:

Want to see how a full bot stack is wired? The Bot Playbook is the build sheet for our three-machine setup: a server that ingests prices, an engine that does the math, and a bot that places only what the math recommends. Get it with Pro →

Other venues: Kalshi · Novig · ProphetX

18+ Only. Restrictions and eligibility requirements apply. Not available in all jurisdictions. Trading is risky. 100% loss can occur. See https://polymarketexchange.com/files/legal/Polymarket%20US%20Rulebook%20(2026.09.30).pdf for more information. The Polymarket US App serves as an independent software provider and affiliate of Polymarket US and Polymarket Clearing, the CFTC-regulated exchange and clearing organization.

Share

Polymarket US Trading Bot Setup: API Keys, Ed25519 Signing and a Copy-Paste AI Prompt — frequently asked

Does Polymarket US have an API?

Yes. Polymarket US offers a retail trading API: you create API keys on its developer page after KYC, sign REST requests with Ed25519, and can stream market data and your own orders over authenticated WebSockets. There is also an official TypeScript SDK on npm, published as polymarket-us.

How does Polymarket US API authentication work?

Each request sends X-PM-Access-Key (your Key ID), X-PM-Timestamp in milliseconds, and X-PM-Signature, a base64 Ed25519 signature over the timestamp, the HTTP method and the path.

Is Polymarket US the same as Polymarket.com?

No. Polymarket US is the US exchange with its own app, accounts and API. Polymarket.com is the international site and is not open to US traders. A US bot connects to Polymarket US only.

Are there scheduled outages on Polymarket US?

Yes. Polymarket US lists a weekly maintenance window on Thursdays from 6:00 to 8:00 AM ET. Build your bot to pause through it instead of treating it as an error.

Read Next

Related: Kalshi vs Polymarket US · Is Polymarket US legal?

Pro: Thee Oracle — the three markets worth watching right now· $111 your first year →

Prediction-market edges, weekly. The only newsletter built for Kalshi & Polymarket traders.

No spam. Unsubscribe anytime.

Watch The 7 Oracles make the call. Full breakdowns on YouTube, quick hits on X.

Benny Ricciardi

Founder · The 7 Oracles

Benny Ricciardi is an FSWA Award Winner and published author. He ran 4Deep Sports as CEO, led marketing at FTN Network as CMO, and traded bonds on Wall Street. He founded PredictionMarketsPicks.

Follow @BennyR11 →
polymarket us apipolymarket us trading botpolymarket us api keypolymarket us developerpolymarket us sdkpolymarket bot uspolymarket us 15 minute bitcoin apipolymarket us 5 minute bitcoin api

Want more analysis like this?

Get The 7 Oracles' daily prediction market breakdown — free, no fluff, straight to your inbox.

Get the daily edge in your inbox →