BTCMarkets: Add subscription configuration (#1624)

* Subscription: Add List.GroupByPairs

* BTCMarkets: Add subscription conf

* BTCMarkets: Upgrade test config
This commit is contained in:
Gareth Kirwan
2024-12-05 04:50:10 +01:00
committed by GitHub
parent 6b79e4c0b4
commit 0c4b070ebc
8 changed files with 139 additions and 50 deletions

View File

@@ -3,7 +3,6 @@ package exchange
import (
"bufio"
"context"
"errors"
"fmt"
"log"
"net/http"
@@ -38,11 +37,8 @@ func Setup(e exchange.IBotExchange) error {
if err != nil {
return fmt.Errorf("LoadConfig() error: %w", err)
}
parts := strings.Split(fmt.Sprintf("%T", e), ".")
if len(parts) != 2 {
return errors.New("unexpected parts splitting exchange type name")
}
eName := parts[1]
e.SetDefaults()
eName := e.GetName()
exchConf, err := cfg.GetExchangeConfig(eName)
if err != nil {
return fmt.Errorf("GetExchangeConfig(`%s`) error: %w", eName, err)