From 713734c083cd2189593d49a17b5e4f714f3c3810 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Sun, 7 Aug 2016 04:06:53 +1000 Subject: [PATCH] Added BTCe ticker dashboard support. --- btcehttp.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/btcehttp.go b/btcehttp.go index a220ae9b..6715f8b6 100644 --- a/btcehttp.go +++ b/btcehttp.go @@ -189,18 +189,16 @@ func (b *BTCE) GetTicker(symbol string) (map[string]BTCeTicker, error) { return response.Data, nil } -/// This getticker is different, so I'll let someone else implement.... -/// Or I will, just later... func (b *BTCE) GetTickerPrice(currency string) TickerPrice { var tickerPrice TickerPrice - /*ticker, err:= b.GetTicker(currency) - if err != nil { - log.Println(err) - return tickerPrice - } + ticker := b.Ticker[currency] tickerPrice.Ask = ticker.Buy tickerPrice.Bid = ticker.Sell - */ + tickerPrice.CryptoCurrency = currency + tickerPrice.Low = ticker.Low + tickerPrice.Last = ticker.Last + tickerPrice.Volume = ticker.Vol_cur + tickerPrice.High = ticker.High return tickerPrice }