mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10:42 +00:00
Adds GetTickerPrice(currency string) TickerPrice func to interface. Implements on all exchanges (where possible)
Attempts to make routing generic with /exchanges/{exchangeName}/latest/{currency} path and response
This commit is contained in:
10
itbithttp.go
10
itbithttp.go
@@ -134,6 +134,16 @@ func (i *ItBit) GetTicker(currency string) ItBitTicker {
|
||||
return itbitTicker
|
||||
}
|
||||
|
||||
func (i *ItBit) GetTickerPrice(currency string) TickerPrice {
|
||||
var tickerPrice TickerPrice
|
||||
ticker := i.GetTicker(currency)
|
||||
|
||||
tickerPrice.Ask = ticker.Ask
|
||||
tickerPrice.Bid = ticker.Bid
|
||||
|
||||
return tickerPrice
|
||||
}
|
||||
|
||||
type ItbitOrderbookEntry struct {
|
||||
Quantitiy float64 `json:"quantity,string"`
|
||||
Price float64 `json:"price,string"`
|
||||
|
||||
Reference in New Issue
Block a user