Skip to content

chadbot0x/chads-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

chads - CLI for apiforchads.com

A fast, lightweight command-line tool for interacting with the apiforchads.com API ecosystem. Get real-time crypto prices, trading signals, whale transactions, sentiment analysis, and more.

Features

  • 🚀 Fast startup - Minimal dependencies, optimized for speed
  • 🎨 Colored output - Beautiful, human-readable tables and data
  • 📊 JSON mode - Machine-readable output for scripting and automation
  • 💰 x402 payment integration - Automatic payment instructions when needed
  • 🔧 Comprehensive API coverage - Access all apiforchads.com services

Installation

Option 1: Build from source (Recommended)

# Clone or download the source
git clone <repository-url>
cd chads-cli

# Build release binary
cargo build --release

# Install to PATH (optional)
cargo install --path .

Option 2: Download binary (Coming soon)

Pre-built binaries for macOS ARM64 (Apple Silicon) will be available in releases.

Configuration

API Key

Set your API key using either method:

Environment variable (recommended):

export CHADS_API_KEY=your_api_key_here

Command line flag:

chads --api-key your_api_key_here price btc

x402 Payments

When you hit API rate limits, the tool will display payment instructions:

  • Payment amount (typically 0.0001-0.002 SOL)
  • Payment address: EDQQe7Nufgvo2A6uXTmCpTr2FumZRB3fNzTH4Wuvpvpd
  • Transaction confirmation instructions

Usage

Global Options

--api-key <KEY>    # API key for authentication
--json             # Output raw JSON instead of formatted tables  
--no-color         # Disable colored output
--help             # Show help information
--version          # Show version information

Commands

1. Price Information

Get real-time price data for any crypto asset:

chads price btc
chads price eth
chads price sol

Output:

┌───────┬─────────────┬──────────┬─────────────────────┐
│ asset │ price       │ source   │ timestamp           │
├───────┼─────────────┼──────────┼─────────────────────┤
│ btc   │ $43,250.12  │ Binance  │ 2024-01-15 14:30:22 │
└───────┴─────────────┴──────────┴─────────────────────┘

2. CLOB Market Data

Get Polymarket CLOB (Central Limit Order Book) data:

chads clob trump-2024-election
chads clob btc-100k-2024

Output:

┌─────────────────────┬───────────┬──────────┬─────────┬──────────┐
│ market              │ yes_price │ no_price │ spread  │ volume   │
├─────────────────────┼───────────┼──────────┼─────────┼──────────┤
│ trump-2024-election │ 0.65      │ 0.35     │ 0.02    │ $2.4M    │
└─────────────────────┴───────────┴──────────┴─────────┴──────────┘

3. Trading Signals

Get AI-generated trading signals:

chads signals btc
chads signals eth

Output:

┌───────┬───────────┬────────────┬───────────┬─────────┬────────┐
│ asset │ direction │ confidence │ timeframe │ entry   │ exit   │
├───────┼───────────┼────────────┼───────────┼─────────┼────────┤
│ btc   │ LONG      │ 78%        │ 4h        │ 43,200  │ 45,500 │
└───────┴───────────┴────────────┴───────────┴─────────┴────────┘

4. News Feed

Get the latest crypto and market news:

chads news                    # Default: 5 articles
chads news --limit 10        # Get 10 articles

Output:

┌─────────────────────────────────────────┬──────────────┬─────────────────────┐
│ headline                                │ source       │ timestamp           │
├─────────────────────────────────────────┼──────────────┼─────────────────────┤
│ Bitcoin ETF Sees Record Inflows        │ CoinDesk     │ 2024-01-15 14:25:00 │
│ Ethereum Upgrade Scheduled for March   │ The Block    │ 2024-01-15 14:20:15 │
└─────────────────────────────────────────┴──────────────┴─────────────────────┘

5. Whale Transactions

Track large crypto transactions:

chads whale                   # Default: 5 transactions
chads whale --limit 20       # Get 20 transactions

Output:

