Webhooks & Event Push
Receive signed notifications after eligible commodity or drilling data is processed and meets your configured conditions. Latest available values include source timestamps; refresh cadence varies by source, market hours, dataset, and plan.
Threshold Commodity Price Alerts
Configure conditions for eligible oil, gas, and commodity data. Notifications are generated after qualifying updates are processed.
Custom Thresholds
Set price alerts with 5 condition types: greater than, less than, equals, greater/equal, less/equal for operational alerts and review workflows.
Fast Delivery
Eligible updates are evaluated and queued for delivery, with retry handling for failed attempts.
HMAC Security
Every webhook includes HMAC-SHA256 signature for cryptographic verification. Prevent spoofing and ensure authenticity.
Custom Metadata
Attach job IDs, contract info, or any custom data to alerts. Perfect for connecting alerts to your business logic.
🚚 Transport & Logistics
Monitor fuel costs for route profitability. Get alerted when diesel crosses a configured planning threshold.
💼 Risk & Hedging Analysis
Notify analysts when source-timestamped values meet configured review conditions. Do not treat alerts as execution feeds.
⛽ Retail & Gas Stations
Use latest available wholesale values as one input to pricing review and POS workflows.
curl -X POST "https://api.oilpriceapi.com/v1/alerts" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_alert": {
"name": "WTI Threshold Alert",
"commodity_code": "WTI_USD",
"condition_operator": "greater_than",
"condition_value": 75.00,
"webhook_url": "https://your-app.com/webhook",
"metadata": {
"job_id": "JOB-1234",
"customer": "ACME Corp",
"break_even": 75.00
},
"cooldown_minutes": 60,
"enabled": true
}
}'What Happens Next?
- 1. An eligible source update is processed
- 2. When price crosses $75, we evaluate your condition
- 3. A delivery job is queued for your webhook URL
- 4. Your system receives JSON payload with price data
- 5. Cooldown prevents alert fatigue for 60 minutes
Production Evaluation
Measure delivery delay, retry behavior, and upstream staleness with your own account and datasets before depending on webhooks in a production workflow.
Optional: Drilling Intelligence Webhooks
Receive notifications after eligible rig count, frac spread, well permit, and DUC inventory datasets update. Availability depends on plan and account entitlement.
Rig Count Updates
Weekly Baker Hughes rig count data for US, Canada, and International markets
drilling.rig_count.updatedFrac Spread Counts
Daily hydraulic fracturing spread counts by major US basins
drilling.frac_spread.updatedWell Permits
Daily drilling permit issuances from state regulatory agencies
drilling.well_permit.updatedDUC Well Inventory
Monthly Drilled but Uncompleted well inventories by basin
drilling.duc_well.updatedDrilling Intelligence Webhook Example:
{
"id": "evt_1a2b3c4d5e",
"type": "drilling.rig_count.updated",
"created_at": "2025-08-03T17:00:00Z",
"data": {
"commodity": "US_RIG_COUNT",
"region": "United States",
"value": 540,
"previous_value": 535,
"change": 5,
"change_percent": 0.93,
"unit": "rigs",
"source": "Baker Hughes",
"breakdown": {
"oil_rigs": 425,
"gas_rigs": 110,
"misc_rigs": 5
},
"timestamp": "2025-08-03T17:00:00Z"
}
}How Oil Price & Drilling Webhooks Work
1. Data Updates
Latest available values include source timestamps; refresh cadence varies by source, market hours, dataset, and plan.
2. Queued Push
When eligible data arrives, a notification is queued for your configured webhook endpoint
3. Your App Updates
Your application receives the webhook and automatically processes the latest energy market data
Price Update Webhook Example:
{
"id": "evt_9z8y7x6w5v",
"type": "price.updated",
"created_at": "2025-08-03T14:30:00Z",
"data": {
"commodity": "BRENT_CRUDE_OIL",
"name": "Brent Crude Oil",
"value": 78.45,
"currency": "USD",
"unit": "barrel",
"change_percent": 2.3,
"previous_value": 76.69,
"timestamp": "2025-08-03T14:30:00Z"
}
}Available Webhook Events
Price Events
price.updatedAny commodity price update
price.significant_changePrice changes exceeding 5%
Drilling Intelligence Events
drilling.rig_count.updatedWeekly rig count updates
drilling.frac_spread.updatedDaily frac spread counts
drilling.well_permit.updatedDaily permit issuances
drilling.duc_well.updatedMonthly DUC inventories
API Usage Events
api.limit.warningUsage reaches 80% of monthly limit
api.limit.exceededMonthly limit exceeded
Subscription Events
subscription.updatedPlan or status changes
subscription.cancelledSubscription cancelled
Real-World Applications
Market & Risk Dashboards
Add threshold notifications and drilling activity indicators to internal market and risk dashboards.
- • Source-timestamped value review
- • Analyst alerts based on configured conditions
- • Supply/demand indicators from drilling data
E&P Analytics Dashboards
Build comprehensive drilling intelligence dashboards with notifications after eligible dataset updates.
- • Basin-specific activity monitoring
- • Competitor drilling analysis
- • DUC well completion timing
Investment Research Tools
Enhance research platforms with source-timestamped drilling intelligence and price correlations.
- • Activity-based forecasting models
- • Supply trend analysis
- • Regional production indicators
SCADA & Control Systems
Integrate market data into operational systems for dynamic optimization.
- • Price-based production optimization
- • Market-driven storage decisions
- • Automated hedging triggers
Risk Management Systems
Real-time risk calculations based on price movements and drilling trends.
- • VaR recalculations on price changes
- • Supply risk from drilling activity
- • Automated compliance reporting
Market Intelligence Platforms
Comprehensive market monitoring with drilling activity as leading indicators.
- • Early trend detection
- • Regional supply forecasts
- • Competitive intelligence alerts
Enterprise-Grade Implementation
Advanced Configuration
- Up to 25 webhook endpoints per account
- Granular event and commodity filtering
- Custom headers and authentication
- Configurable retry policies
- Event deduplication
Security & Reliability
- HMAC-SHA256 signature verification
- Automatic retry with exponential backoff
- Automatic retries on failed delivery
- Event logs and delivery tracking
- Replay protection
Webhook Security - Signature Verification:
// Node.js webhook signature verification
const crypto = require('crypto');
app.post('/webhook/oilpriceapi', (req, res) => {
const signature = req.headers['x-oilpriceapi-signature'];
const timestamp = req.headers['x-oilpriceapi-signature-timestamp'];
const payload = JSON.stringify(req.body);
// Prevent replay attacks (5 minute window)
if (Date.now() - parseInt(timestamp) > 300000) {
return res.status(401).send('Timestamp too old');
}
// Verify signature
const expectedSig = crypto
.createHmac('sha256', process.env.WEBHOOK_SECRET)
.update(`${payload}.${timestamp}`)
.digest('hex');
if (signature !== expectedSig) {
return res.status(401).send('Invalid signature');
}
// Process webhook
const { type, data } = req.body;
switch(type) {
case 'price.updated':
handlePriceUpdate(data);
break;
case 'drilling.rig_count.updated':
handleRigCountUpdate(data);
break;
// ... handle other events
}
res.status(200).send('OK');
});Check Webhook Availability
Dataset access and limits vary by plan, source, and account entitlement.
Webhook Features:
- Threshold webhooks for account-enabled commodities
- Optional drilling intelligence webhooks (rig counts, frac spreads, permits, DUC wells)
- Endpoint limits defined by the current plan
- Event limits defined by the current plan
- Custom event filtering and routing
Also Includes:
- API request limits defined by the current plan
- Delivery methods available to the account
- Support options listed in the current plan
- Redundant delivery infrastructure
The core commodity API trial includes 10,000 requests over 7 days with no credit card.
Quick Implementation Guide
1. Create Webhook Endpoint
curl -X POST https://api.oilpriceapi.com/v1/webhooks \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-app.com/webhooks/oilprice",
"events": ["price.updated", "drilling.rig_count.updated"],
"commodity_filters": ["BRENT_CRUDE_OIL", "US_RIG_COUNT"],
"description": "Webhook for account-enabled dataset updates"
}'2. Test Your Endpoint
curl -X POST https://api.oilpriceapi.com/v1/webhooks/{webhook_id}/test \
-H 'Authorization: Token YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"event_type": "price.updated"
}'3. Monitor Delivery
curl https://api.oilpriceapi.com/v1/webhooks/{webhook_id}/events \
-H 'Authorization: Token YOUR_API_KEY'
# Response includes delivery status, attempts, and response codesReady to Evaluate Energy Webhooks?
Test signed notifications with the datasets and delivery terms available to your account.
Review Current Availability
Confirm dataset, webhook, and support access for your plan.
Start 7-Day Free TrialNo credit card required • Full API access • Cancel anytime
Need a custom solution?
Contact our Enterprise team →