diff --git a/exchanges/ftx/ftx_types.go b/exchanges/ftx/ftx_types.go index 718714d7..ecd061ec 100644 --- a/exchanges/ftx/ftx_types.go +++ b/exchanges/ftx/ftx_types.go @@ -553,9 +553,10 @@ type OptionFillsData struct { // AuthenticationData stores authentication variables required type AuthenticationData struct { - Key string `json:"key"` - Sign string `json:"sign"` - Time int64 `json:"time"` + Key string `json:"key"` + Sign string `json:"sign"` + Time int64 `json:"time"` + SubAccount string `json:"subaccount,omitempty"` } // Authenticate stores authentication variables required diff --git a/exchanges/ftx/ftx_websocket.go b/exchanges/ftx/ftx_websocket.go index f84d6c8c..601ce1a0 100644 --- a/exchanges/ftx/ftx_websocket.go +++ b/exchanges/ftx/ftx_websocket.go @@ -90,11 +90,13 @@ func (f *FTX) WsAuth() error { sign := crypto.HexEncodeToString(hmac) req := Authenticate{Operation: "login", Args: AuthenticationData{ - Key: f.API.Credentials.Key, - Sign: sign, - Time: intNonce, + Key: f.API.Credentials.Key, + Sign: sign, + Time: intNonce, + SubAccount: f.API.Credentials.Subaccount, }, } + return f.Websocket.Conn.SendJSONMessage(req) }