21 lines
608 B
Go
21 lines
608 B
Go
|
package types
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"time"
|
||
|
|
||
|
"git.qtrade.icu/lychiyu/qbtrade/pkg/fixedpoint"
|
||
|
)
|
||
|
|
||
|
type PremiumIndex struct {
|
||
|
Symbol string `json:"symbol"`
|
||
|
MarkPrice fixedpoint.Value `json:"markPrice"`
|
||
|
LastFundingRate fixedpoint.Value `json:"lastFundingRate"`
|
||
|
NextFundingTime time.Time `json:"nextFundingTime"`
|
||
|
Time time.Time `json:"time"`
|
||
|
}
|
||
|
|
||
|
func (i *PremiumIndex) String() string {
|
||
|
return fmt.Sprintf("PremiumIndex | %s | %.4f | %s | %s | NEXT FUNDING TIME: %s", i.Symbol, i.MarkPrice.Float64(), i.LastFundingRate.Percentage(), i.Time, i.NextFundingTime)
|
||
|
}
|