mcp-server

v3.7.1
io.github.OilpriceAPI/mcp-server Checked 9 hours ago Published 1 day ago

Source-timestamped energy data and reviewed OilPriceAPI product facts for MCP clients.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

opa_get_product_facts Get OilPriceAPI Product Facts

Get the reviewed, versioned OilPriceAPI product contract for product scope, evaluation offer, pricing URL, freshness policy, catalog and entitlement wording, authentication, canonical first request, keyless demo, and data-rights boundaries. Use this instead of model memory or package prose for questions about OilPriceAPI itself. No API key or paid-data entitlement is required.

opa_get_price Get Commodity Price

Get the latest available, source-timestamped value for an energy commodity. Use when the user asks about a single commodity's latest price. Accepts natural language ('brent oil', 'diesel') or API codes ('WTI_USD'). Returns price, currency, available change fields, and timestamp. For multiple commodities at once, use opa_market_overview. For price trends, use opa_get_history.

ParameterTypeDescription
commodity *stringCommodity name or code (e.g., 'brent oil', 'natural gas', 'WTI_USD', 'diesel')

opa_market_overview Energy Market Overview

Get the current prices returned by the API for this account in one call. Use when the user wants a broad market snapshot or asks about overall energy prices. Returns available prices grouped by category (oil, gas, coal, refined products, metals, forex) with 24h changes. Supports filtering by category. Dataset access varies by account entitlement. For a single commodity, use opa_get_price instead.

ParameterTypeDescription
categorystringFilter by commodity category (default: all). Options: oil, gas, coal, refined, metals, forex.

opa_compare_prices Compare Commodity Prices

Compare current prices between 2-5 commodities side by side. Use when the user asks to compare commodities (e.g., 'Brent vs WTI', 'US gas vs EU gas'). Returns each commodity's price with 24h changes, plus the spread if comparing two same-currency commodities. Accepts natural language or codes.

ParameterTypeDescription
commodities *arrayList of 2-5 commodity names or codes to compare (e.g., ['brent', 'wti'] or ['NATURAL_GAS_USD', 'DUTCH_TTF_EUR'])

opa_list_commodities List Available Commodities

List the account-visible commodities returned by the live API. Use when the user asks what commodities are available for this account, what codes to use, or when another tool returns a 'commodity not recognized' error. Results are grouped by category. Dataset access varies by account entitlement. No parameters needed.

opa_get_history Get Price History

Get historical price data for a commodity over a time period. Use when the user asks about price trends, historical prices, or how a commodity has performed over time. Returns high, low, average, change, and data point count. Periods: day (24h), week (7d), month (30d), year (365d). Supports point-in-time filtering via stored observation and revision timestamps. Observation-dated bulk backfills may appear in an earlier as_of result because their actual load time cannot be reconstructed. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response…

ParameterTypeDescription
commodity *stringCommodity name or code (e.g., 'brent', 'WTI_USD')
as_ofstringOptional ISO8601 date/datetime for filtering by stored observation and covered revision timestamps, e.g. '2026-06-02'. Must not be in the future. Observation-dated bulk backfills may appear in an earl…
periodstringTime period: day, week, month, or year (default: month)

opa_get_history_range Get Price History for a Date Range

Get dated price rows for up to 5 commodities between a start date and an optional end date (YYYY-MM-DD, UTC), aggregated hourly, daily, weekly or monthly. Use when the user needs the actual series (e.g. daily Brent and heating oil from 2025-01-01 to 2025-06-30) rather than summary statistics over a fixed window, which opa_get_history returns. Results are paged at up to 500 rows per page across all requested codes, newest rows first: page 1 holds the most recent dates and later pages go back in time; within a page each code's rows are listed oldest to newest. The answer states the page count an…

ParameterTypeDescription
commodities *array1-5 commodity names or codes (e.g. ['brent', 'HEATING_OIL_USD']). The API refuses more than 5 codes per request.
start_date *stringInclusive start date, YYYY-MM-DD (UTC). Must not be in the future.
end_datestringInclusive end date, YYYY-MM-DD (UTC). Defaults to today; a future end date is capped to now by the API.
intervalstringAggregation bucket: hourly, daily, weekly or monthly (default: daily).
pageinteger1-based page number (default: 1).
per_pageintegerRows per page across all requested codes, 1-500 (default: 250).

