Skip to content

feat: add futures/perpetual symbol support#1

Merged
Alorse merged 4 commits into
mainfrom
feature/futures-symbols
Apr 23, 2026
Merged

feat: add futures/perpetual symbol support#1
Alorse merged 4 commits into
mainfrom
feature/futures-symbols

Conversation

@Alorse
Copy link
Copy Markdown
Owner

@Alorse Alorse commented Apr 23, 2026

Summary

Adds support for futures/perpetual (swap) symbols across all scanner commands in trading-cli.

  • fetch-symbols gains a --futures flag to download type=swap symbols from TradingView, saving them as {exchange}_futures.txt
  • All 8 scanner commands gain a --futures flag to switch from spot to perpetual markets
  • Backward compatible: existing commands without --futures continue to work exactly as before
  • Symbol lists for all 13 exchanges downloaded and embedded
  • Documentation updated in README.md and docs/TOOLS.md

Commands supporting --futures

  • top-gainers
  • top-losers
  • bollinger-scan
  • rating-filter
  • consecutive-candles-scan
  • advanced-candle-pattern
  • volume-breakout-scanner
  • smart-volume-scanner

Test plan

  • Build passes: go build ./cmd/trading-cli && go build ./cmd/fetch-symbols
  • Unit tests pass: go test ./pkg/tools/screener/... ./pkg/tools/patterns/... ./pkg/tools/volume/... (80 tests)
  • fetch-symbols --futures downloads .P symbols for all 13 exchanges
  • top-gainers --futures on BINANCE, KUCOIN, BYBIT returns *.P tickers
  • volume-breakout-scanner --futures on OKX returns *.P tickers
  • consecutive-candles-scan --futures on COINBASE returns *.P tickers
  • advanced-candle-pattern --futures on KRAKEN returns *.PM tickers
  • rating-filter --futures on PHEMEX returns *.P tickers
  • Backward compat verified: same commands without --futures return spot tickers (no .P)
  • coin-analysis --symbol BTCUSDT.P formats ticker correctly

Files changed

  • cmd/fetch-symbols/main.go — add --futures flag, type=swap filter
  • pkg/tools/screener/symbols.goLoadSymbols(exchange, futures bool)
  • cmd/trading-cli/stubs.go — add --futures to 8 scanner commands
  • pkg/tools/screener/{gainers,losers,bollinger,rating}.go — propagate futures
  • pkg/tools/patterns/{consecutive,advanced}.go — propagate futures
  • pkg/tools/volume/{breakout,smart}.go — propagate futures
  • pkg/tools/screener/screener_test.go — futures tests
  • pkg/tools/screener/data/*_futures.txt — 14 new embedded futures lists
  • README.md, docs/TOOLS.md — futures documentation
  • .gitignore — ignore fetch-symbols binary

🤖 Generated with Claude Code

Alorse and others added 4 commits April 23, 2026 10:54
- Ignore logs/ and local/ directories
- Remove binary download section from goreleaser
  release notes
- Update supported crypto exchanges list
- Change default exchange, timeframes, and limits
- Revise flags for fibonacci, backtest, and compare commands
- fetch-symbols: add --futures flag to download swap (perpetual) symbols
  from TradingView scanner, saving as {exchange}_futures.txt
- screener.LoadSymbols: accept futures bool to load spot or futures lists
- Propagate --futures flag through all 8 scanner commands:
  top-gainers, top-losers, bollinger-scan, rating-filter,
  consecutive-candles-scan, advanced-candle-pattern,
  volume-breakout-scanner, smart-volume-scanner
- Add test_futures.txt and tests for futures symbol loading
- Add FormatTicker test for .P suffix symbols
- Update README.md and docs/TOOLS.md with futures examples
- Download and embed futures symbol lists for all 13 exchanges

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add /fetch-symbols to .gitignore to prevent committing the
build artifact generated during development.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Alorse Alorse merged commit 97591f5 into main Apr 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant