# List events

URL: https://docs.fxapis.com/api-reference/events/list-events

> List events. Everything that happened in this workspace while its plan included webhooks, exactly as webhooks deliver it, kept 7, 30 or 90 days by plan…

`GET https://api.fxapis.com/v1/events`

Everything that happened in this workspace while its plan included webhooks, exactly as webhooks deliver it, kept 7, 30 or 90 days by plan — whether or not a webhook endpoint was listening. Events from a time the plan did not include webhooks are not recorded, so they are not listed.

An event appears in the list a few seconds after it happens, and only once every earlier event has, so a page never moves past one that has not appeared yet — except an event stuck more than 15 minutes before it could be prepared for sending (rare; we alert on it), which stops holding the list back and so, once it does appear, may fall behind an `after=` loop that already paged past its moment.

**Catching up after downtime:** keep an anchor id taken only from the last item of a list page you processed — never from a webhook: webhooks do not arrive in list order (sends run in parallel and retries are spread out), so a webhook's id can be newer than an event still retrying. On start, call `?after=<anchor>` and keep calling with the last id of each page until a page comes back empty. Then check `delivery_status=failed`, or run a replay, for anything given up on. Deduplicate on `id`. With `after`, events come oldest first. Without it, newest first, paged by `nextCursor`. An `after` id older than your plan keeps answers `400 EVENT_NOT_IN_HISTORY`: resume from `since` instead.

Authentication: `Authorization: Bearer <API key>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `after` | query | string | no | An event id: return the events after it, oldest first. To catch up, pass the id of the last event of a list page you processed — never a webhook's id, since webhooks can arrive out of order. |
| `since` | query | string (date-time) | no | Events at or after this time. |
| `until` | query | string (date-time) | no | Events before this time. |
| `type` | query | string \| "order.filled" \| "order.rejected" \| "order.unresolved" \| "order.resolved" \| "order.cancelled" \| "position.opened" \| "position.closed" \| "account.state_changed" \| "wave.settled"[] | no | Only these types: repeat it (`type=a&type=b`) or separate with commas. |
| `account_id` | query | string (uuid) | no | Events about this MT5 account, including multi-account orders with a leg on it. |
| `delivery_status` | query | "failed" | no | `failed`: events at least one of your endpoints has not received — given up on, or still retrying after a failure. |
| `limit` | query | integer | no |  |
| `cursor` | query | string | no | Without `after`: the previous page's `nextCursor`. |

#### Responses

- `200`
- `400`
- `401`
- `402`
- `403`

Failures return `{ "error": { "code", "message" } }`; every code is listed at https://docs.fxapis.com/errors.

#### 200 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | no |  |
| `data[].id` | string (uuid) | no | The same id webhooks send in the body and `fxapis-event-id`. Deduplicate on it. |
| `data[].type` | "order.filled" \| "order.rejected" \| "order.unresolved" \| "order.resolved" \| "order.cancelled" \| "position.opened" \| "position.closed" \| "account.state_changed" \| "wave.settled" | no |  |
| `data[].createdAt` | string (date-time) | no |  |
| `data[].data` | object | no | The resource as the REST API presented it when the event was sent out. |
| `page` | object | no |  |
| `page.hasMore` | boolean | no |  |
| `page.nextCursor` | null \| string | no |  |