Alerts
/api/v1/settings/alertsWhich 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 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}/api/v1/settings/alertsAuthorization
bearerAuth 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}/api/v1/settings/alert-channelsAuthorization
bearerAuth 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" }]/api/v1/settings/alert-channelsRegisters 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 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"}/api/v1/settings/alert-channels/{id}Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
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 }'/api/v1/settings/alert-channels/{id}Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Response Body
curl -X DELETE "https://example.com/api/v1/settings/alert-channels/string"/api/v1/settings/alert-channels/{id}/testDelivers a test alert through the channel and records the outcome on
it. Returns 200 either way; ok: false carries the delivery error.
Authorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/settings/alert-channels/string/test"{ "ok": true, "error": "string"}/api/v1/alerts/eventsAuthorization
bearerAuth Session JWT access token or personal access token (tm_pat_…).
In: header
Query Parameters
1 <= value <= 20050Response 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" }]/api/v1/me/push-tokensCalled 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 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"}/api/v1/me/push-tokensAuthorization
bearerAuth 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" }'