Terminal client for Polymarket
Project description
polymarket-tui
A fast, keyboard-driven terminal client for Polymarket: browse markets, watch live order books and trades, chart prices, track your portfolio and P&L, follow traders, and place orders - without leaving the terminal.
Built with Python 3.12 and Textual.
Install
PyPI (installs the CLI in an isolated environment):
uv tool install polymarket-tui # or: pipx install polymarket-tui / pip install polymarket-tui
One-line install (installs uv if missing,
then installs polymarket-tui as a uv tool):
curl -sSL https://raw.githubusercontent.com/byronxlg/polymarket-tui/main/install.sh | bash
Homebrew (this repo doubles as the tap):
brew tap byronxlg/polymarket-tui https://github.com/byronxlg/polymarket-tui
brew install polymarket-tui
From source (for development):
git clone https://github.com/byronxlg/polymarket-tui
cd polymarket-tui
uv sync
uv run polymarket-tui
Then run polymarket-tui.
No credentials needed to browse: markets, books, charts, trades, comments, and any trader's public positions all work read-only.
Landing page
A static landing page lives in site/ and deploys to GitHub Pages
(https://byronxlg.github.io/polymarket-tui/). Its hero plays a recorded
asciinema demo of the TUI - browse markets, open one, cursor the live book,
chart, search. Preview it locally with python3 -m http.server -d site 8000,
and regenerate the demo with bash scripts/record_demo.sh. See
site/README.md.
Account setup
Press A in the app (a pop-out - esc drops you back where you were):
-
Funder address only -> observer mode: your positions, P&L, activity. This is the wallet address shown on your polymarket.com profile (also your USDC deposit address).
-
Funder + private key -> trading mode. Where the key comes from depends on how you log in to Polymarket:
- email/Magic login: polymarket.com -> Settings -> Export Private Key (signature type 1, the default)
- browser wallet: export the key from the wallet itself, e.g. MetaMask account details (signature type 2)
- trading straight from your own wallet with no Polymarket proxy: that wallet's key, funder = the same address (signature type 0)
Applied credentials are saved to
~/.config/polymarket-tui/credentials.toml(chmod 600, plaintext - treat the file like the key itself).POLYMARKET_*env vars override the file.Note: accounts created since Polymarket switched to Privy embedded wallets export only a threshold-key share; the trading API (and therefore this client) does not support them yet.
Orders are dry-run until you go live: fully validated and signed but
never posted. Live posting requires the L toggle (confirmed) or
POLYMARKET_EXECUTION_LIVE=1; the choice persists across sessions and a
LIVE start is announced.
Every placed/cancelled order is appended to
~/.local/share/polymarket-tui/orders.jsonl.
Deposits, withdrawals, token approvals, and redemption of resolved positions are on-chain operations this client does not perform - use the website.
Keys
One scheme everywhere - press ? in the app for the full reference:
- arrows move;
up/downflow into adjacent panels (category bar, chart inspect, search box);right/enteropen;left/escstep out one level (order panel -> expanded view -> screen -> previous screen) - tab cycles the screen's selector: category (home), chart timeframe (event/market), pane (portfolio), results mode (search)
- space is the contextual toggle: star an event, follow a trader, flip the YES/NO book, flip BUY/SELL while ordering, show rules
- Market pages:
b/sorder entry under the live book (price in cents, empty = market order, up/down = tick),y/nbook side,aexpand the inline trades to full width (right opens the trader),irules,ccomments,eparent event /search (markets and traders),pportfolio,wwatchlist,Aauth,Ltoggle DRY/LIVE for the session (going live asks for confirmation),qquit
Data sources
Public Polymarket APIs: gamma-api.polymarket.com (markets, events, search,
comments), clob.polymarket.com (order books, price history, orders),
data-api.polymarket.com (positions, trades, activity),
user-pnl-api.polymarket.com (profit history). Trading uses
py-clob-client-v2 for CLOB V2 order signing.
Docs
.claude/rules/design-principles.md- the UX/code principles this app followsdocs/architecture.md- layers, async model, cachingdocs/api-reference.md- the four API surfaces, verified shapes, quirksdocs/trading.md- the money path: validation, confirmation, auditdocs/config-and-auth.md- credentials, capability modes
Remaining work is tracked in GitHub issues.
Disclaimer
Unofficial client, not affiliated with Polymarket. It can place real orders with real money when you explicitly enable LIVE mode; you are responsible for your trades. No warranty.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polymarket_tui-0.1.0.tar.gz.
File metadata
- Download URL: polymarket_tui-0.1.0.tar.gz
- Upload date:
- Size: 110.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2818c5000a09cf1aacccc9b6155ab8ed400f05219a71f38d0aea8120a4d853fc
|
|
| MD5 |
055a76c4909390f39127484864f6d42e
|
|
| BLAKE2b-256 |
945bbc8e26bfb0ca9f97b2d54fcf3432244f6567f0fc0140d56979816fedfc92
|
Provenance
The following attestation bundles were made for polymarket_tui-0.1.0.tar.gz:
Publisher:
publish.yml on byronxlg/polymarket-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polymarket_tui-0.1.0.tar.gz -
Subject digest:
2818c5000a09cf1aacccc9b6155ab8ed400f05219a71f38d0aea8120a4d853fc - Sigstore transparency entry: 2084285522
- Sigstore integration time:
-
Permalink:
byronxlg/polymarket-tui@7ab6e82c266599c9c65a0503623d305c36b368df -
Branch / Tag:
refs/heads/main - Owner: https://github.com/byronxlg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ab6e82c266599c9c65a0503623d305c36b368df -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file polymarket_tui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: polymarket_tui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 143.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f1666fdbf95046bdb5ff9887c14cf0f374278c59f5c19e6215aa61257b8efd
|
|
| MD5 |
9c839d6c83b369c2a8a7a0abab292b39
|
|
| BLAKE2b-256 |
efa00c27b36db0cfc7da51e9b79efa53babf9457e6dc06cda6d77cc3067a2c16
|
Provenance
The following attestation bundles were made for polymarket_tui-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on byronxlg/polymarket-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
polymarket_tui-0.1.0-py3-none-any.whl -
Subject digest:
b5f1666fdbf95046bdb5ff9887c14cf0f374278c59f5c19e6215aa61257b8efd - Sigstore transparency entry: 2084285528
- Sigstore integration time:
-
Permalink:
byronxlg/polymarket-tui@7ab6e82c266599c9c65a0503623d305c36b368df -
Branch / Tag:
refs/heads/main - Owner: https://github.com/byronxlg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ab6e82c266599c9c65a0503623d305c36b368df -
Trigger Event:
workflow_dispatch
-
Statement type: