914beea5ce
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>
22 lines
607 B
Go
22 lines
607 B
Go
package data
|
|
|
|
import "me.thuanle/bbot/internal/data/market"
|
|
|
|
type IMarket interface {
|
|
GetFuturePrice(symbol string) (float64, float64, int64, bool)
|
|
GetAllPremiumIndex() (map[string]market.PremiumIndex, error)
|
|
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() error
|
|
}
|