mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: add stringer on type ticker
This commit is contained in:
parent
7a5a027a62
commit
117d7f008f
|
@ -1,8 +1,10 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
)
|
||||
|
||||
type Ticker struct {
|
||||
|
@ -15,3 +17,7 @@ type Ticker struct {
|
|||
Buy fixedpoint.Value // `buy` from Max, `bidPrice` from binance
|
||||
Sell fixedpoint.Value // `sell` from Max, `askPrice` from binance
|
||||
}
|
||||
|
||||
func (t *Ticker) String() string {
|
||||
return fmt.Sprintf("O:%s H:%s L:%s LAST:%s BID/ASK:%s/%s TIME:%s", t.Open, t.High, t.Low, t.Last, t.Buy, t.Sell, t.Time.String())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user