Official and community SDKs to accelerate your integration
For Node.js and browser applications
v1.1.0 • Bundle size: ~43KB
npm install @stockalert/js-sdk
import { StockAlert } from '@stockalert/js-sdk';
const client = new StockAlert({
apiKey: 'sk_your_api_key'
});
// List alerts
const alerts = await client.alerts.list({
status: 'active',
limit: 20
});
// Create alert
const alert = await client.alerts.create({
symbol: 'AAPL',
condition: 'price_above',
threshold: 200,
notification: 'email'
});
// Delete alert
await client.alerts.delete(alert.id);
For Python 3.8+ applications with CLI support
v1.2.4 • Includes CLI tool
pip install stockalert
from stockalert import StockAlert
client = StockAlert(api_key='sk_your_api_key')
# List alerts
alerts = client.alerts.list(
status='active',
limit=20
)
# Create alert
alert = client.alerts.create(
symbol='AAPL',
condition='price_above',
threshold=200,
notification='email'
)
# Delete alert
client.alerts.delete(alert.id)
# Set API key
export STOCKALERT_API_KEY=sk_your_api_key
# List alerts
stockalert list --status active
# Create alert
stockalert create AAPL price_above -t 200
# Delete alert
stockalert delete alert_id
No-code automation with n8n workflows
Create powerful automation workflows without writing code using our official n8n node.
Install via n8n's Community Nodes:
n8n-nodes-stockalert
Real-time stock alerts in your Slack workspace
Get stock alerts directly in Slack channels! Our official Slack app brings the full power of StockAlert.pro to your team's communication hub.
/stockalert help # Show this help message
/stockalert test # Send a test notification
/stockalert status # Show integration status
/stockalert channel #channel # Set notification channel
/stockalert apikey <key> # Update your StockAlert.pro API key
/stockalert disconnect # Remove StockAlert.pro connection
You can also integrate directly with our REST API without using an SDK. Here are examples in various languages:
curl -X POST https://stockalert.pro/api/public/v1/alerts \
-H "X-API-Key: sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"symbol": "AAPL", "condition": "price_above", "threshold": 200}'
const response = await fetch('https://stockalert.pro/api/public/v1/alerts', {
method: 'POST',
headers: {
'X-API-Key': 'sk_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: 'AAPL',
condition: 'price_above',
threshold: 200
})
});
const alert = await response.json();
See the Examples section for more code samples.