Oil Price API Documentation - Quick Start in 5 Minutes | REST API
GitHub
GitHub
  • Guides

    • Authentication
    • Coal Price Data - Complete Guide
    • Testing & Development
    • Error Codes Reference
    • Webhook Signature Verification
    • Production Deployment Checklist
    • Service Level Agreement (SLA)
    • Rate Limiting & Response Headers
    • Data Quality and Validation
    • Troubleshooting Guide
    • Incident Response Guide

Coal Price Data - Complete Guide

21 Years of Global Coal Data | 627,119 Records | 2004-Present


Overview

OilPriceAPI provides comprehensive coal price data covering global thermal and metallurgical coal markets. Our offering includes real-time futures, spot prices, and 21 years of historical data.

Quick Stats

  • 7 Active Commodities: Real-time/daily/weekly updates
  • 2 Historical Archives: NYMEX futures (2004-2017)
  • 3 Annual Averages: Yearly data (2001-2024)
  • Total Records: 627,119 coal prices
  • Time Span: 21 years (2004-2025)
  • Geographic Coverage: US, Europe, Asia-Pacific

Available Coal Data

Real-Time Futures (Daily Updates)

COAL_USD - API2 CIF ARA (European Benchmark)

The primary global benchmark for seaborne thermal coal delivered to Northwest Europe.

GET /v1/prices/latest?by_code=COAL_USD
  • Coverage: 618,341 records (Dec 2024 - Present)
  • Update Frequency: Multiple times per day
  • Unit: USD per metric ton
  • Sources: Business Insider, Investing.com, IG Markets

NEWCASTLE_COAL_USD - API6 (Asian Benchmark)

Key price benchmark for Asian thermal coal markets (Australian export coal).

GET /v1/prices/latest?by_code=NEWCASTLE_COAL_USD
  • Coverage: 1,136 records (Dec 2025 - Present)
  • Update Frequency: Daily
  • Unit: USD per metric ton

COKING_COAL_USD - Metallurgical Coal

Premium quality coal for steel production (2-3x price of thermal coal).

GET /v1/prices/latest?by_code=COKING_COAL_USD
  • Coverage: 1,111 records (Dec 2025 - Present)
  • Update Frequency: Daily
  • Unit: USD per metric ton

CME_COAL_USD - CME Futures

CME exchange-traded Central Appalachian coal futures.

GET /v1/prices/latest?by_code=CME_COAL_USD
  • Coverage: 1,140 records (Dec 2025 - Present)
  • Update Frequency: Daily
  • Unit: USD per metric ton

US Spot Prices (Weekly Updates from EIA)

CAPP_COAL_USD - Central Appalachian

Eastern US thermal coal benchmark (12,500 Btu/lb, 1.2% sulfur).

GET /v1/prices/latest?by_code=CAPP_COAL_USD
  • Latest: $82.00/short ton (Week ending Dec 12, 2025)
  • Update Frequency: Weekly (Tuesdays)
  • Source: EIA Coal Markets API
  • Coverage: Nov 2025 - Present (6 weeks)

PRB_COAL_USD - Powder River Basin

Western US low-sulfur thermal coal (8,800 Btu/lb, 0.8% sulfur).

GET /v1/prices/latest?by_code=PRB_COAL_USD
  • Latest: $15.00/short ton (Week ending Dec 12, 2025)
  • Update Frequency: Weekly (Tuesdays)
  • Source: EIA Coal Markets API
  • Coverage: Nov 2025 - Present (6 weeks)

ILLINOIS_COAL_USD - Illinois Basin

Midwest US thermal coal benchmark.

GET /v1/prices/latest?by_code=ILLINOIS_COAL_USD
  • Latest: $52.50/short ton (Week ending Dec 12, 2025)
  • Update Frequency: Weekly (Tuesdays)
  • Source: EIA Coal Markets API
  • Coverage: Nov 2025 - Present (6 weeks)

Historical NYMEX Futures (Archived Contracts)

NYMEX_APPALACHIAN_USD - Historical Futures

13 years of Central Appalachian coal futures data (contract discontinued 2016).

GET /v1/prices/past_year?by_code=NYMEX_APPALACHIAN_USD&by_type=futures&start_date=2004-01-01&end_date=2016-11-28
  • Records: 3,262
  • Coverage: Jan 1, 2004 - Nov 28, 2016
  • Source: NYMEX Historical Archive
  • Unit: USD per short ton
  • Note: Requires by_type=futures parameter (stored as futures type)

Use Cases: Academic research, policy analysis, long-term trends

NYMEX_WESTERN_RAIL_USD - Historical Futures

8 years of Powder River Basin coal futures data (contract discontinued 2017).

GET /v1/prices/past_year?by_code=NYMEX_WESTERN_RAIL_USD&by_type=futures&start_date=2009-06-29&end_date=2017-08-10
  • Records: 2,043
  • Coverage: Jun 29, 2009 - Aug 10, 2017
  • Source: NYMEX Historical Archive
  • Unit: USD per short ton
  • Note: Requires by_type=futures parameter (stored as futures type)

Code Examples

Get All Active Coal Prices

Get Historical NYMEX Data


Use Cases

Power Utilities - Fuel Cost Forecasting

Use weekly EIA spot prices for procurement planning:

# Get recent CAPP spot prices
capp_prices = client.historical.get(
    commodity="CAPP_COAL_USD",
    start_date="2025-11-01"
)

# Calculate average for quarter forecast
avg_price = sum(p.value for p in capp_prices.data) / len(capp_prices.data)
print(f"Q4 2025 avg CAPP price: ${avg_price:.2f}/ton")

