opa_create_price_alert
Create persistent commodity price alerts that notify you via email or webhook when the price crosses your set threshold.
Instructions
Create a PERSISTENT price alert tied to the user's OilPriceAPI account. The alert engine continuously watches live prices and notifies the user (by email, plus webhook if a URL is given) when the commodity price crosses the threshold. Use when the user asks to be alerted/notified when a price goes above or below a level (e.g. 'tell me when Brent drops below $70'). REQUIRES an API key (OILPRICEAPI_KEY) — this writes to the user's account. Alerts persist until deleted; manage them with opa_list_price_alerts and opa_delete_price_alert.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commodity | Yes | Commodity name or code to watch (e.g., 'brent', 'natural gas', 'WTI_USD'). | |
| operator | Yes | Threshold comparison: greater_than, less_than, equals, greater_than_or_equal, or less_than_or_equal. The alert fires when (current price) <operator> (threshold). | |
| threshold | Yes | The price threshold to compare against, in the commodity's native currency (e.g., 70 for $70/barrel). | |
| name | No | Optional human-readable label for the alert. If omitted, a descriptive name is generated. | |
| notify | No | Optional HTTPS webhook URL to POST to when the alert triggers (in addition to email). Must start with https://. |