OilPriceAPI Docs
Quick Start
API Reference
  • SDKs and languages
  • Tutorials
  • Articles
  • Documentation directory
  • Quick reference
  • API explorer
  • FAQ
  • Changelog
  • Status
  • Dashboard
GitHub
Quick Start
API Reference
  • SDKs and languages
  • Tutorials
  • Articles
  • Documentation directory
  • Quick reference
  • API explorer
  • FAQ
  • Changelog
  • Status
  • Dashboard
GitHub
  • Interactive Explorer

    • Interactive API Explorer
  • Price Data

    • API Reference
    • Get Latest Prices
    • Historical Prices
    • Batch Prices
    • Excel Latest Price Gateway
    • Price Widget Endpoints
    • Price Utility Endpoints
    • Demo API (No Authentication)
    • Natural Gas Intelligence
  • Commodities

    • List Commodities
    • Get Commodity Details
    • Data Publication & Collection Schedules
  • AI Agents (MCP)

    • Get Market Brief
    • Subscriptions / Watches
    • Agent Subscriptions with MCP
  • Marine Fuels

    • Marine Fuel API
    • List Marine Fuel Ports
    • Get Port Details with Prices
    • Bunker Fuels
    • Maritime Fuels
  • Fuel Surcharges

    • Fuel Surcharge API
  • Premium Endpoints

    • All Prices API - One Call, All Commodities
    • Cushing Oil Storage Intelligence API
    • Drilling Intelligence API
    • Marine Fuels API
    • ICE Brent Futures API
    • Benchmark Close
    • Aviation Fuel Pilot
  • Spreads & Margins

    • Spreads & Margins
    • Crack Spreads
    • European Gasoil Crack
    • Basis Spreads
    • Refining Margins
    • Curve Structure
    • Physical Premiums
  • Market Indicators

    • Market Indicators
    • Fuel Switching
    • Price Context
    • Storage Analytics
    • CFTC Positioning
    • Congressional Trades
    • Market Annotations
  • Futures

    • Futures API
    • ICE Brent Futures
    • ICE WTI Futures
    • ICE Gas Oil Futures
    • NYMEX Natural Gas Futures
    • ICE EUA Carbon Futures
    • EU Carbon Futures
    • TTF Gas Futures
    • LNG JKM Futures
    • UK Carbon Futures
  • Dark Data (Premium)

    • Energy Intelligence API
    • Rig Counts
    • Well Permits
    • Well Production Beta
    • Drilling Intelligence (Public)
    • Oil Inventories
    • OPEC Production
    • Drilling Productivity
    • Forecasts (STEO)
  • Well Production (Beta)

    • Well Production Data
    • Well Production API Reference
  • Analytics

    • Analytics API
  • Webhooks API

    • Webhooks API Reference
    • Webhook Endpoint Reference
  • Alerts

    • Price Alerts API
  • Account & Billing

    • Account API
    • API Keys
    • Subscriptions
    • Organizations

Marine Fuels API

Status: ✅ Available | ⚓ Port-Specific | 🌍 Global Coverage

Overview

Comprehensive marine fuel pricing data for major global ports. Track bunker fuel prices for maritime operations, compliance planning, and arbitrage opportunities.

Endpoints

EndpointDescriptionAccess
/v1/prices/marine-fuelsLatest prices at all portsAll tiers
/v1/prices/marine-fuels/latestFiltered latest pricesAll tiers
/v1/prices/marine-fuels/portsList available portsAll tiers
/v1/prices/marine-fuels/historicalHistorical price dataPaid tiers only

Fuel Types

CodeDescriptionSulfur ContentISO Spec
MGO_05SMarine Gas Oil0.5%ISO 8217 DMA
VLSFOVery Low Sulfur Fuel Oil0.5%ISO 8217 RMG380
HFO_380Heavy Fuel Oil 3803.5%ISO 8217 RMG380
HFO_180Heavy Fuel Oil 1803.5%ISO 8217 RMG180

Major Ports

