Recipe: Crypto Price Alert
Monitor Bitcoin price and fire when it drops more than 10%.
curl -X POST https://api.verid.dev/v1/monitors \
-H "Authorization: Bearer $VERID_API_KEY" \
-d '{
"name": "Bitcoin 10% Drop Alert",
"url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd&include_24hr_change=true",
"schedule_interval_seconds": 3600,
"extract_config": {
"method": "json_path",
"fields": {
"price_usd": "$.bitcoin.usd",
"change_24h": "$.bitcoin.usd_24h_change"
}
},
"diff_predicate": {
"type": "field_decreases_by_percent",
"field": "price_usd",
"threshold": 10
},
"deliveries": [
{ "type": "webhook", "url": "https://your-app.com/hooks/crypto-alert" },
{ "type": "discord", "webhookUrl": "https://discord.com/api/webhooks/..." }
]
}'CoinGecko's free API returns numeric values directly, so the field_decreases_by_percent predicate works perfectly here. The predicate only fires on numeric fields — string values like "$3,241.88" won't trigger.
Or: use the template
The crypto-price-coingecko template is pre-configured for this use case:
curl -X POST https://api.verid.dev/v1/monitors/from-template/crypto-price-coingecko \
-H "Authorization: Bearer $VERID_API_KEY" \
-d '{
"name": "My Bitcoin Alert",
"url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd"
}'