(Engine) Gate-IO Websocket subscription pairs case sensitivity (#352)

* convert pairs to upper case as gateio websocket subscription is case sensative

* Update gateio_websocket.go
This commit is contained in:
Andrew
2019-09-12 15:00:24 +10:00
committed by Adrian Gallagher
parent 6579196c57
commit ba7e387643

View File

@@ -339,7 +339,8 @@ func (g *Gateio) GenerateDefaultSubscriptions() {
// Subscribe sends a websocket message to receive data from the channel
func (g *Gateio) Subscribe(channelToSubscribe wshandler.WebsocketChannelSubscription) error {
params := []interface{}{g.FormatExchangeCurrency(channelToSubscribe.Currency,
asset.Spot).String()}
asset.Spot).Upper()}
for i := range channelToSubscribe.Params {
params = append(params, channelToSubscribe.Params[i])
}
@@ -372,7 +373,7 @@ func (g *Gateio) Unsubscribe(channelToSubscribe wshandler.WebsocketChannelSubscr
ID: g.WebsocketConn.GenerateMessageID(true),
Method: unsbuscribeText,
Params: []interface{}{g.FormatExchangeCurrency(channelToSubscribe.Currency,
asset.Spot).String(), 1800},
asset.Spot).Upper(), 1800},
}
resp, err := g.WebsocketConn.SendMessageReturnResponse(subscribe.ID, subscribe)
if err != nil {