opa_get_futures Get Futures Price

Get the latest front-month futures contract price for energy commodities. Use canonical instrument slugs: brent, wti, gasoil, natural-gas, ttf-gas, lng-jkm, eu-carbon, or uk-carbon. Contract codes and older venue slugs remain compatibility inputs. For the forward curve returned for this account, use opa_get_futures_curve instead. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
contractstringCanonical instrument slug (recommended): brent, wti, gasoil, natural-gas, ttf-gas, lng-jkm, eu-carbon, or uk-carbon. Contract codes and legacy venue slugs remain accepted for compatibility (default: b…

opa_get_futures_curve Get Futures Curve

Get the futures forward-curve contracts returned for this account. Use canonical instrument slugs: brent, wti, gasoil, natural-gas, ttf-gas, lng-jkm, eu-carbon, or uk-carbon. Contract codes and older venue slugs remain compatibility inputs. Returns available contract months with settlement prices plus market-structure analysis. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
contractstringCanonical instrument slug (recommended): brent, wti, gasoil, natural-gas, ttf-gas, lng-jkm, eu-carbon, or uk-carbon. Contract codes and legacy venue slugs remain accepted for compatibility (default: b…

opa_get_futures_history Get Futures Settlement History

Get daily, weekly or monthly OHLC history per contract month for brent, wti, natural-gas (NYMEX Henry Hub) or gasoil (ICE Low Sulphur Gas Oil, USD per tonne) futures between two dates. Use when the user asks how a futures contract traded over time or for past settlements; opa_get_futures and opa_get_futures_curve return only the current front month and curve. The date range is at most 730 days and cannot include future dates. Pass contract_month (YYYY-MM) for one contract; without it every listed contract month is returned and the answer shows at most 400 rows, saying what it left out. Daily c…

ParameterTypeDescription
from *stringInclusive start date, YYYY-MM-DD (UTC).
contractstringInstrument: brent, wti, natural-gas, or gasoil (ICE Low Sulphur Gas Oil) (default: brent).
contract_monthstringOptional contract month, YYYY-MM (e.g. '2026-12').
intervalstringBar size: daily, weekly or monthly (default: daily).
tostringInclusive end date, YYYY-MM-DD (UTC). Defaults to today. At most 730 days after from.

opa_get_continuous_futures_history Get Continuous Futures History

Get daily, weekly or monthly OHLC bars for the continuous (auto-rolled) Brent or WTI front-month futures series between two dates. Use when the user wants one long front-month price series for charting or backtesting, rather than per-contract history. These bars come from collected public futures snapshots and can be revised; they are not official exchange settlements, so use opa_get_futures_history for per-contract settlements. Without from, the API returns its permitted history window; dates cannot be in the future. The answer shows at most 400 bars and says what it left out. Historical dept…

ParameterTypeDescription
contractstringContinuous series: brent or wti (default: brent).
fromstringInclusive start date, YYYY-MM-DD (UTC). Optional; omit for the API's permitted history window.
intervalstringBar size: daily, weekly or monthly (default: daily).
tostringInclusive end date, YYYY-MM-DD (UTC). Defaults to today.

opa_get_natural_gas_hubs Get US Natural Gas Hub Prices

Get US physical natural gas hub prices as basis to Henry Hub (USD/MMBtu). Use when the user asks about regional gas prices or hub basis — Waha (West Texas/Permian), SoCal Citygate, Chicago Citygate, Algonquin Citygate, Eastern Gas South (formerly Dominion South), Houston Ship Channel. Without a hub, returns each live hub available to the account plus its basis; with a hub, returns that hub's latest price, basis, and basis history. Hub series differ in depth — check history_days before requesting a long window. Requires an eligible account entitlement. Use opa_get_plans for current access a…

ParameterTypeDescription
hubstringOptional hub slug: waha, socal, chicago, algonquin, eastern-gas-south, houston-ship-channel. Omit to list all live hubs with their basis to Henry Hub.
paststringOptional basis-history window for a single hub, e.g. 30d, 6m, 1y (only used when hub is given).

opa_get_natural_gas_storage Get Natural Gas Storage

Get the latest EIA Weekly Natural Gas Storage Report for Lower 48 working gas: the week's level and change, the year-ago level, the five-year average and the surplus or deficit against it, in Bcf. Set historical=true to add the last N weekly reports. Use when the user asks about US natural gas storage, injections or withdrawals. opa_get_storage covers crude oil at Cushing and the SPR, not gas. This dataset is plan-gated: the API answers HTTP 403 when the account's plan does not include it. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API respo…

ParameterTypeDescription
historicalbooleanWhen true, include the last `weeks` weekly reports (default: false).
weeksintegerNumber of weekly reports when historical is true, 1 to 52 (default: 4).

opa_get_marine_fuels Get Marine Fuel Prices

Get latest marine fuel (bunker) prices returned for the account, one row per port and fuel, each with the currency, unit, as-of time, age in days and stale flag the API reports. Use when the user asks about bunker fuel, marine fuel, VLSFO, MGO, IFO380, or shipping fuel costs. Filter by port name or UN/LOCODE (e.g., Singapore or SGSIN, Rotterdam or NLRTM) and/or by the fuel type the API reports: VLSFO, MGO_05S (MGO), HFO_380 (IFO380). Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
fuel_typestringFilter by fuel type as the API reports it: VLSFO, MGO_05S (MGO also matches), HFO_380 (IFO380 also matches)
portstringFilter by port name or UN/LOCODE, case-insensitive (e.g., 'Singapore' or 'SGSIN', 'Houston' or 'USHOU')

opa_get_marine_ports Get Marine Fuel Ports

List the bunkering ports the API carries (UN/LOCODE, name, country, region, major-port flag, fuel services, trading hours), or read one port with its prices collected in the last 24 hours. Use it to resolve a port name to the UN/LOCODE that opa_get_marine_fuel_history needs, or to check which fuel services a port lists. Works with any valid API key; the API applies its own marine per-minute rate limit. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
countrystringList filter: country as the API reports it, e.g. 'Singapore', 'United States'
major_onlybooleanList filter: only ports the API flags as major
portstringOne port by UN/LOCODE or name, e.g. 'SGSIN' or 'Singapore'. Omit to list ports.
regionstringList filter: region as the API reports it, e.g. 'Asia', 'Europe', 'Americas', 'Middle East'

opa_get_marine_fuel_history Get Marine Fuel Price History

Get the daily price history of one marine fuel at one port: one row per assessment date with price, currency, unit and collection time, plus high/low over the rows returned. Use when the user asks how bunker prices at a port moved over days or months. Needs the port's UN/LOCODE (resolve names with opa_get_marine_ports) and a fuel type: VLSFO, MGO_05S (MGO), HFO_380 (IFO380) or HFO_180. Requires a paid subscription or an active trial; other accounts get HTTP 403. The API rate-limits history more tightly than latest prices and caps the rows per request, so a long window can come back shorter tha…

ParameterTypeDescription
fuel_type *stringFuel series: VLSFO, MGO_05S (MGO), HFO_380 (IFO380) or HFO_180
port_code *stringPort UN/LOCODE, e.g. 'SGSIN' (Singapore), 'NLRTM' (Rotterdam), 'USHOU' (Houston)
daysintegerDays back from now, 1-365 (default 30)

opa_get_rig_counts Get US Rig Counts

Get the latest US rig count (Baker Hughes). Use when the user asks about drilling activity, rig counts, or oil field operations. Returns a single US total rig count with its region and observation date — this source carries no oil/gas split and no prior-week delta. For rigs broken out by US/Canada/international alongside frac spreads and permits, use opa_get_drilling. No parameters needed. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

opa_get_drilling Get Drilling Activity

Get a drilling activity snapshot: US, Canada, and international rig counts, frac spread count, well permits issued in the last 30 days (with a by-state breakdown), and DUC (drilled-uncompleted) well totals. Use when the user asks about drilling activity, rigs vs frac spreads, or upstream operations. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

opa_get_diesel_by_state Get Diesel Price by State

Get the current average retail diesel price for a US state. Use when the user asks about diesel prices in a specific state, diesel fuel costs by state, or state-level fuel prices. Accepts state names ('California') or 2-letter codes ('CA'). Returns the AAA-sourced state average diesel price. Covers all 50 states plus DC.

ParameterTypeDescription
state *stringUS state name or 2-letter code (e.g., 'California', 'CA', 'Texas', 'TX')

opa_get_fuel_surcharge Get Fuel Surcharge

Get carrier-published fuel surcharge percentages for LTL freight and parcel carriers. Use when the user asks about current or historical fuel surcharge rates for carriers like ODFL, Saia, Estes, XPO, ABF, TForce, Averitt, Southeastern Freight, UPS, FedEx, or DHL. Auto mode treats UPS/FedEx/DHL as parcel carriers and other carrier slugs as LTL. Parcel history requires a service_level such as ground, air, or international_air_export.

ParameterTypeDescription
carrierstringOptional carrier slug or common name. Examples: odfl, saia, estes, xpo, abf, tforce, averitt, southeastern-freight, ups, fedex, dhl. Omit to list current carriers.
historybooleanWhen true, return historical surcharge rows instead of the latest rate. Parcel history requires service_level.
modestringCarrier mode: auto (UPS/FedEx/DHL route to parcel; others route to LTL), ltl, or parcel. Default: auto.
per_pageintegerHistory rows to return, from 1 to 100. Default: 12.
service_levelstringParcel service level such as ground, air, international_air_export, international_air_import, or international_ground. Optional for latest; required for parcel history.

opa_calculate_fuel_surcharge Calculate Fuel Surcharge

Apply the user's own fuel surcharge schedule to the EIA (DOE) weekly retail on-highway diesel index and return the surcharge for the latest EIA week plus a weekly table. Two methods: percent (completed increments above the base price times the percentage per increment; needs increment and percent_per_increment) and per_mile ((diesel - base) / mpg in USD per mile; needs mpg). Regions are the U.S. average, the EIA PADD regions and California. Use when a shipper or carrier asks what their surcharge is this week under their own schedule; opa_get_fuel_surcharge returns carrier-published rates inste…

ParameterTypeDescription
base_price *numberDiesel price (USD/gallon) already built into the base rate, e.g. 1.25.
incrementnumberRequired for percent: diesel step (USD/gallon) per surcharge step, at least 0.001, e.g. 0.05.
methodstringpercent (default) or per_mile.
mpgnumberRequired for per_mile: fleet fuel economy in miles per gallon, at least 1.
percent_per_incrementnumberRequired for percent: surcharge percentage points added per step, e.g. 1.
regionstringEIA diesel region (default: national, the U.S. average).
roundingstringpercent only: floor (default, completed steps), ceil (a partial step counts) or exact (no banding).
weeksintegerRecent EIA weeks in the table, 1 to 52 (default: 4).

opa_get_storage Get Oil Storage Levels

Get oil storage and inventory levels for Cushing, Oklahoma (WTI delivery hub) and/or the US Strategic Petroleum Reserve (SPR). Use when the user asks about oil inventories, storage levels, Cushing stocks, or the SPR. Returns current inventory levels with changes. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
facilitystringStorage facility: cushing (WTI delivery hub), spr (Strategic Petroleum Reserve), or all (default: all)

opa_get_opec_production Get OPEC Production

Get the latest OPEC oil production data. Use when the user asks about OPEC output, production quotas, supply cuts, or OPEC+ compliance. Returns available country-level production figures. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

opa_get_forecasts Get Price Forecasts

Get energy price forecasts from EIA Short-Term Energy Outlook (STEO) and other sources. Use when the user asks about price predictions, outlooks, or where oil/gas prices are heading. Returns forecast data available to the account. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

opa_get_oil_inventories Get EIA Oil Inventories

Get the latest EIA weekly petroleum inventory (stocks) data. Use when the user asks about oil inventories, crude stocks, weekly EIA stocks, inventory builds/draws, or product-level inventory levels. Returns the latest weekly figures available to the account; optionally a summary view or a breakdown by petroleum product. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
viewstringWhich view to return: latest (most recent weekly snapshot), summary (headline totals + week-over-week change), or by_product (breakdown per petroleum product). Default: latest.

opa_get_macro_releases Get Macro Release Calendar

List scheduled economic and energy data releases from BLS, EIA, the Fed, OPEC and Baker Hughes over the next 1 to 90 days, in release order (UTC). Use when the user asks when the next EIA inventory report, CPI print, Fed decision, OPEC report or rig count comes out. Actual, previous, consensus and surprise values appear once the API knows them. The answer states the API's calendar coverage, so an empty list is only reported as 'nothing scheduled' when coverage spans the window. Requires an API key; the API applies no plan gate to this endpoint.

ParameterTypeDescription
daysintegerLook-ahead window in days, 1 to 90 (default: 30).
importancestringOnly releases of this importance: high, medium or low.
sourcestringOnly releases from this publisher: bls, eia, fed, opec or baker_hughes.

opa_get_well_permits Get Well Permits

Get the latest US oil & gas well drilling permit data. Use when the user asks about well permits, new drilling permits, permitting activity, or upstream permit trends. Returns available permits; optionally filtered/aggregated by state or by operator. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
operatorstringOperator name for the by_operator view. For richer filters and explicit freshness metadata, use opa_search_well_permits.
statestringOptional US state name or 2-letter code to filter permits (e.g., 'Texas', 'TX'). Applies to the latest and by_state views.
viewstringWhich view to return: latest (most recent permits), by_state (counts aggregated per state), or by_operator (counts aggregated per operator). Default: latest.

opa_search_well_permits Search Well Permits

Search well permits in one US state by county or operator and optional permit-date range. The tool checks the core API's measured state-health gate first, fails closed for unavailable/attention states, and always returns freshness, date coverage, source provenance, and any staleness/degradation caveat with the records. Operator and county filters currently require separate searches.

ParameterTypeDescription
state *stringRequired US state name or 2-letter code, e.g. Texas or TX.
countystringOptional county-name search. Cannot be combined with operator.
end_datestringOptional inclusive permit-date upper bound (YYYY-MM-DD).
operatorstringOptional operator-name search. Cannot be combined with county.
pageinteger
per_pageinteger
start_datestringOptional inclusive permit-date lower bound (YYYY-MM-DD).

opa_list_well_permits List Well Permits

List US drilling permits from state regulators across one or more states and an optional permit-date range, newest permit date first, paged up to 100 rows per page. Each row has the permit date, state, county, operator, well, permit type and status, API number and source regulator. Use when the user wants raw permit records across several states or a date window; opa_search_well_permits adds a per-state freshness gate and county/operator search, and opa_get_well_activity summarises counts. Requires a Well Permits subscription (an add-on, or included in some plans); the API answers HTTP 403 wit…

ParameterTypeDescription
end_datestringLatest permit date to include, YYYY-MM-DD.
pageintegerPage number, from 1 (default: 1).
per_pageintegerRows per page, 1 to 100 (default: 25).
start_datestringEarliest permit date to include, YYYY-MM-DD.
statesarrayOptional US state names or 2-letter codes, e.g. ['TX', 'New Mexico']. Omit for every covered state.

opa_preview_well_permits Preview Well Permits

Preview the most recent US drilling permits for one state: at most 25 permits from the last 1 to 90 days, newest first, with the data's as-of date, age and the state's date coverage. Any API key can call it, including the Free plan. Use when the user wants a quick look at recent permits in a state, or when the account has no Well Permits subscription. Full history, multiple states and county or operator search need the subscription (opa_list_well_permits, opa_search_well_permits). Requires an API key.

ParameterTypeDescription
daysintegerTrailing window in days, 1 to 90 (default: 90).
statestringUS state name or 2-letter code (default: TX).

opa_lookup_well Look Up Well by API Number

Look up a well by 10-, 12-, or 14-digit API number using the core API's promoted lifecycle summaries. Returns operator, county, lifecycle dates, cumulative production and evidence; for a 14-digit API number it also includes exact monthly well-production history when available. Optional state disambiguates API numbers that occur across source contexts. Unpromoted or ambiguous records fail closed.

ParameterTypeDescription
api_number *string10-, 12-, or 14-digit API well number; punctuation is allowed.
statestringOptional state name/code used to disambiguate source records.

opa_get_well_activity Get Recent Well Activity

Get recent US well-permit activity including counts by state, top operators and formations, permit types, and weekly trend. The response also includes every non-available state-health record so stale, degraded, unavailable, or attention states are explicit; rankings must not be treated as complete national coverage when warnings exist. If the state-health index cannot be loaded, the activity summary is still returned, headed as partial, with the reason the health gate is missing.

ParameterTypeDescription
daysintegerRecent activity window in days (1-365).

opa_get_well_production Get Well Production

Get US oil & gas well production data (BETA coverage: monthly state-level production from EIA + selected state regulators, and well-level histories for selected states only — NOT complete US well-level production). Views: summary (national + top states), states (reporting states returned by the API, latest month), state (monthly history for one state), well (monthly history for one well by 14-digit API number), top_producers (highest-output wells, optionally by state), cycle_time (permit-to-production cycle time stats, optionally by state), cohorts (cycle times by spud quarter). Use when the…

ParameterTypeDescription
api_numberstring14-digit API well number (e.g., '42329447130000'). Required for the well view.
statestringUS state name or 2-letter code (e.g., 'Texas', 'TX'). Required for the state view; optional filter for top_producers and cycle_time.
viewstringWhich view to return: summary (national + top states), states (all reporting states), state (one state's monthly history — requires 'state'), well (one well's monthly history — requires 'api_numbe…

opa_get_spread Get Refining & Trading Spreads

Get refining and trading spreads: crack spreads (refining margin proxy), basis spreads (regional price differentials), and refinery margins, latest or as a daily history. Use when the user asks about crack spreads, 3-2-1 crack, refining margins, Brent-WTI, Waha or JKM/TTF vs Henry Hub basis. crack: crack_type 3-2-1|jet|diesel|gasoline (default 3-2-1) against crude BRENT_CRUDE_USD|WTI_USD|BRENT_SPOT_USD|WTI_SPOT_USD (default BRENT_CRUDE_USD). basis: pair WAHA_HH|BRENT_WTI|BRENT_DUBAI|JKM_HH|TTF_HH|BRENT_OMAN; omit pair to list every pair (/basis/all). margin: index usgc|singapore|nwe (default u…

ParameterTypeDescription
type *stringSpread type: crack (refining crack spread, e.g. 3-2-1), basis (regional/grade price differential), or margin (composite refinery margin).
crack_typestringtype=crack only. 3-2-1 composite (default), or single-product jet, diesel (heating oil), gasoline (RBOB).
crudestringtype=crack only. Crude leg; default BRENT_CRUDE_USD (futures). *_SPOT_USD are spot.
end_datestringOptional history end (YYYY-MM-DD). Switches to the daily historical series.
indexstringtype=margin only. usgc (US Gulf Coast, default), singapore, or nwe (NW Europe).
pairstringtype=basis only. Hub/grade pair, e.g. BRENT_WTI, WAHA_HH, JKM_HH. Omit to list all pairs.
start_datestringOptional history start (YYYY-MM-DD). Switches to the daily historical series.

opa_get_price_statistics Get Price Statistics

Get the z-score, percentile and annualized volatility of a commodity's latest price against its trailing window of daily prices, each with a plain-language interpretation. Use when the user asks whether a price is unusually high or low, or how volatile it has been. opa_get_history returns the underlying series. Analytics are plan-gated: the API answers HTTP 403 when the account's plan does not include them. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
commodity *stringCommodity name or code (e.g. 'brent', 'WTI_USD').
periodintegerTrailing window in days, 1 to 365 (default: 30).

opa_get_price_trend Get Price Trend

Get trend and momentum for a commodity from its daily prices: trend direction and strength, RSI, 20-day SMA, support and resistance levels and a combined signal (type=analysis, the default), or one indicator series: sma, ema or rsi (dated values with the price), or levels (support, resistance, pivot, range and quartiles). Indicator types use at least 90 days of history. Use when the user asks about technical trend, momentum or support and resistance. These are computed indicators, not forecasts. Analytics are plan-gated: the API answers HTTP 403 when the account's plan does not include them. R…

ParameterTypeDescription
commodity *stringCommodity name or code (e.g. 'brent', 'WTI_USD').
periodintegerTrailing window in days, 1 to 365 (default: 30).
typestringanalysis (default), sma, ema, rsi or levels.
windowintegerIndicator window in days for sma/ema (API default 20) or rsi (API default 14).

opa_get_price_correlation Get Price Correlation

Get the Pearson correlation of daily prices between two commodities over a trailing window, with strength, direction, stability and a rolling series (type=analysis, the default); only the rolling series for a chosen window (type=rolling); or a correlation matrix for 2 to 10 commodities (type=matrix with commodities). Use when the user asks how closely two prices move together. Analytics are plan-gated: the API answers HTTP 403 when the account's plan does not include them. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritat…

ParameterTypeDescription
commodity1 *stringFirst commodity name or code (e.g. 'wti').
commodity2 *stringSecond commodity name or code (e.g. 'brent').
commoditiesarrayFor type=matrix: 2 to 10 commodity names or codes.
periodintegerTrailing window in days, 1 to 365 (default: 30).
typestringanalysis (default), rolling or matrix.
windowintegerRolling window in days for type=rolling (API default 7).

opa_get_spread_statistics Get Spread Statistics

Get a named basis, crack or ratio spread (for example wti_brent, 321, diesel_crack, lng_us_europe) against its trailing distribution: current value and legs, mean, standard deviation, min, max, z-score and percentile (type=current, the default), or its daily series (type=historical). Omit spread to list the available spread names. Use when the user asks whether a spread is wide or narrow relative to recent history; opa_get_spread returns current crack, basis and margin values without the distribution. Analytics are plan-gated: the API answers HTTP 403 when the account's plan does not include t…

ParameterTypeDescription
periodintegerTrailing window in days, 1 to 365 (default: 30).
spreadstringSpread name, e.g. 'wti_brent'. Omit to list available spreads.
typestringcurrent (default) or historical.

opa_get_account_status Get Account Status

Get the current API account's plan tier, request usage, remaining quota, and reset date. Use before calling gated tools, when the user asks about their plan/limits/usage, or after any 402/403/429 to explain what the current plan covers. Works on every plan including free.

opa_get_plans Get Plans & Pricing

Get OilPriceAPI's current subscription plans: monthly/yearly price, request limits, and included features for each tier. Use when the user asks what an upgrade costs, which plan unlocks a gated tool (history, futures, natural gas hubs...), or how the tiers compare. Live pricing from the API — no key required.

opa_get_data_quality Get Data Quality Report

Get OilPriceAPI's own data-quality grades. With a commodity code: that series' quality report — overall grade/score plus dimension scores (completeness, freshness, and more) for the current period. Without a code: the API's available catalog summary (grade distribution by category). Use when the user asks how reliable/complete a series is, or which series carry the highest quality grades. The summary works on any valid key; per-commodity access varies. Requires an eligible account entitlement. Use opa_get_plans for current access and pricing; the API response is authoritative.

ParameterTypeDescription
commoditystringOptional commodity name or code (e.g., 'brent', 'NATURAL_GAS_USD') for a per-series report. Omit for the catalogue-wide summary.

opa_get_service_status Get Service Status

Get OilPriceAPI's own operational status: overall health score and grade, component status, and per-update-tier (realtime, daily, weekly, monthly) health from the API's latest background health calculation. Set include_commodities=true to list the series in each tier that are not healthy or not current. Use when the user asks whether OilPriceAPI is up or degraded, or why data looks delayed. This is service health, not market data. Works without an API key. When the API's snapshot is missing or at least 15 minutes old it answers HTTP 503 and this tool reports health as unknown.

ParameterTypeDescription
include_commoditiesbooleanWhen true, list series in each tier that are not healthy or not current (default: false).

opa_list_price_alerts List Price Alerts

List all PERSISTENT price alerts on the user's OilPriceAPI account. Use when the user asks what alerts they have set up, or to find an alert's id before deleting it. REQUIRES an API key (OILPRICEAPI_KEY) — alerts are account-scoped. No parameters needed.

opa_get_alert_triggers Get Alert Triggers

Get recent trigger activity for the user's price alerts — which alerts have fired, how many times, and when they last triggered. Use when the user asks whether any alerts have gone off or about recent alert activity. REQUIRES an API key (OILPRICEAPI_KEY). Note: the API tracks trigger history as per-alert counters (trigger_count / last_triggered_at) rather than a separate event feed, so this returns alerts that have triggered.

ParameterTypeDescription
sincestringOptional ISO 8601 date/time (e.g., '2026-06-01' or '2026-06-01T00:00:00Z'). Only alerts last triggered on or after this time are shown.

opa_test_price_alert Test Price Alert

Dry-run one of the user's price alerts against the latest price for its commodity: reports the condition, the latest price and its timestamp, whether the alert would trigger now, and whether it is in its cooldown window. Nothing is sent and the alert is not changed. Use when the user wants to check an alert is set correctly before relying on it. Get the id from opa_list_price_alerts. REQUIRES an API key (OILPRICEAPI_KEY); the call reads a live price, so it counts against the account's request quota like a data request.

ParameterTypeDescription
id *stringThe numeric id of the alert to test, as returned by opa_list_price_alerts or opa_create_price_alert (e.g. '1234').

opa_get_market_brief Multi-Commodity Market Brief

Get a multi-commodity market brief: latest spot prices, 24h changes, 1-month forecasts (for Brent/WTI/Natural Gas), and notable spreads — for several commodities in ONE call. Use when the user wants a market snapshot, morning brief, or an at-a-glance read across multiple commodities. Set `narrative: true` to also get a plain-English summary plus market context (active supply disruptions, key economic indicators). Accepts natural language ('brent', 'us gas') or API codes. REQUIRES an API key (OILPRICEAPI_KEY); counts as 1 request. Per-account code limits apply and the API response is authorit…

ParameterTypeDescription
codes *arrayCommodity names or codes to include (e.g., ['brent', 'wti'] or ['BRENT_CRUDE_USD', 'NATURAL_GAS_USD']). The API returns the current account limit if exceeded.
narrativebooleanIf true, also include a plain-English summary + market context (disruptions, indicators). Default: false (structured data only).

opa_list_subscriptions List Price Subscriptions

List all PERSISTENT price subscriptions ('watches') on the user's OilPriceAPI account. Use when the user asks what they're monitoring, or to find a watch's id before deleting it. Each watch is a recurring, account-tied snapshot job. REQUIRES an API key (OILPRICEAPI_KEY). No parameters needed.

opa_get_subscription_events Poll Subscription Events

Poll for new subscription events — the recurring snapshots recorded by the user's watches. Use this to catch up on what changed since the last poll: pass the `since` cursor (the seq number) returned by the previous call to get only newer events. Events are POLLED, not pushed — there is no always-on connection, so call this periodically to stay current. Each event carries a price snapshot plus per-code deltas vs the prior snapshot. The returned `cursor` is what you pass as `since` next time. REQUIRES an API key (OILPRICEAPI_KEY). This poll does NOT count against the monthly request quota.

ParameterTypeDescription
sinceintegerCursor: only return events with a seq greater than this. Use the `cursor` from the previous call. Omit (or 0) to get the earliest available events.