mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 23:16:52 +00:00
stream/websocket: Consolidate fields by using exchange config pointer (#809)
* stream: add exchange config pointer to setup WebsocketSetup struct to reduce and consolidate setting of variables. * config: reduce stutter * config: reduce minor stutter * glorious: nits addr. * Update exchanges/stream/websocket.go Co-authored-by: Scott <gloriousCode@users.noreply.github.com> * websocket: implement fix * engine/helpers: fix test * exchanges: fix after merge issues * exchange_template: fix output Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
// IBotExchange enforces standard functions for all exchanges supported in
|
||||
// GoCryptoTrader
|
||||
type IBotExchange interface {
|
||||
Setup(exch *config.ExchangeConfig) error
|
||||
Setup(exch *config.Exchange) error
|
||||
Start(wg *sync.WaitGroup)
|
||||
SetDefaults()
|
||||
GetName() string
|
||||
@@ -73,7 +73,7 @@ type IBotExchange interface {
|
||||
SetClientProxyAddress(addr string) error
|
||||
SupportsREST() bool
|
||||
GetSubscriptions() ([]stream.ChannelSubscription, error)
|
||||
GetDefaultConfig() (*config.ExchangeConfig, error)
|
||||
GetDefaultConfig() (*config.Exchange, error)
|
||||
GetBase() *Base
|
||||
SupportsAsset(assetType asset.Item) bool
|
||||
GetHistoricCandles(ctx context.Context, p currency.Pair, a asset.Item, timeStart, timeEnd time.Time, interval kline.Interval) (kline.Item, error)
|
||||
|
||||
Reference in New Issue
Block a user