8000
Skip to content

marcosbtesh/crrcy.sh

Repository files navigation

crrcy.sh

Real-time Currency Exchange Rates & Historical Charts via Terminal

Project Status License

📺 Demo Video

Demo Video

📖 Description

crrcy.sh is a lightweight, terminal-friendly currency exchange service that provides real-time rates for fiat and cryptocurrencies, along with beautiful historical price charts rendered directly in your terminal via curl.

Whether you're tracking forex rates, monitoring crypto prices, or analyzing historical trends—all from the comfort of your command line—crrcy.sh delivers fast, accurate data with stunning ASCII visualizations.

🎯 Features

  • Real-time currency exchange rates - Instant access to current rates
  • 150+ fiat currencies - Comprehensive coverage of world currencies
  • Major cryptocurrencies - BTC, ETH, XRP, and more
  • Historical data - Track price movements over days, months, or years
  • ASCII charts - Beautiful terminal-rendered graphs with color-coded trends
  • curl-friendly - Designed for terminal workflows and scripting
  • Zero friction - No authentication or rate limits for moderate use
  • Smart caching - Redis-backed caching for performance

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/marcosbtesh/crrcy.sh.git
cd crrcy.sh

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys

# Start the server
python main.py

Basic Usage

# Get latest rates
curl http://localhost:5001/

# Get current rates for specific currencies
curl http://localhost:5001/EUR/USD,GBP,JPY

# Get historical price chart (30 days)
curl http://localhost:5001/last/USD/BTC/30d

# Help menu
curl http://localhost:5001/usage

📚 API Endpoints

1. Get Latest Rates

Endpoint: GET /latest
Description: Get latest exchange rates

curl http://localhost:5001/latest

Response:

═════════════════════════════════════════════════════════════════════════════════
                              CURRENCY RATES
                                Base: USD
═════════════════════════════════════════════════════════════════════════════════

                     CURRENCY              RATE
                     AED              3.6725
                     AFN             69.8500
                     ALL             92.5000
                     ...

Screenshot: Latest rates example


2. Get Current Rates with Specific Base

Endpoint: GET /{base}
Description: Get exchange rates from a specific base currency

curl http://localhost:5001/EUR
curl http://localhost:5001/BTC

Parameters:

  • base - Base currency code (e.g., USD, EUR, BTC)

Screenshot: EUR rates example


3. Get Current Rates for Multiple Targets

Endpoint: GET /{base}/{targets}
Description: Get current rates for one or multiple target currencies

curl http://localhost:5001/EUR/USD,GBP,JPY
curl http://localhost:5001/USD/BTC,ETH,XRP

Parameters:

  • base - Base currency code
  • targets - Comma-separated list of target currencies

Screenshot: Multi-currency example


4. Get Historical Price Chart

Endpoint: GET /last/{base}/{target}/{time}
Description: Display historical price data as an ASCII chart in your terminal

curl http://localhost:5001/last/USD/BTC/30d
curl http://localhost:5001/last/USD/ETH/90d
curl http://localhost:5001/last/EUR/USD/1y

Parameters:

  • base - Base currency
  • target - Target currency or currencies (comma-separated)
  • time - Time range:
    • 30d → 30 days
    • 90d → 90 days
    • 6m → 6 months (180 days)
    • 1y → 1 year (365 days)
    • Numeric values (e.g., 90) also work

Screenshot: 30-day chart example


5. Get Historical Chart with Custom Step

Endpoint: GET /last/{base}/{target}/{time}/{step}
Description: Get historical data with custom data point intervals

curl http://localhost:5001/last/USD/EUR/1y/10
curl http://localhost:5001/last/USD/BTC/90d/5

Parameters:

  • base - Base currency
  • target - Target currency or currencies
  • time - Time range
  • step - Data point interval (must be ≥ 1, max 365 points per request)

Screenshot: 1-year chart with step example


📋 Parameter Reference

Base/Target Currencies

Common Fiat Currencies

USD - US Dollar
EUR - Euro
GBP - British Pound
JPY - Japanese Yen
CHF - Swiss Franc
CAD - Canadian Dollar
AUD - Australian Dollar
... and 150+ more

All Fiat Currencies

Popular Cryptocurrencies

BTC  - Bitcoin
ETH  - Ethereum
XRP  - Ripple
LTC  - Litecoin
ADA  - Cardano
SOL  - Solana
... and many more

All Crypto Currencies

Time Format

  • Xd - X days (e.g., 30d, 7d)
  • Xm - X months (e.g., 6m, 3m)
  • Xy - X years (e.g., 1y, 2y)
  • X - Numeric days (e.g., 90, 180)

💻 Examples

Track Bitcoin for 30 Days

$ curl http://localhost:5001/last/USD/BTC/30d

Compare Multiple Cryptos

$ curl http://localhost:5001/last/USD/BTC,ETH/90d

Long-term Currency Tracking

$ curl http://localhost:5001/last/EUR/USD,GBP/1y/10

Quick Currency Check

$ curl http://localhost:5001/USD/EUR,GBP,JPY,CHF

🤝 Contributing

Contributions are welcome! Please feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Created by marcosbtesh

🔗 Links


Built with ❤️ for the terminal

About

The best way to check- Curl Fiat And Crypto rates

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

0