---
title: "Create a price alert"
method: POST
path: "/price-alerts"
tags: ["Price Alerts"]
---

# Create a price alert

`POST /price-alerts`

## Request

- Base URL: `https://madeonsol.com/api/v1`
- URL: `https://madeonsol.com/api/v1/price-alerts`
- Auth: HTTP bearer

Create a token MC dip/recovery alert. When the token's market cap drops by `drop_pct` from its recent high, the alert fires via your chosen delivery mode. Optional `recovery_pct` triggers a follow-up when MC recovers. Returns `webhook_secret` once if webhook delivery is configured.

## Request body

- object
  - `token_mint` string, required: Solana token mint address
  - `drop_pct` number, required: MC drop threshold as a percentage (e.g. 20 = fire when MC drops 20% from recent high)
  - `recovery_pct` number, nullable: Optional recovery threshold — fires when MC recovers this % from the dip low
  - `name` string, nullable: Optional human-readable label
  - `delivery_mode` 'websocket' | 'webhook' | 'both'
  - `webhook_url` string, uri, nullable: Required if delivery_mode includes webhook. HTTPS only.

## Response `200`

Alert created

- object
  - `alert` object
  - `webhook_secret` string, nullable: One-time HMAC secret — only present when webhook delivery is configured
  - `note` string

## Other responses

- `401`: Missing or invalid API key, or an expired free-tier key. Authentication-stage error: no `X-RateLimit-*` headers, no `_rid`.
- `403`: Forbidden. One of: the key's tier is below this endpoint's or parameter's gate (`tier_required` with an `upgrade` block); the public demo key used outside its allow-list (`demo_key_endpoint_not_allowed`); an invalid or revoked key; an origin-restricted key called from a disallowed origin (`code` `origin_not_allowed` / `origin_required`). `X-RateLimit-*` headers are present only on `tier_required`.
- `409`: Alert quota reached
- `429`: Too many requests. Every 429 carries `Retry-After`. A quota 429 (`rate_limit_exceeded`, with `X-RateLimit-*`), a heavy-query concurrency 429 (`error_kind` `concurrency`/`capacity`), or the per-IP authentication-failure block (30 failed auths/min; plain `error` + `retry_after_seconds`, no `X-RateLimit-*`).
- `500`: Unexpected server error from the route (`Internal server error`, with `_rid`). Safe to retry with backoff. A failed API-key lookup is a 503 `auth_backend_unavailable`, never a 500.
- `503`: The API-key or subscription lookup could not be answered (authentication stage). Retryable and not your fault: it is never counted as a failed authentication. Honour `Retry-After`; no `X-RateLimit-*`, no `_rid`.

---

[API](https://skmtc.dev/madeonsol/apis/madeonsol-api.md) · [All operations](https://skmtc.dev/madeonsol/apis/madeonsol-api/llms.txt) · [OpenAPI document](https://skmtc.dev/madeonsol/apis/madeonsol-api/revisions/d9531a28d83b?raw)