┌─────────────────────────────────┬──────────────┬───────────┬───────┐
│ wallet                          │ amount       │ direction │ token │
├─────────────────────────────────┼──────────────┼───────────┼───────┤
│ 0x742d35Cc2F...                │ 1,250.5 ETH  │ OUT       │ ETH   │
│ bc1qxy2kgdygjrs...              │ 45.2 BTC     │ IN        │ BTC   │
└─────────────────────────────────┴──────────────┴───────────┴───────┘

6. Sentiment Analysis

Get sentiment scores for any topic:

chads sentiment bitcoin
chads sentiment "crypto market"
chads sentiment ethereum

Output:

┌─────────┬───────┬──────────────────────────┐
│ topic   │ score │ breakdown                │
├─────────┼───────┼──────────────────────────┤
│ bitcoin │ 0.72  │ Positive: 72% Neutral: 18% │
└─────────┴───────┴──────────────────────────┘

7. Price Comparison

Compare prices across multiple exchanges:

chads compare btc
chads compare eth

Output:

┌──────────┬─────────────┬─────────┐
│ source   │ price       │ spread  │
├──────────┼─────────────┼─────────┤
│ Binance  │ $43,250.12  │ -0.02%  │
│ Coinbase │ $43,261.45  │ +0.01%  │
│ Kraken   │ $43,248.88  │ -0.03%  │
└──────────┴─────────────┴─────────┘

8. Portfolio Tracking

Track any wallet's portfolio:

chads portfolio 0x742d35Cc2Ff6Ce6040dFdDaA797EF3B4e08BB3dF
chads portfolio bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh

Output:

┌────────┬─────────────┬─────────────┬─────────┐
│ token  │ balance     │ value       │ pnl     │
├────────┼─────────────┼─────────────┼─────────┤
│ BTC    │ 2.45        │ $105,862.80 │ +12.5%  │
│ ETH    │ 15.2        │ $38,456.40  │ +8.2%   │
│ SOL    │ 1,250       │ $125,000.00 │ +45.7%  │
└────────┴─────────────┴─────────────┴─────────┘

9. Service Status

Check the health of all apiforchads.com services:

chads status

Output:

┌─────────────────┬────────┬─────────┐
│ service         │ status │ latency │
├─────────────────┼────────┼─────────┤
│ Price API       │ UP     │ 45ms    │
│ Research API    │ UP     │ 67ms    │
│ Render API      │ UP     │ 123ms   │
│ Sentiment API   │ UP     │ 89ms    │
│ News API        │ DOWN   │ N/A     │
└─────────────────┴────────┴─────────┘

JSON Output Mode

All commands support --json flag for machine-readable output:

# Get JSON output for scripting
chads --json price btc

# Pipe to jq for processing
chads --json whale --limit 10 | jq '.transactions[0].amount'

# Save to file
chads --json status > service_status.json

Examples

Basic Usage

# Check Bitcoin price
chads price btc

# Get latest news
chads news

# Check whale activity
chads whale

Advanced Usage

# Get 20 news articles in JSON format
chads --json news --limit 20

# Compare ETH prices with no colors
chads --no-color compare eth

# Check sentiment with custom API key
chads --api-key your_key sentiment "altcoin season"

Scripting

#!/bin/bash

# Monitor BTC price and alert if above threshold
PRICE=$(chads --json price btc | jq -r '.price | tonumber')
if (( $(echo "$PRICE > 50000" | bc -l) )); then
    echo "🚨 BTC price alert: $PRICE"
fi

Error Handling

The tool provides clear, human-readable error messages:

  • 402 Payment Required: Shows exact payment amount and instructions
  • 401 Unauthorized: Clear API key setup instructions
  • Network errors: Displays connection issues with helpful suggestions
  • Invalid arguments: Shows correct usage with examples

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

  • 🐛 Issues: Report bugs via GitHub issues
  • 💬 Community: Join our Discord/Telegram
  • 📧 Contact: team@apiforchads.com

Version History

  • v0.1.0: Initial release with all core commands
  • Full API coverage for apiforchads.com services
  • JSON output mode and colored formatting
  • Cross-platform support (macOS ARM64 primary)

About

⚡ The fastest CLI for prediction markets & crypto data. Built with Rust.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages