Stream Type
The HTI real-time feed uses server-sent events (SSE). It is not a WebSocket endpoint.Endpoint
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
api_code | string | Yes | Your HTI API code |
poll_seconds | number | No | Server poll interval. Supported range: 1.0 to 10.0 |
Why api_code Is In The Query String
For browser-based EventSource clients, custom headers are not always practical.
Passing api_code as a query parameter keeps the stream easy to consume from:
- Browser clients
- Desktop apps
- Python services
- Low-code tools that support SSE
JavaScript Example
Python Example
Event Types
| Event | Meaning |
|---|---|
ready | The stream is connected and ready |
ping | Heartbeat message proving the connection is alive |
idea | A new matching trade idea was delivered |
error | The server closed the stream or returned an error state |
Important Behavior
- The stream does not replay your historical backlog on connect
- Open History first if you want the most recent 10 or 20 ideas
- Only ideas that match your API profile are delivered
- If the same idea document is updated again later, the stream can emit it again as a new event
Reconnect Strategy
If the stream disconnects:- Reconnect the stream
- Call History again to recover any missed items

