> For the complete documentation index, see [llms.txt](https://docs.sfox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sfox.com/connect/websocket-api/websocket-feeds-1.md).

# Authentication

The sFOX WebSocket feeds described in this document require authentication.&#x20;

The authentication command should be JSON with the following properties using your Enterprise Partner Bearer Token as the `apiKey`.

<table><thead><tr><th width="187">Property</th><th width="141.33333333333331">Type</th><th>Command</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td><code>"authenticate"</code></td></tr><tr><td><code>apiKey</code></td><td>string</td><td><code>"&#x3C;YOUR-API-KEY>"</code></td></tr><tr><td><code>enterprise</code></td><td>boolean</td><td><code>true</code></td></tr></tbody></table>

{% tabs %}
{% tab title="NodeJS" %}

```javascript
const authMessage = {
   type: 'authenticate',
   apiKey: '<API_KEY>',
   enterprise: true
}
ws.send(JSON.stringify(authMessage))
```

{% endtab %}

{% tab title="Python" %}

```python
auth_message={
  "type": "authenticate",
  "apiKey": "<API KEY>",
  "enterprise": True
}

await ws.send(json_dumps(auth_message))
```

{% endtab %}

{% tab title="Example Responses" %}
Success

```json
{
  "type": "success",
  "sequence": 2,
  "timestamp": 1649898453577592461,
  "payload": {
    "action": "authenticate"
  },
  "action": "authenticate"
}
```

Failure

```json
{
  "type": "error",
  "sequence": 2,
  "timestamp": 1649898453577592461,
  "payload": {
    "action": "authenticate"
  },
  "action": "authenticate"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sfox.com/connect/websocket-api/websocket-feeds-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
