mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 07:26:48 +00:00
Moved ticker fetching from main into the relative exchange.
This commit is contained in:
10
itbithttp.go
10
itbithttp.go
@@ -76,6 +76,16 @@ func (i *ItBit) GetFee(maker bool) (float64) {
|
||||
}
|
||||
}
|
||||
|
||||
func (i *ItBit) Run() {
|
||||
for i.Enabled {
|
||||
go func() {
|
||||
ItbitBTC := i.GetTicker("XBTUSD")
|
||||
log.Printf("ItBit BTC: Last %f High %f Low %f Volume %f\n", ItbitBTC.LastPrice, ItbitBTC.High24h, ItbitBTC.Low24h, ItbitBTC.Volume24h)
|
||||
}()
|
||||
time.Sleep(time.Second * 10)
|
||||
}
|
||||
}
|
||||
|
||||
func (i *ItBit) GetTicker(currency string) (ItBitTicker) {
|
||||
path := ITBIT_API_URL + "/markets/" + currency + "/ticker"
|
||||
var itbitTicker ItBitTicker
|
||||
|
||||
Reference in New Issue
Block a user