> For the complete documentation index, see [llms.txt](https://docs.pretoke.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pretoke.xyz/api-reference/notifications.md).

# Notifications

{% hint style="warning" %}
**Auth required:** Yes
{% endhint %}

***

## GET /notifications

List your notifications (order fills, settlement confirmations, market resolutions, and other account activity).

### Query parameters

| Param      | Type   | Description               |
| ---------- | ------ | ------------------------- |
| `page`     | number | Page number (optional)    |
| `pageSize` | number | Items per page (optional) |

### Code examples

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

```bash
curl -X GET "https://predict.pretoke.xyz/api/v1/notifications" \
  -H "Authorization: Bearer <token>"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('https://predict.pretoke.xyz/api/v1/notifications', {
  headers: { 'Authorization': `Bearer ${accessToken}` }
});
const { data: notifications } = await response.json();

notifications.forEach(n => {
  console.log(`[${n.type}] ${n.title}: ${n.body}`);
});
```

{% endtab %}

{% tab title="Python" %}

```python
response = requests.get(
    "https://predict.pretoke.xyz/api/v1/notifications",
    headers={"Authorization": f"Bearer {access_token}"}
)
notifications = response.json()["data"]
for n in notifications:
    print(f"[{n['type']}] {n['title']}: {n['body']}")
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const { data: result } = await axios.get('https://predict.pretoke.xyz/api/v1/notifications', {
  headers: { Authorization: `Bearer ${accessToken}` }
});
result.data.forEach(n => console.log(`[${n.type}] ${n.title}`));
```

{% endtab %}
{% endtabs %}

### Response `200 OK`

```json
{
  "data": [
    {
      "id": "ntf_01hz...",
      "type": "TRADE_FILLED",
      "title": "Order filled",
      "body": "Your buy order for 100 YES shares on \"Fed cuts rates\" was filled at $0.63.",
      "metadata": { "marketId": "mkt_01hz...", "tradeId": "trd_01hz..." },
      "delivered": true,
      "read": false,
      "createdAt": "2026-07-06T09:12:00Z"
    }
  ],
  "requestId": "..."
}
```

| Field       | Description                                                                             |
| ----------- | --------------------------------------------------------------------------------------- |
| `type`      | Notification category: `TRADE_FILLED`, `SETTLEMENT_CONFIRMED`, `MARKET_RESOLVED`, etc.  |
| `delivered` | Whether the notification was successfully delivered through its channel (e.g. Telegram) |
| `read`      | Whether you've seen it in-app                                                           |
| `metadata`  | Free-form context object, shape depends on `type`                                       |

{% hint style="info" %}
If you connected via the Telegram Mini App, matching notifications are also delivered as Telegram messages from the platform's bot, independent of this REST endpoint.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.pretoke.xyz/api-reference/notifications.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
