TraderMemos

Alerts

GET/api/v1/settings/alerts

Which journal rules fire notifications and their thresholds. Rules: risk rule broken (per trade, thresholds from /settings/risk-rules), daily loss limit hit, N consecutive losses, prop drawdown approaching, and unreviewed trades piling up. Defaults are returned until saved; enabled is the master switch and starts off. Alerts are evaluated after trade writes and on a background scan, then delivered to every enabled channel. Free — never gated.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/settings/alerts"
{  "enabled": true,  "timezone": "string",  "rule_risk": true,  "rule_daily_loss": true,  "rule_loss_streak": true,  "loss_streak_n": 3,  "rule_prop_drawdown": true,  "prop_warn_pct": 0.8,  "rule_unreviewed": true,  "unreviewed_days": 7}
PUT/api/v1/settings/alerts

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PUT "https://example.com/api/v1/settings/alerts" \  -H "Content-Type: application/json" \  -d '{}'
{  "enabled": true,  "timezone": "string",  "rule_risk": true,  "rule_daily_loss": true,  "rule_loss_streak": true,  "loss_streak_n": 3,  "rule_prop_drawdown": true,  "prop_warn_pct": 0.8,  "rule_unreviewed": true,  "unreviewed_days": 7}
GET/api/v1/settings/alert-channels

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Response Body

application/json

curl -X GET "https://example.com/api/v1/settings/alert-channels"
[  {    "id": "string",    "kind": "webhook",    "target": "string",    "label": "string",    "enabled": true,    "last_sent_at": "2019-08-24T14:15:22Z",    "last_status": "string",    "last_error": "string"  }]
POST/api/v1/settings/alert-channels

Registers an outgoing webhook. Alerts POST a JSON payload whose content (Discord) and text (Slack/Mattermost) fields mirror the alert, and set an X-Title header (ntfy). Expo push channels register through POST /me/push-tokens instead. Re-posting the same URL updates its label and re-enables it. Deliveries never follow redirects and refuse loopback/private addresses unless the server sets TM_ALERTS_ALLOW_PRIVATE_WEBHOOKS=1 (for e.g. a LAN ntfy).

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/settings/alert-channels" \  -H "Content-Type: application/json" \  -d '{    "kind": "webhook",    "target": "string"  }'
{  "id": "string",  "kind": "webhook",  "target": "string",  "label": "string",  "enabled": true,  "last_sent_at": "2019-08-24T14:15:22Z",  "last_status": "string",  "last_error": "string"}
PATCH/api/v1/settings/alert-channels/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X PATCH "https://example.com/api/v1/settings/alert-channels/string" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
Empty
DELETE/api/v1/settings/alert-channels/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Path Parameters

id*string

Response Body

curl -X DELETE "https://example.com/api/v1/settings/alert-channels/string"
Empty
POST/api/v1/settings/alert-channels/{id}/test

Delivers a test alert through the channel and records the outcome on it. Returns 200 either way; ok: false carries the delivery error.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Path Parameters

id*string

Response Body

application/json

curl -X POST "https://example.com/api/v1/settings/alert-channels/string/test"
{  "ok": true,  "error": "string"}
GET/api/v1/alerts/events

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Query Parameters

limit?integer
Range1 <= value <= 200
Default50

Response Body

application/json

curl -X GET "https://example.com/api/v1/alerts/events"
[  {    "id": "string",    "rule": "string",    "title": "string",    "body": "string",    "fired_at": "2019-08-24T14:15:22Z"  }]
POST/api/v1/me/push-tokens

Called by the mobile app after obtaining an Expo push token. Creates (or re-enables) an expo alert channel; dead tokens are disabled automatically when Expo reports the device gone.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/me/push-tokens" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "id": "string",  "kind": "webhook",  "target": "string",  "label": "string",  "enabled": true,  "last_sent_at": "2019-08-24T14:15:22Z",  "last_status": "string",  "last_error": "string"}
DELETE/api/v1/me/push-tokens

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT access token or personal access token (tm_pat_…).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/api/v1/me/push-tokens" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
Empty