Files
crypto-price-bot/internal/data/imarket.go
T
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

21 lines
539 B
Go

package data
import "me.thuanle/bbot/internal/data/market"
type IMarket interface {
GetFuturePrice(symbol string) (float64, float64, int64, bool)
GetAllFundRate() (map[string]float64, map[string]int64)
GetSpotPrice(symbol string) (float64, bool)
GetMarginInterestRates() map[string]float64
// Alpha token methods
IsAlphaToken(symbol string) bool
GetAlphaToken(symbol string) (market.AlphaTokenInfo, bool)
// Trading pair methods
IsSpotPair(symbol string) bool
IsFuturesPair(symbol string) bool
RefreshTradingPairCache()
}