---
title: "Stream account events"
url: https://docs.truemarkets.co/api/events/stream-events
description: "Opens a Server-Sent Events stream of the caller's order, transfer and ramp events. A user token streams that user's events; an organization token streams the events of every user the organization serves. TM-On-Behalf-Of is refused."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Stream account events

Opens a Server-Sent Events stream of the caller's order, transfer and ramp events. A user
token streams that user's events; an organization token streams the events of every user
the organization serves. `TM-On-Behalf-Of` is refused.

## Request

```
GET https://api.truemarkets.co/v1/events
```

### Authentication

Bearer token in `Authorization`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Last-Event-ID` | header | string | no | The last `id` received, to resume after it. Up to 20 digits. |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

The event stream. It opens with `retry: <ms>` (1000 to 5000), then sends each event as `id: <seq>`, `event: <type>` and `data: <EventEnvelope>`, and a `: heartbeat` comment every 15 seconds. A heartbeat carries an `id` when the stream has moved past your last event, so your last `id` keeps up even when you get no events of your own. Reconnect with `Last-Event-ID` set to the last `id` received to resume with no gap and no duplicate. If the stream can't resume from that id, it sends an `event: reset` frame with an `id` and a `ResetEvent`, then continues live. A reset during the stream (you fell behind, or the stream was rebuilt) is followed by the stream closing. After any reset, refetch your REST lists, since events may have been missed, and reconnect from the reset's `id`. The server closes the stream at the earlier of the token's expiry and 30 to 35 minutes, or when it restarts. On any close, network error or non-200 response, back off (honouring `Retry-After` when present) and reconnect with your last `id`. A browser `EventSource` stops for good after a non-200 response, so recreate it.

### 400

`TM-On-Behalf-Of` was sent.

### 401

The token is missing, invalid or expired.

### 429

Too many concurrent streams from this network or on this server. Retry later.

### 503

The stream is starting up, or its position can't be read to resume your `Last-Event-ID`. Retry after the delay `Retry-After` gives.
