Commit Graph

19 Commits

Author SHA1 Message Date
thuanle 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
thuanle 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
thuanle ced55e5f16 Add dedicated Alpha token price display with 24h change
Build Docker Image / build (amd64) (push) Successful in 1m31s
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>
2026-04-25 01:51:56 +07:00
thuanle 440fa3bacd Fix concurrent map read/write race condition in MarketData
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>
2026-04-25 00:15:22 +07:00
thuanle 97c627e97c trang bức amount
Build Docker Image / build (amd64) (push) Successful in 21s
2025-09-19 10:37:31 +07:00
thuanle 92a11492fb trang bức mode
Build Docker Image / build (amd64) (push) Successful in 21s
2025-09-18 12:59:03 +07:00
thuanle 78f2aca4c5 fix format
Build Docker Image / build (amd64) (push) Successful in 17s
2025-09-12 12:38:35 +07:00
thuanle be46315860 update BacFoy goal
Build Docker Image / build (amd64) (push) Successful in 23s
2025-09-12 12:32:43 +07:00
thuanle a04bbf5bfa update BacFoy
Build Docker Image / build (amd64) (push) Successful in 2m41s
2025-09-12 12:24:20 +07:00
thuanle f9d0f2efc8 BacFoy Delta
Build Docker Image / build (amd64) (push) Successful in 2m34s
2025-08-22 23:21:02 +07:00
thuanle b80620d376 BacFoy Delta
Build Docker Image / build (amd64) (push) Successful in 3m45s
2025-08-22 23:11:56 +07:00
thuanle 76079a42b3 BacFoy Delta
Build Docker Image / build (amd64) (push) Successful in 19s
2025-08-22 23:04:30 +07:00
thuanle a3b2db7666 BacFoy Delta
Build Docker Image / build (amd64) (push) Successful in 2m9s
2025-08-22 22:54:27 +07:00
thuanle b9e6abf4cf add bacfoy eth
Build Docker Image / build (amd64) (push) Successful in 5m28s
2025-08-22 22:06:02 +07:00
thuanle 7228d659a2 add bacfoy eth
Build Docker Image / build (amd64) (push) Successful in 5m48s
2025-08-22 21:55:51 +07:00
thuanle 94a11e8d68 add margin
Build Docker Image / build (amd64) (push) Successful in 1m47s
2024-10-24 10:58:32 +07:00
thuanle b60fcb842d CI
Build Docker Image / build (amd64) (push) Successful in 1m40s
2024-10-24 10:05:04 +07:00
thuanle 92a63c7885 init code 2024-10-24 09:53:23 +07:00
thuanle a7559b3f9d init code 2024-10-24 09:53:02 +07:00