440fa3bacd
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>
16 lines
419 B
Go
16 lines
419 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)
|
|
}
|