Overview
This command-line tool written in Go retrieves real-time Bitcoin market prices across multiple currencies. It connects to the Blockchain.info API to provide accurate cryptocurrency valuations with simple terminal commands.
Key Features
- Multi-currency support: USD, EUR, CNY, JPY, GBP and 20+ other currencies
- Flexible output: Display single or multiple currency conversions
- Portable: Pre-compiled binaries for Windows, macOS, Linux and ARM devices
- Silent mode: Option for script-friendly output without visual formatting
Installation and Usage
Basic Command Structure
./btcprice [-c float] [-m] [-s string]Parameters Explained
| Parameter | Description |
|---|---|
-c | Specify Bitcoin quantity (default: 1 BTC) |
-m | Silent mode (removes loading animation) |
-s | Target currency (default: USD). Supports comma-separated values |
Usage Examples
Default USD Conversion
./btcprice
$ 7413.92Chinese Yuan Conversion
./btcprice -s CNY
¥ 46429.95Multiple Currency Conversion
./btcprice -s CNY,USD -c 0.044454
¥ 46429.95 2064.00
$ 7387.46 328.40Supported Platforms
The tool compiles natively for these operating systems and architectures:
| OS | Architectures |
|---|---|
| Android | arm |
| Darwin | 386, amd64, arm, arm64 |
| Linux | 386, amd64, arm, arm64, ppc64, ppc64le |
| Windows | 386, amd64 |
| FreeBSD | 386, amd64, arm |
| And 10+ other platforms... |
👉 Download pre-built binaries for your system
API Response Structure
The tool fetches data from Blockchain.info's ticker API which returns JSON formatted like:
{
"USD": {
"15m": 7392.1196853,
"last": 7392.1196853,
"buy": 7392.1196853,
"sell": 7392.1196853,
"symbol": "$"
},
"CNY": {
"15m": 46459.22828216088,
"last": 46459.22828216088,
"buy": 46459.22828216088,
"sell": 46459.22828216088,
"symbol": "¥"
}
}FAQ Section
How frequently are prices updated?
Prices refresh every 15 minutes through Blockchain.info's API, indicated by the "15m" field in the JSON response.
Can I use this for trading automation?
While technically possible, we recommend against using this simple tool for high-frequency trading due to the 15-minute update interval.
Is there a web version available?
👉 Check our partner platform for advanced trading tools
Why choose this over other Bitcoin price tools?
- Lightweight (single binary under 5MB)
- No dependencies
- Supports rare architectures like PowerPC and MIPS
- Open-source with MIT license
How accurate are the conversions?
Rates come directly from Blockchain.info's aggregated market data, matching what major exchanges use for spot pricing.
Advanced Usage
For developers looking to integrate this functionality:
- The silent mode (
-m) makes it ideal for cron jobs - JSON output can be piped to other applications
- Cross-compile for embedded systems monitoring crypto prices
- Combine with shell scripts for portfolio tracking
The tool's simplicity makes it perfect for:
- ATM software displaying BTC prices
- Point-of-sale systems accepting cryptocurrency
- Personal dashboard integrations
- Educational projects about API consumption