Port CodePort NameRegionCountryFuels
SGSINSingaporeAsiaSingaporeMGO_05S, VLSFO, HFO_380, HFO_180
NLRTMRotterdamEuropeNetherlandsMGO_05S, VLSFO, HFO_380, HFO_180
USHOUHoustonAmericasUnited StatesMGO_05S, VLSFO, HFO_380, HFO_180
AEFUJFujairahMiddle EastUnited Arab EmiratesMGO_05S, VLSFO, HFO_380, HFO_180
HKHKGHong KongAsiaHong KongMGO_05S, VLSFO, HFO_380
USLAXLos AngelesAmericasUnited StatesMGO_05S, VLSFO, HFO_380
BRSSZSantosAmericasBrazilMGO_05S, VLSFO, HFO_380
USNYCNew YorkAmericasUnited StatesMGO_05S, VLSFO, HFO_380

These 8 ports are the full current coverage — /v1/prices/marine-fuels/ports is the live source of truth.

Get All Marine Fuel Prices

curl -X GET "https://api.oilpriceapi.com/v1/prices/marine-fuels" \
  -H "Authorization: Token YOUR_API_KEY"

Response:

{
  "status": "success",
  "data": {
    "prices": [
      {
        "port_code": "SGSIN",
        "port_name": "Singapore",
        "country": "Singapore",
        "region": "Asia",
        "coordinates": {
          "latitude": 1.2966,
          "longitude": 103.7764
        },
        "fuels": [
          {
            "code": "VLSFO_SGSIN_USD",
            "fuel_type": "VLSFO",
            "fuel_name": "Very Low Sulfur Fuel Oil (VLSFO) - Singapore (SGSIN)",
            "price": 838.0,
            "formatted": "$838.00",
            "currency": "USD",
            "unit": "metric_ton",
            "source": "market_reporting",
            "timestamp": "2026-09-02T11:11:31.199Z",
            "quality_grade": "ISO 8217 RMG380",
            "synthetic": false,
            "stale": false,
            "age_days": 0
          },
          {
            "code": "MGO_05S_SGSIN_USD",
            "fuel_type": "MGO_05S",
            "fuel_name": "Marine Gas Oil 0.5%S (MGO) - Singapore (SGSIN)",
            "price": 1222.5,
            "formatted": "$1222.50",
            "currency": "USD",
            "unit": "metric_ton",
            "source": "market_reporting",
            "timestamp": "2026-09-02T11:11:31.229Z",
            "quality_grade": "ISO 8217 DMA",
            "synthetic": false,
            "stale": false,
            "age_days": 0
          }
        ]
      }
    ],
    "ports": [
      {"code": "SGSIN", "name": "Singapore", "country": "Singapore"},
      {"code": "NLRTM", "name": "Rotterdam", "country": "Netherlands"}
    ]
  }
}

Get Specific Port Prices

curl -X GET "https://api.oilpriceapi.com/v1/prices/marine-fuels/latest?port_code=SGSIN" \
  -H "Authorization: Token YOUR_API_KEY"

latest always returns port groups — each element of data.prices[] is a port with a nested fuels[] array, never a flat list of fuel objects. Pick the fuel you need from fuels[] client-side.

Response:

{
  "status": "success",
  "data": {
    "prices": [
      {
        "port_code": "SGSIN",
        "port_name": "Singapore",
        "country": "Singapore",
        "region": "Asia",
        "coordinates": { "latitude": 1.2966, "longitude": 103.7764 },
        "fuels": [
          {
            "code": "VLSFO_SGSIN_USD",
            "fuel_type": "VLSFO",
            "fuel_name": "Very Low Sulfur Fuel Oil (VLSFO) - Singapore (SGSIN)",
            "price": 838.0,
            "formatted": "$838.00",
            "currency": "USD",
            "unit": "metric_ton",
            "source": "market_reporting",
            "timestamp": "2026-09-02T11:11:31.199Z",
            "quality_grade": "ISO 8217 RMG380",
            "synthetic": false,
            "stale": false,
            "age_days": 0
          }
        ]
      }
    ]
  }
}

List Available Ports

curl -X GET "https://api.oilpriceapi.com/v1/prices/marine-fuels/ports" \
  -H "Authorization: Token YOUR_API_KEY"

Response:

