Apps

BTC

# Bitcoin — BTC/USDT Price Viewer Polls the public Binance ticker feed (`/api/v3/ticker/price?symbol=BTCUSDT`) and records every sample into `.deft/btc.db` (SQLite, WAL mode). The chart is drawn from that recorded history, so it survives restarts and keeps showing prices when the feed is unreachable. The stats row shows the percentage change over the selected range (the latest price at or before the start of the window vs. the current price), labelled with the range name (`1h` / `24h` / `7d` / `30d`). ## Key Bindings | Key | Action | |-----|--------| | `1` `2` `3` `4` | Chart time range: 1h / 24h / 7d / 30d (re-queried from the DB) | | `+` | Poll more often (decreases interval by 10s; persists `btc/poll-seconds` to `.deft/config.dft`) | | `-` | Poll less often (increases interval by 10s; persists `btc/poll-seconds` to `.deft/config.dft`) | | `r` | Poll the feed now | ## Configuration `btc/poll-seconds` in the config registry (default 60, clamped 10–3600). ## Schema ```sql CREATE TABLE prices ( ts INTEGER PRIMARY KEY, -- epoch seconds price REAL NOT NULL -- BTC/USDT spot ); ```` Query history with any sqlite client or the in-app sqlite viewer, e.g. `SELECT * FROM prices WHERE ts >= strftime('%s','now','-7 days')`.