Academic Research - Long-term Trends

Analyze coal market evolution using NYMEX historical data:

# Study Clean Power Plan impact (announced 2015)
pre_policy = client.historical.to_dataframe(
    commodity="NYMEX_APPALACHIAN_USD",
    start="2013-01-01",
    end="2014-12-31",
    type="futures"
)

post_policy = client.historical.to_dataframe(
    commodity="NYMEX_APPALACHIAN_USD",
    start="2015-01-01",
    end="2016-11-28",
    type="futures"
)

print(f"Pre-policy avg: ${pre_policy['value'].mean():.2f}")
print(f"Post-policy avg: ${post_policy['value'].mean():.2f}")
print(f"Change: {((post_policy['value'].mean() / pre_policy['value'].mean()) - 1) * 100:.1f}%")

Trading Firms - Model Backtesting

Backtest trading strategies using historical futures data:

# Load full NYMEX history
nymex_data = client.historical.to_dataframe(
    commodity="NYMEX_APPALACHIAN_USD",
    start="2004-01-01",
    end="2016-11-28",
    type="futures"
)

# Test moving average crossover strategy
nymex_data['MA_50'] = nymex_data['value'].rolling(50).mean()
nymex_data['MA_200'] = nymex_data['value'].rolling(200).mean()

# Generate signals
nymex_data['signal'] = 0
nymex_data.loc[nymex_data['MA_50'] > nymex_data['MA_200'], 'signal'] = 1
nymex_data.loc[nymex_data['MA_50'] < nymex_data['MA_200'], 'signal'] = -1

# Calculate returns
nymex_data['returns'] = nymex_data['value'].pct_change()
nymex_data['strategy_returns'] = nymex_data['signal'].shift(1) * nymex_data['returns']

print(f"Buy-and-hold return: {(nymex_data['returns'].sum()) * 100:.2f}%")
print(f"Strategy return: {(nymex_data['strategy_returns'].sum()) * 100:.2f}%")

Data Quality

Accuracy Verification

We verify US spot prices against the authoritative EIA source:

CommodityOur APIEIA Source (Week 12/12/25)Match
CAPP$82.00$82.00✅ 100%
PRB$15.00$15.00✅ 100%
ILLINOIS$52.50$52.50✅ 100%

Data Sources

  • EIA: US Energy Information Administration (official government data)
  • NYMEX: Historical exchange archives
  • Investing.com: Global futures market data
  • Business Insider, IG Markets: International benchmarks

Update Schedule

  • High-Frequency: COAL_USD (multiple times per day)
  • Daily: NEWCASTLE, COKING, CME (once per trading day)
  • Weekly: CAPP, PRB, ILLINOIS (every Tuesday 2 AM UTC from EIA)

Geographic Coverage

United States

  • Eastern: Central Appalachian (CAPP) - spot + historical futures
  • Western: Powder River Basin (PRB) - spot + historical futures
  • Midwest: Illinois Basin - spot

International

  • Europe: API2 CIF ARA (primary global benchmark)
  • Asia-Pacific: Newcastle API6 (Australian export)
  • Global: Coking coal for steel production

Related Documentation

  • Commodity Codes Reference
  • Historical Prices API
  • Latest Prices API
  • Python SDK Documentation
  • Node.js SDK Documentation

FAQs

Why do I need by_type=futures for NYMEX data?

NYMEX historical coal data is stored as type='futures' in our database (since they were futures contracts). The API defaults to type='spot_price' for historical queries. You must explicitly add by_type=futures to access NYMEX data:

# ✅ CORRECT - Returns NYMEX data
GET /v1/prices/past_year?by_code=NYMEX_APPALACHIAN_USD&by_type=futures&start_date=2004-01-01&end_date=2016-11-28

# ❌ WRONG - Returns 0 records
GET /v1/prices/past_year?by_code=NYMEX_APPALACHIAN_USD&start_date=2004-01-01&end_date=2016-11-28

In Python SDK:

historical = client.historical.get(
    commodity="NYMEX_APPALACHIAN_USD",
    start_date="2004-01-01",
    end_date="2016-11-28",
    type="futures"  # Required!
)

Why are US spot prices only from Nov 2025?

The EIA Coal Markets API provides weekly snapshots but doesn't have easily accessible historical data. We started collecting spot prices on Nov 14, 2025. For historical coal price analysis, use the NYMEX futures data (2004-2017) which provides 13 years of history.

What's the difference between CAPP_COAL_USD and NYMEX_APPALACHIAN_USD?

  • CAPP_COAL_USD: Current spot prices (cash market), updated weekly from EIA
  • NYMEX_APPALACHIAN_USD: Historical futures contract (2004-2016), no longer traded

Both cover Central Appalachian coal, but spot vs futures can differ due to basis (transportation, timing, quality differences).

Can I get intraday coal data?

Yes, COAL_USD (API2 CIF ARA) has multiple updates per day. Other futures (NEWCASTLE, COKING, CME) update once per trading day. US spot prices (CAPP, PRB, ILLINOIS) are weekly only (EIA limitation).

How do I get annual coal prices?

Use the annual average commodities:

  • CAPP_COAL_ANNUAL_USD
  • PRB_COAL_ANNUAL_USD
  • ILLINOIS_COAL_ANNUAL_USD

These provide calculated yearly averages from 2001-2024.


Need help? Contact [email protected] or check our full documentation.

Last Updated: 12/17/25, 12:26 PM
Prev
Authentication
Next
Testing & Development