A Terminal User Interface (TUI) based cryptocurrency ticker written in pure C. CTicker connects to the Binance API to display real-time prices for your chosen trading pairs with beautiful ASCII charts.
- ๐ Real-time Price Updates: Live cryptocurrency prices from Binance
- ๐ฐ Custom Portfolio: Select and save your favorite trading pairs
- ๐ Price Charts: View historical price data with ASCII charts
- โฑ๏ธ Multiple Time Periods: 1 day, 1 week, and 1 month views
- ๐จ Beautiful TUI: Clean terminal interface with color-coded price changes
- ๐พ Persistent Configuration: Your portfolio is saved in your home directory
CTicker requires the following libraries:
libcurl- For HTTP requests to Binance APIlibjansson- For JSON parsingncursesw- Wide-character terminal UI librarypthread- For multi-threading (usually included with gcc)
Ubuntu/Debian:
sudo apt-get install libcurl4-openssl-dev libjansson-dev libncursesw5-dev build-essentialFedora/RHEL/CentOS:
sudo dnf install libcurl-devel jansson-devel ncurses-devel gcc makemacOS (with Homebrew):
brew install curl jansson ncursesArch Linux:
sudo pacman -S curl jansson ncursesNote: Use the wide-character
ncurseswlibraries. On Debian/Ubuntu this is provided bylibncursesw5-dev, whilencurses-devel(Fedora),ncurses(Homebrew), andncurses(Arch) already include wide-character support.
- Clone the repository:
git clone https://github.com/xtaci/cticker.git
cd cticker- Check dependencies (optional):
make check-deps- Build the project:
make- (Optional) Install system-wide:
sudo make installSimply run the executable:
./ctickerOr if installed system-wide:
ctickerOn the first run, CTicker will create a default configuration file at ~/.cticker.conf with three default trading pairs:
- BTCUSDT (Bitcoin/USDT)
- ETHUSDT (Ethereum/USDT)
- BNBUSDT (Binance Coin/USDT)
Main Screen:
โ/โ- Navigate through trading pairsEnter- View price chart for selected pairq- Quit application
Chart Screen:
1- Show 1-day chart (15-minute intervals)7- Show 1-week chart (1-hour intervals)30- Show 1-month chart (4-hour intervals)ESC/q- Return to main screen
Edit the configuration file at ~/.cticker.conf to add or remove trading pairs:
nano ~/.cticker.confOr copy the example configuration:
cp example.conf ~/.cticker.confAdd one trading pair per line (use Binance symbol format):
BTCUSDT
ETHUSDT
BNBUSDT
ADAUSDT
SOLUSDT
DOTUSDT
Valid Symbol Format:
- Use Binance trading pair symbols (e.g., BTCUSDT, ETHUSDT)
- Symbols are case-sensitive (use uppercase)
- Maximum 50 symbols supported
The configuration file is stored at ~/.cticker.conf and contains a simple list of trading pair symbols, one per line.
Example:
BTCUSDT
ETHUSDT
BNBUSDT
ADAUSDT
SOLUSDT
The main screen displays:
- Symbol name
- Current price (formatted with K/M/B suffixes for large numbers)
- 24-hour price change percentage (color-coded: green for positive, red for negative)
- Current date and time
Press Enter on any trading pair to view its price chart:
- ASCII line chart showing price movement
- Y-axis with price labels
- Color-coded chart (green for upward movement, red for downward)
- Current price and total change percentage
- Switchable time periods (1 day, 1 week, 1 month)
- Written in pure C for performance and efficiency
- Uses ncursesw for terminal UI rendering
- Multi-threaded design for non-blocking UI
- Connects to Binance REST API v3
- Auto-refreshes data every 5 seconds
- Thread-safe data handling with mutexes
CTicker uses the following Binance API endpoints:
- 24-Hour Ticker:
/api/v3/ticker/24hr- For real-time prices and 24h changes - Kline/Candlestick Data:
/api/v3/klines- For historical price data
No API key is required as we only use public endpoints.
"Failed to load configuration"
- Ensure you have write permissions to your home directory
- The file will be auto-created on first run
"Failed to fetch data" or network errors
- Check your internet connection
- Verify that api.binance.com is accessible
- Some networks may block Binance API access
- The application requires internet access to fetch price data
Display issues
- Ensure your terminal supports colors
- Try resizing your terminal window (minimum 80x24 recommended)
- Use a modern terminal emulator
Build errors
- Verify all dependencies are installed using
make check-deps - Check that pkg-config is installed
- Ensure you have a C compiler (gcc or clang)
A test script is provided to verify the configuration system:
./test.shThis tests configuration loading, saving, and reloading without requiring network access.
Contributions are welcome! Please feel free to submit a Pull Request.
See the LICENSE file for details.
This software is for informational purposes only. Cryptocurrency trading carries risk. Always do your own research before making investment decisions.
- Uses data from Binance API
- Built with ncursesw, libcurl, and jansson