# Strategy Alerts

> Consume persisted Mist strategy alert events through backend APIs. Fetch pending alerts and record delivery success or failure without evaluating strategy rules or querying datasource services.

- Skill: `mist-trade/strategy-alerts` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mist-trade/strategy-alerts`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mist-trade/strategy-alerts/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mist-trade (https://skillmd.com/u/mist-trade)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mist-trade/strategy-alerts

---


# Strategy Alerts

Consume strategy alerts already generated by the Mist backend scheduler or
manual strategy scan APIs.

## Helper Functions

Import the shared helpers from an environment where `shared/` is available:

```python
from shared.strategy_alerts import (
    list_pending_strategy_alerts,
    mark_strategy_alert_delivered,
    mark_strategy_alert_failed,
)
```

## Consumption Flow

1. Call `list_pending_strategy_alerts()` to fetch events from
   `/v1/strategy-alert-events?status=pending`.
2. Deliver the alert through AstrBot or the active bot runtime.
3. On success, call `mark_strategy_alert_delivered(event_id, delivery_result)`.
4. On failure, call `mark_strategy_alert_failed(event_id, delivery_result)`.

`delivery_result` should be a small object such as:

```python
{"channel": "astrbot", "messageId": "msg-1"}
```

or:

```python
{"channel": "astrbot", "error": "bot unavailable"}
```

## Guardrails

- Do not execute strategy rules in AstrBot.
- Do not query datasource, raw provider, TDX, or QMT APIs.
- Do not create strategy signals from this skill.
- Treat operator acknowledgement as a separate backend/UI action.

