mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 07:26:48 +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:
@@ -1259,3 +1259,42 @@ func TestGetOrderInfo(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetSymbolDetails(t *testing.T) {
|
||||
t.Parallel()
|
||||
_, err := g.GetSymbolDetails(context.Background(), "all")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
_, err = g.GetSymbolDetails(context.Background(), "btcusd")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetExchangeOrderExecutionLimits(t *testing.T) {
|
||||
t.Parallel()
|
||||
err := g.UpdateOrderExecutionLimits(context.Background(), asset.Spot)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
err = g.UpdateOrderExecutionLimits(context.Background(), asset.Futures)
|
||||
if !errors.Is(err, asset.ErrNotSupported) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
availPairs, err := g.GetAvailablePairs(asset.Spot)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for x := range availPairs {
|
||||
var limit order.MinMaxLevel
|
||||
limit, err = g.GetOrderExecutionLimits(asset.Spot, availPairs[x])
|
||||
if err != nil {
|
||||
t.Fatal(err, availPairs[x])
|
||||
}
|
||||
if limit == (order.MinMaxLevel{}) {
|
||||
t.Fatal("exchange limit should be loaded")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user