Create stock alerts programmatically with our simple and powerful API
/api/alerts/create
Creates a new stock price alert and sends a verification email to the provided address.
{ "symbol": "AAPL", // Stock symbol (required) "condition": "above", // Alert condition (required, see below) "threshold": 180.50, // Target price (required for "above"/"below"/"up"/"down") "days": 365, // Days until reminder (required for "reminder", 1-365) "email": "user@example.com" // Email address (required) } // Available conditions: // - "above": Price rises above threshold // - "below": Price falls below threshold // - "up": Price increases by percentage threshold // - "down": Price decreases by percentage threshold // - "new_high": New 52-week high // - "new_low": New 52-week low // - "reminder": Get price update after specified days
// Success Response { "success": true, "data": { "alertId": "abc123", "symbol": "AAPL", "currentPrice": 175.25, "verificationRequired": true } } // Error Response { "success": false, "error": { "code": "ERROR_CODE", "message": "Error description" } }
MISSING_FIELDS
Required fields are missing
INVALID_EMAIL
Invalid email format
INVALID_CONDITION
Invalid condition value
INVALID_THRESHOLD
Invalid threshold value for price alerts
INVALID_DAYS
Invalid number of days for reminder alerts (must be 1-365)
INVALID_SYMBOL
Invalid or unsupported stock symbol
PRICE_FETCH_FAILED
Unable to fetch current stock price
INTERNAL_ERROR
Internal server error
Price Alert:
curl -X POST https://stockalert.pro/api/alerts/create \ -H "Content-Type: application/json" \ -d '{ "symbol": "AAPL", "condition": "above", "threshold": 180.50, "email": "user@example.com" }'
Price Change Alert:
curl -X POST https://stockalert.pro/api/alerts/create \ -H "Content-Type: application/json" \ -d '{ "symbol": "AAPL", "condition": "down", "threshold": 10, "email": "user@example.com" }'
52-Week High Alert:
curl -X POST https://stockalert.pro/api/alerts/create \ -H "Content-Type: application/json" \ -d '{ "symbol": "AAPL", "condition": "new_high", "email": "user@example.com" }'
One Year Price Reminder:
curl -X POST https://stockalert.pro/api/alerts/create \ -H "Content-Type: application/json" \ -d '{ "symbol": "AAPL", "condition": "reminder", "days": 365, "email": "user@example.com" }'
Maximum 10 requests per minute per IP address
Maximum 50 active alerts for free accounts. Unlimited alerts with Premium subscription.
Email verification required before alerts become active
If you need assistance or have questions about the API, please contact our support team at info@stockalert.pro