Skip to main content
potd-trader is a small open-source program that reads the Pick of the Day and buys each pick on your Polymarket account, once, with a stake you set. You run it. 0xinsider never sees your wallet. It is 6 short Python files. Read them before you run them with real money.

What leaves your machine

Your Polymarket private key is read from a local .env file (~/.potd-trader/.env) and used by the official polymarket-client SDK to sign orders inside the process. There is no 0xinsider endpoint that accepts a wallet key, and the program never sends one anywhere.
Anyone who can read ~/.potd-trader/.env can trade from your account. init writes it at mode 600; keep it on a machine you control and never commit it.

What you need

  • Python 3.12 or newer and uv.
  • A 0xinsider Pro API key from 0xinsider.com/developers. The pick endpoint answers a free key with 402.
  • A Polymarket account holding some pUSD. potd-trader status reports whether its trading approvals are set. An account that has traded on polymarket.com usually has them; a fresh wallet does not, and potd-trader setup sets them with a Relayer API key.

One command

init asks 4 questions in your terminal: the 0xinsider key and the Polymarket key are typed with echo off, then the wallet address and the stake. It writes ~/.potd-trader/.env at mode 600, runs status and a dry run, and ends in dry-run mode unless you type the phrase it asks for. About 2 seconds to install; the questions take as long as finding the values. No uv yet? curl -LsSf https://astral.sh/uv/install.sh | sh, or brew install uv. Then, when the dry run shows what you expect:

Set it up with an AI agent

Rather have an agent walk you through it? Paste this into Claude Code, Codex, Cursor, or any agent that reads AGENTS.md. It installs the tool, creates .env, tells you the 3 values to fill in, runs the checks, and stops before anything spends money. It cannot run init for you: the key prompts need your terminal.
The repository’s AGENTS.md holds the rules the agent works under: it never prints or asks for a key, never sets LIVE=yes, and never edits the ledger. Prefer to do it yourself? The steps below are the same ones.

Install by hand

The repository-checkout layout. A .env beside the code takes precedence over ~/.potd-trader/.env.
Fill in 3 values in .env:

Dry run first

status reports the region check, your wallet, its trading approvals, and its pUSD balance. run reads today’s picks and prints what it would buy, with the live book price against the price the pick was published at. Nothing is bought until .env says LIVE=yes. Every other value counts as no. A dry run on a day with a released pick looks like this:

Go live

potd-trader live on (or LIVE=yes in the file by hand) and a small STAKE_USD, then pick one of two modes.
watch follows the schedule the API returns. On a 404 it sleeps until error.retry_at; on a slate with scheduled_picks it sleeps until the earliest release_at; otherwise it re-reads every 30 minutes with If-None-Match. It never polls faster than that. Leave it in a terminal, a tmux window, or the Docker image the repository ships.

What it checks before each order

In order, in trader.py:
  1. The pick is pending, has a token_id, and game_started is false.
  2. The local ledger holds no order for this pick.
  3. DAILY_CAP_USD still has room.
  4. The Polymarket market is open and kickoff is more than KICKOFF_BUFFER_MINUTES away.
  5. The live book fills STAKE_USD at or below MAX_PRICE, and no more than MAX_SLIPPAGE_PCT above the pick’s published price.
Then it writes a ledger entry, places one Fill-and-Kill market BUY with that book price as the ceiling, and records the exchange’s answer. Before the first live order of a run it also checks Polymarket’s geoblock, the wallet’s trading approvals, and that the balance covers the stakes.

The ledger

~/.potd-trader/ledger.json records every live order: the pick’s date, rank, token, stake, and the exchange’s answer. A pick with an entry in submitting, accepted, or unknown is never bought twice. unknown means the post raised before an answer arrived: check Activity on polymarket.com, then delete the entry by hand if no order exists.

What it does not do

  • It does not sell, hedge, or redeem. Winning positions pay out through Polymarket as usual.
  • It does not chase. A pick whose book has moved past the slippage band is skipped; watch rechecks it 5 minutes later, until kickoff.
  • It does not buy a prior day’s pick. The endpoint never returns one.
  • It does not run in a region Polymarket blocks. The geoblock check refuses.
  • It does not promise a return. The track record is computed on a $100 stake at the published price; your fills differ.