running the websocket if enabled
@@ -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
