Commit Graph
82 Commits
Author SHA1 Message Date
Renovate Bot 34e0f6a547 fix(deps): update module github.com/adshao/go-binance/v2 to v2.8.12 2026-06-13 17:01:02 +00:00
codex e173fd7799 fix: restore canonical token lookup for market caches
Build Docker Image / build (amd64) (push) Successful in 1m25s
2026-06-08 07:17:14 +07:00
codex 3b726311f5 Merge remote-tracking branch 'origin/renovate/github.com-jedib0t-go-pretty-v6-6.x' into codex/pr-open-review-20260608 2026-06-08 07:08:02 +07:00
codex c8e916adde Merge remote-tracking branch 'origin/renovate/golang.org-x-text-0.x' into codex/pr-open-review-20260608 2026-06-08 07:07:58 +07:00
codex 2b437071a9 Merge remote-tracking branch 'origin/renovate/github.com-rs-zerolog-1.x' into codex/pr-open-review-20260608 2026-06-08 07:07:54 +07:00
Renovate Bot 7c3b3ef616 fix(deps): update module github.com/jedib0t/go-pretty/v6 to v6.8.0 2026-06-06 17:00:47 +00:00
Renovate Bot 7de2ee4cfc fix(deps): update module golang.org/x/text to v0.37.0 2026-05-09 17:00:47 +00:00
Renovate Bot 0583f90e82 fix(deps): update module github.com/rs/zerolog to v1.35.1 2026-05-02 17:00:56 +00:00
thuanle 0a1a61d8d3 update sticker id
Build Docker Image / build (amd64) (push) Successful in 1m3s
2026-04-27 10:08:37 +07:00
thuanle 5912157ed1 Merge branch 'main' of ssh://git.thuanle.me:2222/public/crypto-price-bot
Build Docker Image / build (amd64) (push) Failing after 32s
2026-04-27 09:59:13 +07:00
thuanle c5ff494e13 Merge pull request 'refactor: standardize market file naming by data dimension' (#27) from worktree-issue-26-go-filename-consistency into main
Build Docker Image / build (amd64) (push) Successful in 1m38s
Reviewed-on: #27
2026-04-27 09:53:34 +07:00
thuanleandClaude Opus 4.7 617b067203 chore: address review for market filename refactor
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>
2026-04-27 09:51:24 +07:00
thuanleandClaude Opus 4.7 f5e2e178e1 refactor: standardize market filenames by data dimension
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>
2026-04-27 07:04:37 +07:00
thuanleandClaude Opus 4.7 bc99d40713 docs: broaden spec to repo-wide go filename consistency
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>
2026-04-27 05:14:49 +07:00
thuanleandClaude Opus 4.7 8010a00e4d docs: add market filename refactor design spec
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>
2026-04-27 05:12:35 +07:00
thuanle 259a630b78 giảm file 2026-04-27 05:03:05 +07:00
thuanle f64a3521c4 remove redundant file 2026-04-27 05:03:05 +07:00
thuanle 635b0c5b39 Merge pull request 'fix: recognize spot-only tokens in IsToken' (#25) from fix/issue-24-is-token-spot-only into main
Build Docker Image / build (amd64) (push) Successful in 1m1s
Reviewed-on: #25
2026-04-27 05:00:41 +07:00
thuanleandClaude Opus 4.7 d6338fa092 fix: preserve futures token identity in canonical cache
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>
2026-04-27 04:53:54 +07:00
thuanleandClaude Opus 4.7 711721c1ee refactor: use canonical token-to-symbol maps for market lookup
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>
2026-04-27 04:44:30 +07:00
thuanleandClaude Opus 4.7 06c40ef30f refactor: separate direct and related spot resolvers
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>
2026-04-27 04:10:06 +07:00
thuanleandClaude Opus 4.7 0705e909dc fix: recognize spot-only tokens in IsToken
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>
2026-04-27 03:59:32 +07:00
thuanle 72bbe66c3e Merge pull request 'Refactor Binance symbol resolver' (#23) from binance-symbol-resolver-refactor into main
Build Docker Image / build (amd64) (push) Successful in 1m39s
Reviewed-on: #23
Reviewed-by: claudecode <38+claudecode@noreply.localhost>
2026-04-27 03:54:01 +07:00
thuanle 252e77c000 test binance symbol resolver 2026-04-27 03:46:46 +07:00
thuanle 2c5a9e23bf refactor binance symbol resolver 2026-04-27 03:32:59 +07:00
thuanleandClaude Opus 4.7 47d07f2092 style: fix gofmt alignment in resolver_test.go stub
Build Docker Image / build (amd64) (push) Successful in 1m3s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 21:15:53 +07:00
thuanleandclaudecode 72fdb598af fix: resolve shared symbol mapping for token command (#22)
Build Docker Image / build (amd64) (push) Successful in 1m36s
Co-authored-by: thuanle <tl@thuanle.me>
Co-committed-by: thuanle <tl@thuanle.me>
2026-04-26 21:13:06 +07:00
thuanle 1486681ef9 Merge pull request 'fix: independent token source lookups' (#19) from feat/token-message-rich into main
Build Docker Image / build (amd64) (push) Successful in 2m10s
2026-04-26 18:51:17 +07:00
thuanle a4644f5982 Merge branch 'main' into feat/token-message-rich 2026-04-26 18:39:53 +07:00
thuanleandClaude Opus 4.7 82b0f2f1a8 feat: fetch alpha price by symbol ticker
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>
2026-04-26 18:22:48 +07:00
thuanleandClaude Opus 4.7 6e8a2e8f68 fix: decouple token spot/future/alpha lookups
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>
2026-04-26 18:13:13 +07:00
thuanleandClaude Opus 4.7 194a235065 docs: document required environment variables
Build Docker Image / build (amd64) (push) Successful in 59s
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>
2026-04-26 17:50:41 +07:00
thuanle c841ca4421 Merge pull request 'Add rich unified token price message' (#17) from feat/token-message-rich into main
Build Docker Image / build (amd64) (push) Successful in 1m2s
2026-04-26 17:41:17 +07:00
thuanleandClaude Opus 4.7 95e9217ef4 fix: render basis with explicit sign and absolute delta
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>
2026-04-26 17:39:57 +07:00
thuanleandClaude Opus 4.7 88de029e14 feat: unify token message composition across sources
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>
2026-04-26 17:19:59 +07:00
thuanleandClaude Opus 4.7 2f875032f6 feat: add rich token message renderer with conditional rows
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>
2026-04-26 17:18:34 +07:00
thuanleandClaude Opus 4.7 b376eba674 Ignore local worktree directory
Add .worktrees to gitignore to prevent worktree contents from being
tracked in the repository.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-26 17:14:52 +07:00
thuanleandClaude Opus 4.7 e565503f24 Add rich token message design spec
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>
2026-04-26 17:09:23 +07:00
thuanle 77036f2211 Merge pull request 'Update module github.com/jedib0t/go-pretty/v6 to v6.7.10' (#14) from renovate/github.com-jedib0t-go-pretty-v6-6.x into main
Build Docker Image / build (amd64) (push) Successful in 1m11s
2026-04-26 16:52:45 +07:00
Renovate Botandthuanle d13c76a93d Update module github.com/jedib0t/go-pretty/v6 to v6.7.10 2026-04-26 16:52:29 +07:00
thuanle cdd5f8d4af Merge pull request 'Update module github.com/go-resty/resty/v2 to v2.17.2' (#13) from renovate/github.com-go-resty-resty-v2-2.x into main
Build Docker Image / build (amd64) (push) Successful in 2m16s
2026-04-26 16:51:22 +07:00
Renovate Botandthuanle 93b6c42842 Update module github.com/go-resty/resty/v2 to v2.17.2 2026-04-26 16:49:28 +07:00
thuanle ee6c181cd6 Merge pull request 'Remove ETH special portfolio tracking' (#16) from chore/remove-eth-special-case into main
Build Docker Image / build (amd64) (push) Successful in 1m0s
Reviewed-on: #16
2026-04-26 16:45:36 +07:00
thuanle 4cab108549 Merge branch 'main' into chore/remove-eth-special-case 2026-04-26 16:45:27 +07:00
thuanle 733cf48e41 Merge pull request 'Rewrite price lookup from WebSocket to REST API' (#15) from feat/rest-price-lookup into main
Build Docker Image / build (amd64) (push) Successful in 1m37s
Reviewed-on: #15
2026-04-26 16:19:28 +07:00
thuanleandClaude Opus 4.7 914beea5ce Address PR #15 round 2: fail-closed admin guard, sync init, error reporting
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>
2026-04-26 16:03:22 +07:00
thuanleandClaude Opus 4.7 c7128ff516 Address PR #15 review: batch API calls and admin-guard /refresh
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>
2026-04-26 15:40:00 +07:00
thuanleandClaude Opus 4.7 59da49c17f Remove ETH special portfolio tracking
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>
2026-04-26 15:14:39 +07:00
thuanleandClaude Opus 4.7 9c39423315 Rewrite price lookup from WebSocket to REST API
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>
2026-04-26 15:14:09 +07:00
thuanleandClaude Opus 4.7 c5c1cdf0d5 Add hourly Alpha token cache refresh
Build Docker Image / build (amd64) (push) Successful in 58s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 01:58:50 +07:00