The sFOX WebSocket feeds described in this document require authentication.
The authentication command should be JSON with the following properties using your Enterprise Partner Bearer Token as the apiKey
.
const authMessage = {
type: 'authenticate',
apiKey: '<API_KEY>',
enterprise: true
}
ws.send(JSON.stringify(authMessage))
auth_message={
"type": "authenticate",
"apiKey": "<API KEY>",
"enterprise": True
}
await ws.send(json_dumps(auth_message))
Success
{
"type": "success",
"sequence": 2,
"timestamp": 1649898453577592461,
"payload": {
"action": "authenticate"
},
"action": "authenticate"
}
Failure
{
"type": "error",
"sequence": 2,
"timestamp": 1649898453577592461,
"payload": {
"action": "authenticate"
},
"action": "authenticate"
}