Skip to main content

Natural Gas API - Live Henry Hub & NYMEX Prices | From $15/month

Real-time natural gas prices for Henry Hub, TTF, JKM, and NBP. Trusted by energy traders, utilities, and logistics companies worldwide.

99.9% Uptime SLA
47ms Response Time
Bank-Grade Security

Global Markets Coverage

Access natural gas prices from all major hubs: Henry Hub (US), TTF (Europe), JKM (Asia), NBP (UK), AECO (Canada)

Real-Time Updates

Natural gas prices updated every 60 seconds during market hours. Historical data available for backtesting.

Market Intelligence

Includes basis differentials, storage reports, weather impacts, and pipeline constraints data.

Choose Your Natural Gas API Plan

From small utilities to major trading desks - we have the right plan for you

Who Uses Our Natural Gas API? (Plans From $15/month)

Energy Trading Firms

  • Algorithmic trading systems requiring low-latency data
  • Spread trading between Henry Hub and TTF
  • LNG arbitrage opportunities Asia-Europe

Recommended: Production or Reservoir tier

Utilities & Industrial Users

  • Procurement cost optimization
  • Customer rate calculations
  • Budget forecasting and hedging

Recommended: Growth or Production tier

Natural Gas API Code Examples

Use our Python SDK, Node.js SDK, or REST API to access natural gas data. Check our full API documentation for more examples.

Example 1: Natural Gas Spot vs Futures (Python)

import requests
from datetime import datetime, timedelta

API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://api.oilpriceapi.com/v1'

def compare_spot_vs_futures():
    """Compare natural gas spot prices with futures contracts"""
    headers = {'Authorization': f'Bearer {API_KEY}'}

    # Get spot price
    spot_response = requests.get(
        f'{BASE_URL}/prices/latest',
        headers=headers,
        params={'by_code': 'NATURAL_GAS_USD'}
    )
    spot_price = spot_response.json()['data']['price']

    # Get futures data
    futures_response = requests.get(
        f'{BASE_URL}/futures/latest',
        headers=headers,
        params={'by_type': 'NG'}  # Natural Gas futures
    )
    futures_data = futures_response.json()['data']

    print(f"Henry Hub Spot: ${spot_price}/MMBtu")
    print("\nFutures Curve:")
    for contract in futures_data[:6]:  # Next 6 months
        print(f"  {contract['contract_month']}: ${contract['close_price']}")

    return {
        'spot': spot_price,
        'futures': futures_data
    }

# Calculate contango/backwardation
data = compare_spot_vs_futures()
front_month = data['futures'][0]['close_price']
if front_month > data['spot']:
    print(f"\nMarket in CONTANGO (+{front_month - data['spot']:.2f})")
else:
    print(f"\nMarket in BACKWARDATION ({front_month - data['spot']:.2f})")

Example 2: Natural Gas Alert System (Node.js)

const axios = require('axios');

class NaturalGasAlertSystem {
  constructor(apiKey, alertThreshold) {
    this.apiKey = apiKey;
    this.alertThreshold = alertThreshold; // e.g., 3.50
    this.baseUrl = 'https://api.oilpriceapi.com/v1';
  }

  async checkPriceAlert() {
    try {
      const response = await axios.get(`${this.baseUrl}/prices/latest`, {
        params: { by_code: 'NATURAL_GAS_USD' },
        headers: { 'Authorization': `Bearer ${this.apiKey}` }
      });

      const currentPrice = response.data.data.price;
      const changePercent = response.data.data.diff_diff || 0;

      console.log(`Current Price: $${currentPrice}/MMBtu`);
      console.log(`24hr Change: ${changePercent > 0 ? '+' : ''}${changePercent}%`);

      if (currentPrice >= this.alertThreshold) {
        this.sendAlert(currentPrice, changePercent);
      }

      return { price: currentPrice, change: changePercent };
    } catch (error) {
      console.error('Error checking price:', error.message);
      throw error;
    }
  }

  sendAlert(price, change) {
    console.log('\n🚨 PRICE ALERT 🚨');
    console.log(`Natural Gas reached $${price}/MMBtu (threshold: $${this.alertThreshold})`);
    console.log(`Change: ${change > 0 ? '+' : ''}${change}%`);
    // Add your notification logic here (email, SMS, webhook, etc.)
  }

  // Monitor price every 5 minutes
  startMonitoring(intervalMinutes = 5) {
    console.log(`Starting price monitoring (threshold: $${this.alertThreshold}/MMBtu)`);
    this.checkPriceAlert(); // Check immediately
    setInterval(() => this.checkPriceAlert(), intervalMinutes * 60 * 1000);
  }
}

// Usage
const alertSystem = new NaturalGasAlertSystem('YOUR_API_KEY', 3.50);
alertSystem.startMonitoring(5); // Check every 5 minutes

Natural Gas API Technical Specifications

Data Points Available

  • • Henry Hub spot and futures (NYMEX)
  • • TTF spot and futures (ICE)
  • • JKM (Japan Korea Marker) LNG
  • • NBP (National Balancing Point) UK
  • • AECO (Alberta) Canadian gas
  • • Basis differentials to Henry Hub
  • • Storage levels (US, Europe)
  • • Weather degree days correlation

API Features

  • • RESTful API with JSON responses
  • • WebSocket for real-time streaming
  • • Historical data up to 10 years
  • • Multiple currency conversions
  • • Unit conversions (MMBtu, GJ, MWh)
  • • Webhook alerts for price changes
  • • Bulk data export capabilities
  • • 99.9% uptime SLA

Natural Gas API vs Bloomberg vs Reuters

Bloomberg Terminal

$24,000/year

  • āŒ Expensive annual contracts
  • āŒ Complex desktop software
  • āŒ Requires extensive training
  • āŒ Limited API access

Reuters Eikon

$3,600+/year

  • āŒ High minimum pricing
  • āŒ Per-user licensing
  • āŒ Limited historical data
  • āŒ Sales negotiations required

Natural Gas API ⭐

From $15/month

  • āœ… Pay as you grow
  • āœ… Simple REST API
  • āœ… 5-minute integration
  • āœ… Start free, upgrade anytime

Get Bloomberg-quality data at 99.4% lower cost

Start with 100 Free Natural Gas API Calls

No credit card required. Test our API with real market data.

Natural Gas API Pricing FAQ

How much does the natural gas API cost?

Our natural gas API starts at $15/month for 10,000 requests. The popular Growth plan at $29/month includes 25,000 requests plus webhook notifications. Enterprise plans with unlimited requests start at $129/month.

Which natural gas markets do you cover?

We provide real-time prices for all major natural gas hubs: Henry Hub (US), TTF (Europe), JKM (Asia LNG), NBP (UK), and AECO (Canada). We also include basis differentials and regional pricing.

Is there a free trial for the natural gas API?

Yes! Every account starts with 100 free API requests per month. This includes access to all natural gas price endpoints. No credit card required to start.