mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
exchanges/kraken,bittrex,gemini: Resolve Kraken panic, lint corrections, Bittrex batch tickers, set Gemini order limits and update tradable pairs (#1372)
* fix kraken, batch bittrex, fix lint * surprise gemini! * thought this happened automatically * fix before shazbert sees * fixes annoying atoi bug * rm futures from gemini * lint * bittrex UpdatedAt, gemini Limits, stats relook * STATS used HARDEN!(improve stats package) * Whoopsies in your Daisies * rm RWMutex, json stringeroo * fixes additional index issues 😆 😭
This commit is contained in:
@@ -1727,12 +1727,15 @@ func (k *Kraken) GetFuturesContractDetails(ctx context.Context, item asset.Item)
|
||||
} else {
|
||||
underlyingStr = underlyingBase[1]
|
||||
}
|
||||
usdIndex := strings.Index(underlyingStr, "usd")
|
||||
usdIndex := strings.LastIndex(strings.ToLower(underlyingStr), "usd")
|
||||
if usdIndex <= 0 {
|
||||
log.Warnf(log.ExchangeSys, "%v unable to find USD index in %v to process contract", k.Name, underlyingStr)
|
||||
continue
|
||||
}
|
||||
underlying, err = currency.NewPairFromStrings(underlyingStr[0:usdIndex], underlyingStr[usdIndex:])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var s, e time.Time
|
||||
if result.Instruments[i].OpeningDate != "" {
|
||||
s, err = time.Parse(time.RFC3339, result.Instruments[i].OpeningDate)
|
||||
|
||||
Reference in New Issue
Block a user