From 6fc05d46d263188ac26a9731829f2e4722f05dfd Mon Sep 17 00:00:00 2001 From: Ermal Guni Date: Sun, 5 Aug 2018 15:15:34 +0200 Subject: [PATCH] running the websocket if enabled --- exchanges/okex/okex_wrapper.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exchanges/okex/okex_wrapper.go b/exchanges/okex/okex_wrapper.go index 6c8f3afa..15942258 100644 --- a/exchanges/okex/okex_wrapper.go +++ b/exchanges/okex/okex_wrapper.go @@ -2,12 +2,12 @@ package okex import ( "errors" + exchange "gocryptotrader/exchanges" "log" "sync" "github.com/thrasher-/gocryptotrader/common" "github.com/thrasher-/gocryptotrader/currency/pair" - "github.com/thrasher-/gocryptotrader/exchanges" "github.com/thrasher-/gocryptotrader/exchanges/orderbook" "github.com/thrasher-/gocryptotrader/exchanges/ticker" ) @@ -28,6 +28,10 @@ func (o *OKEX) Run() { log.Printf("%s polling delay: %ds.\n", o.GetName(), o.RESTPollingDelay) log.Printf("%s %d currencies enabled: %s.\n", o.GetName(), len(o.EnabledPairs), o.EnabledPairs) } + + if o.Websocket { + go o.WebsocketClient() + } } // UpdateTicker updates and returns the ticker for a currency pair