mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 23:16:53 +00:00
Split up common.go, file path fixes and much more
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/thrasher-/gocryptotrader/common"
|
||||
"github.com/thrasher-/gocryptotrader/common/crypto"
|
||||
"github.com/thrasher-/gocryptotrader/currency"
|
||||
exchange "github.com/thrasher-/gocryptotrader/exchanges"
|
||||
@@ -751,8 +750,8 @@ func (k *Kraken) GetTradeVolume(feeinfo bool, symbol ...string) (TradeVolumeResp
|
||||
func (k *Kraken) AddOrder(symbol, side, orderType string, volume, price, price2, leverage float64, args *AddOrderOptions) (AddOrderResponse, error) {
|
||||
params := url.Values{
|
||||
"pair": {symbol},
|
||||
"type": {common.StringToLower(side)},
|
||||
"ordertype": {common.StringToLower(orderType)},
|
||||
"type": {strings.ToLower(side)},
|
||||
"ordertype": {strings.ToLower(orderType)},
|
||||
"volume": {strconv.FormatFloat(volume, 'f', -1, 64)},
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ func (k *Kraken) FetchTradablePairs(asset assets.AssetType) ([]string, error) {
|
||||
var products []string
|
||||
for i := range pairs {
|
||||
v := pairs[i]
|
||||
if common.StringContains(v.Altname, ".d") {
|
||||
if strings.Contains(v.Altname, ".d") {
|
||||
continue
|
||||
}
|
||||
if v.Base[0] == 'X' {
|
||||
@@ -214,8 +214,8 @@ func (k *Kraken) UpdateTicker(p currency.Pair, assetType assets.AssetType) (tick
|
||||
|
||||
for _, x := range pairs {
|
||||
for y, z := range tickers {
|
||||
if !common.StringContains(y, x.Base.Upper().String()) ||
|
||||
!common.StringContains(y, x.Quote.Upper().String()) {
|
||||
if !strings.Contains(y, x.Base.Upper().String()) ||
|
||||
!strings.Contains(y, x.Quote.Upper().String()) {
|
||||
continue
|
||||
}
|
||||
var tp ticker.Price
|
||||
|
||||
Reference in New Issue
Block a user