Skip to content

lubluniky/pingoblin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pingoblin

A terminal user interface (TUI) application for monitoring latency across all Polymarket endpoints and WebSockets. Built for developers building Polymarket bots who need real-time, visual latency metrics.

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀  ____  _             ___  _     _ _
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ |  _ \(_)_ __   __ _/ _ \| |__ | (_)_ __
⠀⠀⠀⠀⠀⠀⠀⠀⢀⡼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢧⡀⠀⠀⠀⠀⠀⠀⠀⠀ | |_) | | '_ \ / _` | | | | '_ \| | | '_ \
⠀⠢⣤⣀⡀⠀⠀⠀⢿⣧⣄⡉⠻⢿⣿⣿⡿⠟⢉⣠⣼⡿⠀⠀⠀⠀⣀⣤⠔⠀ |  __/| | | | | (_| | |_| | |_) | | | | | |
⠀⠀⠈⢻⣿⣶⠀⣷⠀⠉⠛⠿⠶⡴⢿⡿⢦⠶⠿⠛⠉⠀⣾⠀⣶⣿⡟⠁⠀⠀ |_|   |_|_| |_|\__, |\___/|_.__/|_|_|_| |_|
⠀⠀⠀⠀⠻⣿⡆⠘⡇⠘⠷⠠⠦⠀⣾⣷⠀⠴⠄⠾⠃⢸⠃⢰⣿⠟⠀⠀⠀⠀                |___/
⠀⠀⠀⠀⠀⠋⢠⣾⣥⣴⣶⣶⣆⠘⣿⣿⠃⣰⣶⣶⣦⣬⣷⡄⠙⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢋⠛⠻⠿⣿⠟⢹⣆⠸⠇⣰⡏⠻⣿⠿⠟⠛⡙⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠈⢧⡀⠠⠄⠀⠈⠛⠀⠀⠛⠁⠀⠠⠄⢀⡼⠁⠀⠀⠀⠀⠀⠀  hunting latency across
⠀⠀⠀⠀⠀⠀⠀⠈⢻⣦⡀⠃⠀⣿⡆⢰⣿⠀⠘⢀⣴⡟⠁⠀⠀⠀⠀⠀⠀⠀  polymarket endpoints...
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣦⡀⠘⠇⠸⠃⢀⣴⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⣷⣄⣠⣾⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Features

  • Real-time Monitoring: Ping each endpoint every second
  • Visual Components: Progress bars, sparklines, percentiles (p50, p95, p99)
  • Color-coded Thresholds: Green (<50ms), Yellow (50-100ms), Red (>100ms)
  • Alerts: Configurable threshold notifications
  • Export: CSV export support

Endpoints Monitored

REST APIs

  • CLOB API (clob.polymarket.com): /price, /book, /markets, /trades
  • Gamma API (gamma-api.polymarket.com): /events, /markets
  • Data API (data-api.polymarket.com): /prices, /volume

WebSockets

  • CLOB WebSocket (ws-subscriptions-clob.polymarket.com)
  • RTDS (ws-live-data.polymarket.com)

Installation

One-line Installer (Linux / macOS / Git Bash):

curl -sSL https://raw.githubusercontent.com/lubluniky/pingoblin/main/install.sh | bash

Windows (PowerShell):

git clone https://github.com/lubluniky/pingoblin; cd pingoblin; cargo run --release

Manual Build:

cargo build --release

Usage

# Default run
cargo run --release

# With custom thresholds
cargo run --release -- --warn 50 --critical 100

# Save metrics to CSV
cargo run --release -- --export-csv metrics.csv

# Custom config file
cargo run --release -- --config custom-config.toml

Key Bindings

Key Action
q Quit
r Reset all metrics
e Export to CSV
p Pause/resume monitoring
c Clear alerts

Configuration

Edit config.toml:

[monitoring]
interval_ms = 1000
history_window_seconds = 60

[thresholds]
warning_ms = 50
critical_ms = 100

[alerts]
sound_enabled = false
log_to_file = true
log_path = "pingoblin.log"

[export]
prometheus_port = 9090
auto_export_csv = false
csv_path = "metrics.csv"

Tech Stack

  • Language: Rust
  • TUI Framework: ratatui
  • Async Runtime: tokio
  • HTTP Client: reqwest
  • WebSocket: tokio-tungstenite

License

MIT

About

Polymarket latency monitoring TUI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published