feat: add futures/perpetual symbol support#1
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for futures/perpetual (swap) symbols across all scanner commands in trading-cli.
fetch-symbolsgains a--futuresflag to downloadtype=swapsymbols from TradingView, saving them as{exchange}_futures.txt--futuresflag to switch from spot to perpetual markets--futurescontinue to work exactly as beforeCommands supporting
--futurestop-gainerstop-losersbollinger-scanrating-filterconsecutive-candles-scanadvanced-candle-patternvolume-breakout-scannersmart-volume-scannerTest plan
go build ./cmd/trading-cli && go build ./cmd/fetch-symbolsgo test ./pkg/tools/screener/... ./pkg/tools/patterns/... ./pkg/tools/volume/...(80 tests)fetch-symbols --futuresdownloads.Psymbols for all 13 exchangestop-gainers --futureson BINANCE, KUCOIN, BYBIT returns*.Ptickersvolume-breakout-scanner --futureson OKX returns*.Ptickersconsecutive-candles-scan --futureson COINBASE returns*.Ptickersadvanced-candle-pattern --futureson KRAKEN returns*.PMtickersrating-filter --futureson PHEMEX returns*.Ptickers--futuresreturn spot tickers (no.P)coin-analysis --symbol BTCUSDT.Pformats ticker correctlyFiles changed
cmd/fetch-symbols/main.go— add--futuresflag,type=swapfilterpkg/tools/screener/symbols.go—LoadSymbols(exchange, futures bool)cmd/trading-cli/stubs.go— add--futuresto 8 scanner commandspkg/tools/screener/{gainers,losers,bollinger,rating}.go— propagatefuturespkg/tools/patterns/{consecutive,advanced}.go— propagatefuturespkg/tools/volume/{breakout,smart}.go— propagatefuturespkg/tools/screener/screener_test.go— futures testspkg/tools/screener/data/*_futures.txt— 14 new embedded futures listsREADME.md,docs/TOOLS.md— futures documentation.gitignore— ignorefetch-symbolsbinary🤖 Generated with Claude Code