82b0f2f1a8
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>
23 lines
653 B
Go
23 lines
653 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)
|
|
GetAlphaPrice(symbol string) (float64, bool)
|
|
|
|
// Trading pair methods
|
|
IsSpotPair(symbol string) bool
|
|
IsFuturesPair(symbol string) bool
|
|
RefreshTradingPairCache() error
|
|
}
|