- 🚀 95+ Top Cryptocurrencies - All major tokens supported
- ⚡ Real-time Rates - Updates every 30 seconds
- 🌐 Global Edge Network - Powered by Cloudflare
- 🆓 100% Free - No API keys, no rate limits
- 📊 JSON & CSV Support - Flexible data formats
- ⚙️ Simple Integration - Just HTTP GET requests
# Get all supported tokens
curl https://coin-rates.simplr.sh/api/tokens.json
# Get Bitcoin's current rate
curl https://coin-rates.simplr.sh/api/rates/bitcoin
# Get Ethereum's current rate
curl https://coin-rates.simplr.sh/api/rates/ethereum
Retrieve a list of all supported cryptocurrency tokens.
JSON Format:
GET https://coin-rates.simplr.sh/api/tokens.json
CSV Format:
GET https://coin-rates.simplr.sh/api/tokens.csv
Returns a list of tokens with their ID, name, and symbol. Example response (JSON):
[
{
"id": "bitcoin",
"name": "Bitcoin",
"symbol": "BTC"
},
{
"id": "ethereum",
"name": "Ethereum",
"symbol": "ETH"
}
// ... more tokens
]
Use these token IDs to query individual token rates.
Get the current USD exchange rate for a specific cryptocurrency token.
GET https://coin-rates.simplr.sh/api/rates/{id}
{id}
: The token ID from the tokens list (e.g., "bitcoin", "ethereum")- Updates every 30 seconds
- Returns the current USD exchange rate
Example Request:
GET https://coin-rates.simplr.sh/api/rates/bitcoin
Example Response:
{
"btc": {
"usd": 42789.65
}
}
Error Response (Invalid Token ID):
{
"error": "Invalid token id"
}
- No request limits
- No bandwidth limits
- 30-second cache per token
- Free for all usage
// Fetch Bitcoin rate
const response = await fetch('https://coin-rates.simplr.sh/api/rates/bitcoin');
const data = await response.json();
console.log(`Bitcoin price: $${data.btc.usd}`);
import requests
# Fetch Ethereum rate
response = requests.get('https://coin-rates.simplr.sh/api/rates/ethereum')
data = response.json()
print(f"Ethereum price: ${data['eth']['usd']}")
- Node.js 18+ installed
- Wrangler CLI installed (
npm install -g wrangler
) - Cloudflare account (for deployment)
- Clone the repository:
git clone https://github.com/simplr-sh/coin-rates.git
cd coin-rates
- Install dependencies:
npm install
- Start the development server:
npm run dev
The API will be available at http://localhost:8787
.
- Login to Cloudflare (if not already):
wrangler login
- Deploy to Cloudflare Workers:
npm run deploy
Your API will be deployed to https://<your-worker>.workers.dev
.
No environment variables required for basic setup.
- Updates automatically every 30 seconds
- Uses Cloudflare's edge network for global distribution
- Zero configuration required
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- 🌟 Star this repo if you find it useful
- 🐛 Report bugs by creating an issue
- 💡 Request features through issues