Polymarket Politics Random Buyer
This skill is a publishable AION trading template that scans Polymarket politics markets, randomly picks one valid candidate, checks market context, and buys 1 USDC by default.
This is a template. The default signal is intentionally simple: pick a random live politics market that passes context checks, then buy 1 USDC on the chosen side. Remix the selection logic, side logic, sizing, and filters with your own research or model. The skill handles market discovery, guardrails, and AION trade tagging.
When To Use
Use this skill when you want a minimal AION-compatible Polymarket trading skill that can discover politics markets automatically instead of taking a fixed market id.
Skill Folder
This skill ships with three files:
- SKILL.md
- clawhub.json
- politics_random_buyer.py
Defaults
- Venue: polymarket
- Search scope: politics and election-related Polymarket markets
- Trade side: YES
- Trade size: 1.0 USDC
- Execution mode: dry-run unless
--liveis passed - Trade source:
sdk:polymarket-politics-random-buyer - Skill slug:
polymarket-politics-random-buyer
Required Inputs
The skill expects the user to provide:
AION_API_KEYorAIONMARKET_API_KEYWALLET_PRIVATE_KEY
Optional inputs:
SEARCH_QUERIESas a comma-separated override for the politics search termsTRADE_SIZEto override the 1 USDC defaultTRADE_SIDEto chooseyesornoMAX_MARKETSto control how many market search results to inspectRANDOM_SEEDto make the random pick reproducibleREASONING_PREFIXto customize the public reasoning string
Safety Rules
- Always fetch market context before trading.
- Always default to dry-run. Live trading requires explicit
--live. - Always require the user's API key and wallet private key from env.
- Always attach
source,skill_slug, and human-readablereasoning. - Skip candidates when market context returns warnings or flip-flop risk.
- Return a clear HOLD result when no valid politics market passes the checks.
Decision Logic
- Search Polymarket using politics-related keywords.
- Flatten nested event -> market results into tradeable sub-markets.
- Filter to live politics candidates with usable identifiers.
- Randomize the candidate list.
- Check market context candidate by candidate until one passes safeguards.
- Buy the configured side for the configured amount.
Example Commands
Dry-run:
python politics_random_buyer.py
Live trade with the default 1 USDC size:
python politics_random_buyer.py --live
Deterministic pick for testing:
python politics_random_buyer.py --seed 7 --max-markets 30
Expected Operator Output
The script prints an operator summary like:
Skill: polymarket-politics-random-buyer
Venue: polymarket
Wallet: 0x1234...abcd
Scanned markets: 42
Decision:
- TRADE YES size=1.00 market=US election market here mode=dry-run
Risk alerts:
- none
Remix Ideas
- Change the politics filters to target only US election markets.
- Replace random selection with volume, liquidity, or edge ranking.
- Add position checks before entering another politics trade.
- Flip the side dynamically based on your own forecast signal.