mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 07:26:49 +00:00
ftx: fix websocket authentication of subaccounts (#801)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user