API Reference

Manage price alert strategies programmatically via REST API

Quick Start

1
Get API Token

Generate a personal access token from the Alerts dashboard.

Get token →
2
Create an Alert

POST a strategy with your symbol, type, and params.

3
List Your Alerts

GET all active strategies and monitor their status.

Authentication

All API requests must include a Bearer token in the Authorization header:

http
Authorization: Bearer pat_xxxxxxxxxxxx

Token format: pat_... Generated at Alerts → API Token

Endpoints

POST/api/agent/price-alert/strategies
GET/api/agent/price-alert/strategies
POST/api/agent/price-alert/strategies/:id/disable

curl examples

List strategies

bash
curl https://alertly.online/api/agent/price-alert/strategies \
  -H "Authorization: Bearer YOUR_TOKEN"

Create alert

bash
curl -X POST https://alertly.online/api/agent/price-alert/strategies \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "symbol": "BTC",
  "type": "PRICE_LEVEL",
  "params": { "direction": "ABOVE", "targetPrice": 90000 }
}'

Disable strategy

bash
curl -X POST https://alertly.online/api/agent/price-alert/strategies/STRATEGY_ID/disable \
  -H "Authorization: Bearer YOUR_TOKEN"

Strategy Types

Triggers when price crosses a specific level (ABOVE / BELOW).

ParameterTypeRequiredDescription
directionstring"ABOVE" | "BELOW"
targetPricenumberTarget price
notestringNote, max 200 chars
fireOncebooleanAuto-pause after first trigger (default false)

Request body example

json
{
  "symbol": "BTC",
  "type": "PRICE_LEVEL",
  "params": {
    "direction": "ABOVE",
    "targetPrice": 90000
  },
  "note": "BTC breakout",
  "fireOnce": false
}

Supported Symbols

50 symbols across crypto, US stocks, commodities, and indices.

TradFi (Stocks / Commodities / Indices)

NVDATSLAGOOGLMETAAMZNMSTRPLTRCOINHOODCRCLINTCPAYPEWJEWYXAUXAGXPTXPDCOPPERCLBZNATGASALLBTCDOM

Crypto

BTCETHSOLBNBXRPDOGEADAAVAXLINKDOTUNILTCBCHATOMAPTARBOPNEARSUITONSHIBTAOWLDONDOICPSKY

Rate Limits

EndpointLimit
List strategies (GET)60 req/min
Create strategy (POST)10 req/min, 200 req/day
Disable strategy (POST /disable)30 req/min

Error Codes

StatusMeaning
401Missing or invalid token
403Token lacks required scope or strategy belongs to another user
400Invalid request parameters (check symbol, type, or params)
429Rate limit exceeded — slow down requests

AI Agent Integration

Alertly provides an OpenAPI 3.1 spec for use with GPT Actions and any OpenAPI-compatible agent framework.

OpenAPI Spec URL

url
https://alertly.online/.well-known/openapi.json

GPT Actions / Custom GPT

In GPT Builder, choose "Import from URL" and paste the Spec URL above. GPT natively supports OpenAPI 3.1.

General Agent Frameworks

LangChain, AutoGPT, Postman, and any framework supporting OpenAPI 3.1 can consume the spec directly.