Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

byteoxo/crypto-ticker

Repository files navigation

Crypto Ticker

中文文档

crypto-ticker is a terminal-based crypto market viewer written in Go. It supports realtime futures and spot monitoring with live candlestick charts, rendered with a tview/tcell TUI. Binance, Gate.io, OKX, and Bitget are supported.

Preview

Crypto Ticker Screenshot

Features

  • Realtime quotes over WebSocket — Binance, Gate.io, OKX, and Bitget (futures + spot)
  • Live candlestick charts (1h / 2h / 4h / 1d / 3d) with keyboard symbol and interval switching
  • Volume bars, EMA20/50, RSI14, Bollinger Bands, and MACD shown below each chart
  • 24h price change %, Open Interest (with さんかく/▼ change), Long/Short Ratio, and Funding Rate per symbol
  • Sparkline trend column in the price table
  • Order book overlay (20 levels, live refresh)
  • Stable TUI built with tview/tcell
  • Green/red price movement highlighting
  • Help overlay with shortcut reference
  • TOML-based configuration only

Shortcuts

Key Action
/ or h Open / close help
Tab Switch futures / spot panel
Up / Left Previous chart symbol
Down / Right Next chart symbol
i Cycle chart interval (1h → 2h → 4h → 1d → 3d)
o Open order book for current symbol
Esc Close help / modal / order book
q / Ctrl+C Quit

Installation

Homebrew (macOS / Linux)

brew tap byteoxo/tap
brew install crypto-ticker

Pre-built binaries

Download the latest release for your platform from the Releases page.

Build from source

git clone https://github.com/byteoxo/crypto-ticker.git
cd crypto-ticker
go build -o crypto-ticker ./cmd/crypto-ticker
./crypto-ticker

Configuration

The application reads config files only. It does not accept runtime CLI flags.

Config resolution (first match wins):

  1. ./config.toml — overrides everything below
  2. ~/.config/crypto-ticker/config.toml
  3. Built-in default — Binance settings from configs/config.example.binance.toml, embedded in the binary at compile time (no config file required to run)

If a user config file is present but invalid, or any required field is missing, the program exits with an error.

Example configs are included in configs/:

Config Fields

Field Description
exchange binance (default), gate, okx, or bitget
symbols Futures symbols to subscribe to, e.g. ["ETHUSDT", "BTCUSDT"] (Binance) or ["BTC_USDT", "ETH_USDT"] (Gate.io)
spot_symbols Spot assets to display
chart_symbol Default futures chart symbol on startup
chart_limit Number of candles to render
default_panel futures or spot
timeout HTTP/WebSocket timeout, e.g. 8s
retry_delay Reconnect delay after WebSocket disconnect, e.g. 2s
tz Display timezone, e.g. Asia/Shanghai
rest_base (Optional) REST API base URL — defaults to exchange default
ws_base (Optional) WebSocket base URL — defaults to exchange default
no_color Disable TUI colors
api_key (Optional) API key — enables account features
api_secret (Optional) API secret — required with api_key

Exchange Support

Binance (default)

exchange = "binance"
symbols = ["ETHUSDT", "BTCUSDT", "SOLUSDT"]

Defaults applied automatically:

  • REST: https://fapi.binance.com
  • WS: wss://fstream.binance.com

Gate.io

Gate.io uses underscore-separated symbol names (BTC_USDT instead of BTCUSDT).

exchange = "gate"
symbols = ["BTC_USDT", "ETH_USDT", "SOL_USDT"]

Defaults applied automatically:

  • Futures REST: https://fx-api.gateio.ws
  • Futures WS: wss://fx-ws.gateio.ws/v4/ws/usdt
  • Spot REST: https://api.gateio.ws
  • Spot WS: wss://api.gateio.ws/ws/v4/

Bitget

Uses compact symbols like Binance (BTCUSDT). Account auth requires api_passphrase (or BITGET_API_PASSPHRASE).

exchange = "bitget"
symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT"]
api_passphrase = "your_passphrase"

Defaults applied automatically:

  • REST: https://api.bitget.com
  • WS: wss://ws.bitget.com/v2/ws/public (futures and spot)

See configs/config.example.bitget.toml.

API Key Setup (Optional)

An API key is not required to view market data. It is only needed for account features such as viewing futures positions and spot balances, as well as placing, cancelling, and modifying orders.

Setting keys via environment variables (recommended)

Environment variables take precedence over config file values.

Exchange Key variable Secret variable
Binance BINANCE_API_KEY BINANCE_API_SECRET
Gate.io GATE_API_KEY GATE_API_SECRET
OKX OKX_API_KEY OKX_API_SECRET (+ OKX_API_PASSPHRASE)
Bitget BITGET_API_KEY BITGET_API_SECRET (+ BITGET_API_PASSPHRASE)
export BINANCE_API_KEY=your_key
export BINANCE_API_SECRET=your_secret

or for Gate.io:

export GATE_API_KEY=your_key
export GATE_API_SECRET=your_secret

Setting keys via config file

api_key = "your_api_key_here"
api_secret = "your_api_secret_here"

⚠️ Keep your config.toml private. Never commit it to a public repository.

Binance — creating an API key

  1. Log in to binance.com and go to API ManagementCreate API.
  2. Choose System-generated (HMAC). Save the Secret Key immediately — it is shown only once.
  3. Under IP Restrictions, select Unrestricted (required for this tool to work).
  4. Enable the following permissions:
    • Read Info — required for viewing positions, balances, and open orders.
    • Enable Futures — required for placing / cancelling / modifying futures orders.
    • Enable Spot & Margin Trading — required for spot order management.

⚠️ For security, do not enable Enable Withdrawals or Enable Internal Transfer. Only grant the minimum permissions you need.

Full walkthrough: How to Create API Keys on Binance

Example Config (Binance)

exchange = "binance"
symbols = ["ETHUSDT", "BTCUSDT", "SOLUSDT"]
spot_symbols = ["ZKC", "BARD"]
chart_symbol = "ETHUSDT"
chart_limit = 16
default_panel = "futures"
timeout = "8s"
tz = "Asia/Shanghai"
no_color = false
retry_delay = "2s"
api_key = ""
api_secret = ""

Example Config (Gate.io)

exchange = "gate"
symbols = ["BTC_USDT", "ETH_USDT", "SOL_USDT"]
spot_symbols = ["BTC_USDT", "ETH_USDT"]
chart_symbol = "BTC_USDT"
chart_limit = 16
default_panel = "futures"
timeout = "8s"
tz = "Asia/Shanghai"
no_color = false
retry_delay = "2s"
api_key = ""
api_secret = ""

Star History

Star History Chart

About

crypto-ticker is a terminal-based crypto market viewer written in Go. It supports realtime futures and spot monitoring with live candlestick charts, rendered with a tview/tcell TUI. Binance, Gate.io, OKX, and Bitget are supported.

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /