Rename pair tests to match post-refactor boundaries and remove unused alpha cache refresh helper.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Split market pair logic into spot and futures files and rename price files to plural data-dimension names without changing behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Update issue #26 design scope from market-only to repository-wide .go filename refactor while keeping behavior unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Capture approved design for issue #26 to standardize market package filenames by data dimension without behavior changes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep futureToken2Symbol keyed by raw futures token and use explicit spot-to-future alias mapping during resolver fallback lookups.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Build canonical spot/future token maps with quote priority, unify cache refresh scheduling, and switch resolver/token tests to map-based token lookups.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep IsToken checks explicit across futures and direct spot symbols, move futures-derived spot mapping to a clearly named helper, and update token data collection to use related spot resolution.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Gate token detection via spot symbol resolution so chat flow accepts spot-only tokens, and add regression coverage for the fallback path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep alpha token existence from list cache and fetch live alpha price via symbol ticker endpoint for richer token response accuracy.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collect token market data independently for spot, futures, and alpha so any available source can be rendered even if others fail.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Expand README with env setup, required TELEGRAM_TOKEN,
optional LOG_ENV and ADMIN_CHAT_ID, plus run notes.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Format basis row as +/-$abs(delta) to match the spec and avoid
awkward %+s formatting behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove alpha-first early return and build one rich message from all
available sources (spot/future/alpha) with conditional rows.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Introduce unified rich token message rendering with fixed row order
and conditional visibility based on available sources.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Document unified Telegram token message format that includes
all available sources (spot/future/alpha) with conditional rows.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1. /refresh now fail-closed: rejects all if ADMIN_CHAT_ID unset or invalid
2. Initial pair cache fill is synchronous — bot waits before accepting queries
3. /refresh reports failure when API fetch fails instead of always saying success
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1. Add GetAllPremiumIndex() to fetch all futures data in one call,
used by GetTopPrices instead of per-symbol sequential calls.
2. Add ADMIN_CHAT_ID env check to /refresh command to restrict
access to authorized users only.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Treat ETH like any other token — display only spot/future price
and funding rate, removing personal portfolio calculations.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace unreliable WebSocket connections with on-demand REST API calls
for spot and futures prices. Add cached trading pair list (refreshed
hourly) for symbol validation, and /refresh command for manual updates.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Alpha tokens now show a simplified format with price and 24h change
instead of the regular token format with empty futures/funding data.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Also update Dockerfile to golang:1.26 and go directive to 1.25.0.
Supersedes all pending renovate PR branches.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Alpha token prices are now looked up directly from Alpha data instead
of being cached into spotPrice. Remove unused ensureAlphaCacheLoaded
and shouldRefreshAlphaCache functions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add sync.RWMutex to protect future and spot price maps accessed by
WebSocket handlers (writers) and Telegram bot handlers (readers).
Also adds Alpha token support with caching.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>