> For the complete documentation index, see [llms.txt](https://docs.infoway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infoway.io/en-docs/getting-started/http-protocols.md).

# HTTP Protocols

### 1.1 Request Protocol

All HTTP endpoints use the `GET` method. You must include your **API Key** in the request headers for authentication.

<figure><img src="/files/MvHDZBTgHvGn7I515LsX" alt=""><figcaption></figcaption></figure>

### 1.2 Response Format

All responses are returned in **JSON** format.

#### **Example Response**

```json
{
    "ret": 200,
    "msg": "success",
    "traceId": "698f920a-c53b-401c-bfac-4ea46b9b8f12",
    "data": [
        
    ]
}
```

#### Response Fields

<table><thead><tr><th width="99.7777099609375">Field</th><th>Description</th></tr></thead><tbody><tr><td><code>ret</code></td><td>Response code. <code>200</code> indicates a successful response. Other values correspond to specific error codes (see <a href="/pages/S1qUrjmiVyUWQ8ZqTHbS"><em>Error Codes</em> section</a>).</td></tr><tr><td><code>msg</code></td><td>A brief message describing the request status, e.g., <code>"success"</code>.</td></tr><tr><td><code>traceId</code></td><td>A unique identifier automatically generated by the system for each request. Useful for debugging and tracing requests in logs.</td></tr><tr><td><code>data</code></td><td>The actual data payload returned by the API. The structure depends on the specific endpoint called.</td></tr></tbody></table>

### 2. WebSocket Protocol Overview

All WebSocket connections share the **same base URL**.\
Different data types (stocks, crypto, forex, etc.) are distinguished by **subscription parameters** rather than separate endpoints.

Please refer to the following sections for details:

* [**WebSocket Subscription Address Specification**](/en-docs/websocket/subscription-address.md) — defines how to construct subscription URLs and parameters.
* [**WebSocket Example Code**](/en-docs/websocket/websocket-code-example.md) — provides sample code for establishing and maintaining a live connection.
