mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
support currency pair notation without - (used by AllActiveExchangesAndCurrencies)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package gdax
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
@@ -80,6 +81,9 @@ func (e *GDAX) GetExchangeAccountInfo() (exchange.ExchangeAccountInfo, error) {
|
||||
}
|
||||
|
||||
func (g *GDAX) GetTickerPrice(currency string) (ticker.TickerPrice, error) {
|
||||
if len(currency) == 6 {
|
||||
currency = fmt.Sprintf("%s-%s", currency[0:3], currency[3:])
|
||||
}
|
||||
tickerNew, err := ticker.GetTicker(g.GetName(), currency[0:3], currency[4:])
|
||||
if err == nil {
|
||||
return tickerNew, nil
|
||||
|
||||
Reference in New Issue
Block a user