https://github.com/danielinux7/backtick
Replay Binance markets bar-by-bar and tick-by-tick with real bid/ask time & sales, footprint, and hypothetical trades. Open source, local-first.
https://github.com/danielinux7/backtick
backtesting binance cryptocurrency fastapi lightweight-charts order-flow pwa replay trading trading-tools
Last synced: 1 day ago
JSON representation
Replay Binance markets bar-by-bar and tick-by-tick with real bid/ask time & sales, footprint, and hypothetical trades. Open source, local-first.
- Host: GitHub
- URL: https://github.com/danielinux7/backtick
- Owner: danielinux7
- License: mit
- Created: 2026-05-22T17:27:26.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-16T15:47:11.000Z (14 days ago)
- Last Synced: 2026-06-16T17:14:44.671Z (14 days ago)
- Topics: backtesting, binance, cryptocurrency, fastapi, lightweight-charts, order-flow, pwa, replay, trading, trading-tools
- Language: Python
- Homepage: https://backtick.to
- Size: 1.76 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backtick
**Replay the market tick by tick.** Backtick is a local-first, open-source web app
for replaying Binance history candle-by-candle *and* trade-by-trade โ with a real
bid/ask tape, footprint, and hypothetical trades โ built for discretionary
backtesting.
๐ **Live:** [backtick.to](https://backtick.to) ยท ๐ [Docs](https://backtick.to/docs) ยท โน๏ธ [About](https://backtick.to/about)

## Why it's different
Most replay tools just move a candle forward. Backtick surfaces the order flow
*inside* the bar โ the reads other platforms gate behind a premium tier:
- **True time & sales** โ every print tagged buy/sell from Binance aggTrades' real
`is_buyer_maker` flag (green = aggressive buy at the ask, orange = sell at the
bid), with a large-prints percentile highlighter.
- **Tick-by-tick replay + synced tape** โ step or auto-play individual aggTrades as
the forming candle rebuilds, with the tape in lockstep; 1รโ200ร.
- **Footprint** โ per-candle buy/sell volume by price level, so absorption and
imbalance are visible inside the bar.
- **Open source & local-first** โ runs on your machine, reads straight from Binance,
and your hypothetical trades stay in your own session.
Plus the usual sandbox: candle replay, market/limit trades with SL/TP, indicators
(EMA / RSI / CVD / Volume / Volume Profile / Liquidations), drawing tools, a
watchlist, live + replay modes, and an installable PWA.
## Quickstart
Uses a virtualenv (never install into system Python):
```bash
python3 -m venv /tmp/backtick_venv
/tmp/backtick_venv/bin/pip install -r requirements.txt -r requirements-dev.txt
/tmp/backtick_venv/bin/uvicorn backend.main:app --reload --port 8765
```
Open โ the marketing landing is at `/`, the chart app at
`/app`. It opens on SOLUSDT 4h, roughly two months back, so there's something to
step through immediately.
## Tests
```bash
/tmp/backtick_venv/bin/pytest -q # backend unit tests (no network)
npx playwright test # frontend E2E smoke (needs server on :8765)
```
Unit tests cover the riskiest logic โ gap-fill (`_missing_ranges`) and trade
SL/TP/limit fills + snapshot round-trip. The Playwright smoke test hits live
Binance, so treat a network failure as flaky, not a regression.
## Layout
```
backend/
main.py FastAPI app + chart/replay routes, page routes, /healthz
binance.py historical klines via Binance REST + parquet cache w/ gap-fill
replay.py Session / Trade / SessionStore; SL/TP + limit-fill logic
aggtrades.py aggTrades fetch for tick replay / CVD
auth.py, routes_auth.py, db.py, models.py, snapshots.py, exchange_info.py
frontend/
landing.html, docs.html, about.html, contact.html marketing site (no-JS)
site.css marketing styles
index.html, app.js, style.css the chart app
avatars.js, symbol-picker.js, pwa.js, auth-modal.js
sw.js service worker (CACHE_VERSION bumped per deploy)
manifest.webmanifest, icons/
scripts/
bump_sw_version.py content-hashes the shell into sw.js CACHE_VERSION
```
## Deploy
Deploys to [Render](https://render.com) from `render.yaml` (auto-deploy on push to
`main`). The build runs `scripts/bump_sw_version.py` so clients pick up new frontend
assets via the service-worker cache. Secrets โ `SESSION_SECRET`, Google OAuth
(`GOOGLE_CLIENT_ID` / `GOOGLE_CLIENT_SECRET`) โ live in environment variables, never
in the repo.
## Disclaimer
Backtick is a backtesting and education tool, not financial advice. Markets are
risky; nothing here is a recommendation to trade.
## License
[MIT](LICENSE) ยฉ 2026 Danial Zakaria