polymarket-tui-0.1.0 is not a library.
polymarket-tui
Real-time Polymarket monitoring tool built in Rust. Monitor live market updates, trades, orderbook changes, and prices with beautiful colored console output.
This was started as a pet project for me to play with AI. This used Cursor, Claude and Codex.
Features
- 🔴 Real-time WebSocket monitoring - Connect to Polymarket's WebSocket API for live updates
- 📊 Market data discovery - Automatically fetch active markets from Gamma API
- 🎨 Colored console output - Beautiful, color-coded display of trades, orderbooks, and prices
- 📈 Multiple update types - Monitor trades, orderbook changes, orders, and price updates
- 🚀 Zero configuration - No API keys required for public market data
Workspace
crates/polymarket-api: Core library with WebSocket client, Gamma API client, and display formatterscrates/cli: Binary application for real-time monitoring
Usage
Run the CLI
The CLI will:
- Fetch all active markets from Polymarket
- Connect to the WebSocket stream
- Display real-time updates with colored output
Use the Library
use ;
// Fetch active markets
let gamma = new;
let asset_ids = gamma.get_all_active_asset_ids.await?;
// Connect to WebSocket
let mut ws = new;
ws.connect_and_listen.await?;
Development
- Build:
cargo build - Run CLI:
cargo run -p polymarket-cli - Test:
cargo test - Check:
cargo check
API Documentation
The library provides three main modules:
gamma: Client for Polymarket's Gamma API (market discovery)websocket: WebSocket client for real-time market updatesdisplay: Formatters for colored console output
CI
GitHub Actions runs on pushes and PRs:
- rustfmt check
- clippy with warnings denied
- full test suite