This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/exchanges/deribit/deribit_test.go b/exchanges/deribit/deribit_test.go | |
index 619ce7cae..63360cc67 100644 | |
--- a/exchanges/deribit/deribit_test.go | |
+++ b/exchanges/deribit/deribit_test.go | |
@@ -3019,14 +3019,13 @@ func TestGetHistoricalFundingRates(t *testing.T) { | |
Asset: asset.Futures, | |
Pair: cp, | |
PaymentCurrency: currency.USDT, | |
- StartDate: time.Now().Add(-time.Hour * 24 * 7), | |
+ StartDate: time.Now().Add(-time.Hour * 24 * 2), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ -0,0 +1,29 @@ | |
diff --git a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
index 23717b2b7..ad8f85dc4 100644 | |
--- a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
+++ b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
@@ -189,6 +189,7 @@ func executeExchangeWrapperTests(ctx context.Context, t *testing.T, exch exchang | |
input.AssignableTo(orderSubmitParam) || | |
input.AssignableTo(orderModifyParam) || | |
input.AssignableTo(orderCancelParam) || | |
+ input.AssignableTo(latestRateRequest) || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ -0,0 +1,151 @@ | |
diff --git a/exchanges/kraken/kraken_test.go b/exchanges/kraken/kraken_test.go | |
index c10fbe10b..377275064 100644 | |
--- a/exchanges/kraken/kraken_test.go | |
+++ b/exchanges/kraken/kraken_test.go | |
@@ -28,7 +28,6 @@ import ( | |
"github.com/thrasher-corp/gocryptotrader/exchanges/order" | |
"github.com/thrasher-corp/gocryptotrader/exchanges/orderbook" | |
"github.com/thrasher-corp/gocryptotrader/exchanges/sharedtestvalues" | |
- "github.com/thrasher-corp/gocryptotrader/exchanges/stream" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func BenchmarkUpdateByID(b *testing.B) { | |
b.ReportAllocs() | |
s := newStack() | |
asks := linkedList{} | |
asksSnapshot := Items{ | |
{Price: 1, Amount: 1, ID: 1}, | |
{Price: 3, Amount: 1, ID: 3}, | |
{Price: 5, Amount: 1, ID: 5}, | |
{Price: 7, Amount: 1, ID: 7}, | |
{Price: 9, Amount: 1, ID: 9}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ -0,0 +1,210 @@ | |
diff --git a/exchanges/deribit/deribit_test.go b/exchanges/deribit/deribit_test.go | |
index d89af8ded..23a84e6f4 100644 | |
--- a/exchanges/deribit/deribit_test.go | |
+++ b/exchanges/deribit/deribit_test.go | |
@@ -7,6 +7,7 @@ import ( | |
"log" | |
"os" | |
"strconv" | |
+ "strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/exchanges/deribit/deribit_test.go b/exchanges/deribit/deribit_test.go | |
index 09c468c45..4761f54a1 100644 | |
--- a/exchanges/deribit/deribit_test.go | |
+++ b/exchanges/deribit/deribit_test.go | |
@@ -133,31 +133,43 @@ func TestFetchRecentTrades(t *testing.T) { | |
func TestGetHistoricCandles(t *testing.T) { | |
t.Parallel() | |
- _, err := d.GetHistoricCandles(context.Background(), futuresTradablePair, asset.Futures, kline.FifteenMin, time.Now().Add(-time.Minute*5), time.Now()) | |
+ start := time.Now().Add(-time.Hour) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
index 01bc2af7a..c65db6949 100644 | |
--- a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
+++ b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
@@ -289,6 +289,8 @@ func generateMethodArg(ctx context.Context, t *testing.T, argGenerator *MethodAr | |
// Crypto Chain | |
input = reflect.ValueOf(cryptoChainPerExchange[exchName]) | |
} | |
+ case "MatchSymbolWithAvailablePairs", "MatchSymbolCheckEnabled": | |
+ input = reflect.ValueOf(argGenerator.AssetParams.Pair.Base.Lower().String() + argGenerator.AssetParams.Pair.Quote.Lower().String()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/exchanges/orderbook/orderbook.go b/exchanges/orderbook/orderbook.go | |
index 42ece3929..0683aa299 100644 | |
--- a/exchanges/orderbook/orderbook.go | |
+++ b/exchanges/orderbook/orderbook.go | |
@@ -15,12 +15,20 @@ import ( | |
// Get checks and returns the orderbook given an exchange name and currency pair | |
func Get(exchange string, p currency.Pair, a asset.Item) (*Base, error) { | |
+ tt := time.Now() | |
+ defer func() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/connchecker/connchecker.go b/connchecker/connchecker.go | |
index 59705ce6f..072837719 100644 | |
--- a/connchecker/connchecker.go | |
+++ b/connchecker/connchecker.go | |
@@ -51,7 +51,7 @@ func New(dnsList, domainList []string, checkInterval time.Duration) (*Checker, e | |
if err := c.initialCheck(); err != nil { | |
return nil, err | |
} | |
- | |
+ c.mu.Lock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmd/gctcli/commands.go b/cmd/gctcli/commands.go | |
index 76efb3312..9a84799da 100644 | |
--- a/cmd/gctcli/commands.go | |
+++ b/cmd/gctcli/commands.go | |
@@ -3963,7 +3963,10 @@ func getHistoricCandles(c *cli.Context) error { | |
e := time.Now().Truncate(candleInterval) | |
s := e.Add(-candleInterval * time.Duration(candleRangeSize)) | |
- | |
+ fmt.Println(s) |
NewerOlder