mirror of https://github.com/miguelmota/cointop
market cap
Former-commit-id: 9dd23cec016dbde170e423180d24bc610caefcf4 [formerly 9dd23cec016dbde170e423180d24bc610caefcf4 [formerly 3ead24343eff902c60c345fc6bec7e780bd166a6 [formerly f7623d2699
]]]
Former-commit-id: 40b2646f106c3a6eda82e5846c40e9b8de8336f9
Former-commit-id: d66136a941af83c0c31a57d3cda716ccd3d15880 [formerly 16133181388d9b546e89d19b0cb6614090681fd8]
Former-commit-id: 5a05f52a7025e74a8bc614c1d239daf1aa458eda
pull/15/head
parent
dbbb82c33c
commit
36296b6446
@ -0,0 +1,5 @@
|
||||
package cointop
|
||||
|
||||
func (ct *Cointop) rowChanged() {
|
||||
ct.showLink()
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package cointop
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
"github.com/miguelmota/cointop/pkg/pad"
|
||||
)
|
||||
|
||||
func (ct *Cointop) updateMarket() error {
|
||||
maxX, _ := ct.g.Size()
|
||||
market, err := ct.api.GetGlobalMarketData()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Fprintln(ct.marketview, pad.Right(fmt.Sprintf("%10.stotal market cap: %s", "", humanize.Commaf(market.TotalMarketCapUSD)), maxX, " "))
|
||||
return nil
|
||||
}
|
Loading…
Reference in New Issue