Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/decryptu/zigcoin
A fast and minimal CLI cryptocurrency information tool written in Zig, using the CoinGecko API v3.
https://github.com/decryptu/zigcoin
bitcoin coingecko coingecko-api crypto cryptocurrency zig ziglang
Last synced: 12 days ago
JSON representation
A fast and minimal CLI cryptocurrency information tool written in Zig, using the CoinGecko API v3.
- Host: GitHub
- URL: https://github.com/decryptu/zigcoin
- Owner: Decryptu
- License: mit
- Created: 2024-12-01T21:33:50.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-02T00:46:50.000Z (2 months ago)
- Last Synced: 2025-01-30T11:44:08.499Z (12 days ago)
- Topics: bitcoin, coingecko, coingecko-api, crypto, cryptocurrency, zig, ziglang
- Language: Zig
- Homepage:
- Size: 416 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZigCoin
A fast and minimal CLI cryptocurrency information tool written in Zig, using the CoinGecko API v3.
![ZigCoin Output Example](img/result.png)
## Features
- Fetch real-time cryptocurrency price data
- Display market information including:
- Current price
- Market cap
- 24h volume
- Price changes
- Supply information
- Clean and minimal CLI output
- Zero configuration needed## Prerequisites
- Zig 0.11.0 or later
- libcurl development files### Installing Dependencies
#### Ubuntu/Debian
```bash
sudo apt-get install libcurl4-openssl-dev
```#### macOS
```bash
brew install curl
```## Building
```bash
zig build
```## Running
```bash
./zig-out/bin/zigcoin
```Examples:
```bash
./zig-out/bin/zigcoin bitcoin
./zig-out/bin/zigcoin ethereum
./zig-out/bin/zigcoin dogecoin
```## Error Handling
The tool provides clear error messages for common issues:
- Invalid coin ID
- Network request failures
- API rate limiting
- Missing data## Project Structure
```bash
src/
├── main.zig - Entry point and argument handling
├── api.zig - CoinGecko API client implementation
├── types.zig - Data structures and types
├── json.zig - JSON response parsing
└── display.zig - Output formatting and display
```## Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments
- CoinGecko API for providing the cryptocurrency data
- Zig community
- libcurl for HTTP requests## Known Limitations
- Currently only supports single coin queries
- Requires internet connection
- Subject to CoinGecko API rate limits