{
  "status": "success",
  "data": {
    "ports": [
      {
        "code": "SGSIN",
        "name": "Singapore",
        "country": "Singapore",
        "region": "Asia",
        "major_port": true,
        "coordinates": {
          "latitude": 1.2966,
          "longitude": 103.7764
        },
        "fuel_services": ["MGO_05S", "VLSFO", "HFO_380", "HFO_180"],
        "recent_prices": [...]
      }
    ],
    "count": 8
  }
}

Historical Data (Paid Tiers)

Track price trends and analyze historical patterns:

curl -X GET "https://api.oilpriceapi.com/v1/prices/marine-fuels/historical?port_code=NLRTM&fuel_type=VLSFO&days=30" \
  -H "Authorization: Token YOUR_API_KEY"

Response:

{
  "status": "success",
  "data": {
    "prices": [
      {
        "fuel_type": "VLSFO",
        "price": 625.50,
        "formatted": "$625.50/MT",
        "timestamp": "2025-09-20T14:00:00.000Z"
      },
      {
        "fuel_type": "VLSFO",
        "price": 624.75,
        "formatted": "$624.75/MT",
        "timestamp": "2025-09-20T10:00:00.000Z"
      }
    ],
    "metadata": {
      "port": "NLRTM",
      "fuel_type": "VLSFO",
      "days": 30,
      "count": 180,
      "period": {
        "start": "2025-08-21T00:00:00.000Z",
        "end": "2025-09-20T14:00:00.000Z"
      }
    }
  }
}

Implementation Examples

JavaScript - Port Price Comparison

class MarineFuelAnalyzer {
  constructor(apiKey) {
    this.apiKey = apiKey;
    this.baseUrl = 'https://api.oilpriceapi.com/v1/prices';
  }

  async comparePortPrices(fuelType = 'VLSFO') {
    // Fetch every port, then filter to the fuel client-side —
    // each element of data.prices[] is a port group with a fuels[] array.
    const response = await fetch(`${this.baseUrl}/marine-fuels/latest`, {
      headers: { 'Authorization': `Token ${this.apiKey}` }
    });

    const data = await response.json();
    return this.analyzeSpread(data.data.prices, fuelType);
  }

  analyzeSpread(portGroups, fuelType) {
    // Flatten port groups into [{ port, price }] rows for the chosen fuel
    const rows = portGroups.flatMap((port) =>
      port.fuels
        .filter((f) => f.fuel_type === fuelType)
        .map((f) => ({ port: port.port_code, price: f.price }))
    );

    const sorted = rows.sort((a, b) => a.price - b.price);
    const cheapest = sorted[0];
    const mostExpensive = sorted[sorted.length - 1];

    return {
      cheapest,
      mostExpensive,
      spread: mostExpensive.price - cheapest.price,
      arbitrageOpportunity: (mostExpensive.price - cheapest.price) > 50
    };
  }
}

Python - IMO 2020 Compliance Calculator

import requests
from datetime import datetime, timedelta

class IMO2020ComplianceTracker:
    """Track fuel costs for IMO 2020 sulfur regulations"""

    def __init__(self, api_key):
        self.api_key = api_key
        self.base_url = 'https://api.oilpriceapi.com/v1/prices'

    def get_compliance_fuel_costs(self, port_code):
        """Get compliant fuel options for a specific port"""

        response = requests.get(
            f'{self.base_url}/marine-fuels/latest',
            params={'port_code': port_code},
            headers={'Authorization': f'Token {self.api_key}'}
        )

        data = response.json()['data']

        # Filter for IMO 2020 compliant fuels (<= 0.5% sulfur)
        compliant_fuels = {
            'MGO_05S': None,
            'VLSFO': None
        }

        # data['prices'] is a list of port groups; each carries a fuels[] array
        for port_group in data['prices']:
            for fuel in port_group['fuels']:
                if fuel['fuel_type'] in compliant_fuels:
                    compliant_fuels[fuel['fuel_type']] = fuel['price']

        return {
            'port': port_code,
            'compliant_options': compliant_fuels,
            'cheapest_compliant': min(
                (k, v) for k, v in compliant_fuels.items() if v
            ),
            'timestamp': datetime.utcnow().isoformat()
        }

    def calculate_voyage_fuel_cost(self, port_code, fuel_consumption_mt, fuel_type='VLSFO'):
        """Calculate total fuel cost for a voyage"""

        costs = self.get_compliance_fuel_costs(port_code)
        fuel_price = costs['compliant_options'].get(fuel_type, 0)

        return {
            'port': port_code,
            'fuel_type': fuel_type,
            'price_per_mt': fuel_price,
            'consumption_mt': fuel_consumption_mt,
            'total_cost': fuel_price * fuel_consumption_mt,
            'alternative_fuel': costs['cheapest_compliant']
        }

