https://github.com/lillysilly3/crypto-converter
Command-line cryptocurrency converter in Ruby — converts BTC, ETH, XRP, DASH and LTC to USD or EUR using live prices.
https://github.com/lillysilly3/crypto-converter
api begginer cli cryptocurrency ruby
Last synced: 11 days ago
JSON representation
Command-line cryptocurrency converter in Ruby — converts BTC, ETH, XRP, DASH and LTC to USD or EUR using live prices.
- Host: GitHub
- URL: https://github.com/lillysilly3/crypto-converter
- Owner: lillysilly3
- Created: 2026-06-03T10:17:28.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-03T10:32:44.000Z (about 1 month ago)
- Last Synced: 2026-06-03T12:15:55.199Z (about 1 month ago)
- Topics: api, begginer, cli, cryptocurrency, ruby
- Language: Ruby
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cryptocurrency Converter
A command-line cryptocurrency converter built in Ruby. Convert BTC, ETH, XRP, DASH and LTC to USD or EUR using live prices from the CryptoCompare API.
## Features
- Convert cryptocurrency amounts to USD or EUR
- Live prices fetched from CryptoCompare API
- Supports decimal amounts (e.g. 0.5 BTC)
- Graceful error handling for network failures
## Demo
```
########## Cryptocurrency Converter ##########
a) Convert to USD
b) Convert to EUR
q) Quit
Action: a
-----------Available Coins-----------
BTC, ETH, XRP, DASH, LTC
Coin: BTC
Amount: 0.5
--------------------------------------------------
0.5 BTC = 31245.75 USD
--------------------------------------------------
```
## Prerequisites
- Ruby 2.7+
- [CryptoCompare API key](https://www.cryptocompare.com/cryptopian/api-keys)
## Getting Started
```bash
git clone https://github.com/YOUR_USERNAME/cryptocurrency_converter
cd cryptocurrency_converter
ruby main.rb
```
## Project Structure
- `main.rb` - Entry point and menu loop
- `manager.rb` - Business logic and API fetching
- `coin.rb` - Coin model
## What I Explored
- Fetching and parsing live API data with `net/http` and `json`
- Object-oriented Ruby design with classes
- Error handling for network and API failures
- Separating concerns across model and manager layers
## Acknowledgments
This project was built following the [Ruby tutorial by Best Tutorials](https://www.youtube.com/watch?v=MXlZCgh2M6A) on YouTube.