Ruby - Bunker Alert System

class BunkerPriceAlert
  def initialize(api_key)
    @api_key = api_key
    @base_url = 'https://api.oilpriceapi.com/v1/prices'
  end

  def check_price_threshold(port, fuel_type, threshold)
    uri = URI("#{@base_url}/marine-fuels/latest")
    uri.query = URI.encode_www_form(port_code: port)

    request = Net::HTTP::Get.new(uri)
    request['Authorization'] = "Token #{@api_key}"

    response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
      http.request(request)
    end

    data = JSON.parse(response.body)
    # prices[] holds port groups; pick the fuel out of the port's fuels[] array
    port_group = data['data']['prices'].first
    fuel = port_group['fuels'].find { |f| f['fuel_type'] == fuel_type }
    current_price = fuel['price']

    {
      alert: current_price <= threshold,
      current_price: current_price,
      threshold: threshold,
      port: port,
      fuel_type: fuel_type,
      message: current_price <= threshold ?
        "ALERT: #{fuel_type} at #{port} is $#{current_price}/MT (below $#{threshold})" :
        "#{fuel_type} at #{port}: $#{current_price}/MT"
    }
  end

  def monitor_multiple_ports(fuel_type, threshold)
    ports = ['SGSIN', 'NLRTM', 'USHOU', 'AEFUJ']
    alerts = []

    ports.each do |port|
      result = check_price_threshold(port, fuel_type, threshold)
      alerts << result if result[:alert]
      sleep(0.5) # Rate limit consideration
    end

    alerts
  end
end

Use Cases

1. Bunker Procurement Planning

  • Compare prices across ports on shipping routes
  • Identify optimal refueling locations
  • Track price trends for budget forecasting

2. IMO 2020 Compliance

  • Monitor compliant fuel availability
  • Track VLSFO vs MGO price spreads
  • Calculate compliance cost impacts

3. Arbitrage Opportunities

  • Identify price disparities between regions
  • Monitor spread trends
  • Alert on threshold breaches

4. Fleet Operations

  • Optimize fuel procurement strategies
  • Budget voyage costs
  • Track fuel expense trends

Parameters Reference

/marine-fuels/latest

ParameterTypeRequiredDescription
port_codestringNoPort code (e.g., SGSIN). port is accepted as an alias
fuel_typestringNoFuel type (e.g., VLSFO). Known issue: filtering by fuel_type currently returns no rows for every value (api#7774). Until that lands, omit it and filter client-side from each port's fuels[] array
limitintegerNoMax results (default: 50, max: 100)

/marine-fuels/historical

ParameterTypeRequiredDescription
port_codestringYesPort code. port is accepted as an alias
fuel_typestringYesFuel type
daysintegerNoDays of history (1-365, default: 30)

port_code is the parameter name in the OpenAPI spec; port keeps working for existing integrations. A historical request missing either required parameter returns 400 with error: "port_code and fuel_type parameters are required" and a hint naming the alias.

Error Responses

Invalid Port Code

{
  "error": "Invalid port code: INVALID"
}

Historical Data Access Denied (Free Tier)

{
  "error": "Historical marine fuel data requires a paid subscription",
  "status": 403
}

Data Updates

  • Prices updated every 4 hours
  • Major ports have higher update frequency
  • Aggregated from published market reporting and port authorities

Next Steps

  • ICE Brent Futures API
  • All Prices Endpoint
  • Historical Data API
Last Updated: 9/4/26, 12:12 PM
Prev
Drilling Intelligence API
Next
ICE Brent Futures API