CME Coal Futures (CME_COAL_USD)
Status: Discontinued — historical data only
CME Coal Futures - DISCONTINUED March 2020. Historical data only.
This series is discontinued. Last value $34.04 on 2020-03-27 — it is no longer updated.
Quick Reference
| Property | Value |
|---|---|
| Commodity Code | CME_COAL_USD |
| Name | CME Coal Futures |
| Status | Discontinued (no longer updated) |
| Category | Coal |
| Currency | USD |
| Unit | USD/short ton |
| Last Value | $34.04 on 2020-03-27 |
Get Last Recorded Price
GET/v1/prices/latest?by_code=CME_COAL_USD
The endpoint still serves the final recorded value. The response flags it as stale so integrations do not mistake it for a current price:
{
"status": "success",
"data": {
"price": 34.04,
"formatted": "$34.04",
"currency": "USD",
"code": "CME_COAL_USD",
"created_at": "2020-03-27T12:00:00.000Z",
"type": "spot_price",
"data_status": "stale",
"stale_reason": "discontinued",
"source": "market_reporting"
}
}
Historical Data
The recent-window endpoints (past_day, past_week, past_month, past_year) return no data for this series — it stopped updating on 2020-03-27. To retrieve the recorded history, use the Historical Prices API with an explicit date range ending on or before 2020-03-27.
Code Examples
These examples request the recorded history — there is no current price to poll for a discontinued series.
cURL
# Final month of recorded data (the series stopped updating on 2020-03-27)
curl -H "Authorization: Token YOUR_API_KEY" \
"https://api.oilpriceapi.com/v1/prices/historical?by_code=CME_COAL_USD&start_date=2020-02-27&end_date=2020-03-27"
Python
import requests
# CME_COAL_USD stopped updating on 2020-03-27. Request the recorded
# history with an explicit date range and read the final value.
api_key = "YOUR_API_KEY"
url = "https://api.oilpriceapi.com/v1/prices/historical"
response = requests.get(
url,
params={
"by_code": "CME_COAL_USD",
"start_date": "2020-02-27",
"end_date": "2020-03-27",
},
headers={"Authorization": f"Token {api_key}"},
)
prices = response.json()["data"]["prices"]
final = max(prices, key=lambda row: row["created_at"])
print(f"CME Coal Futures (final recorded value): {final['formatted']} on {final['created_at']}")
JavaScript
const apiKey = 'YOUR_API_KEY';
const code = 'CME_COAL_USD';
// CME_COAL_USD stopped updating on 2020-03-27. Request the recorded
// history with an explicit date range and read the final value.
const params = new URLSearchParams({
by_code: code,
start_date: '2020-02-27',
end_date: '2020-03-27'
});
fetch(`https://api.oilpriceapi.com/v1/prices/historical?${params}`, {
headers: {
'Authorization': `Token ${apiKey}`
}
})
.then(res => res.json())
.then(({ data }) => {
const final = data.prices.reduce((a, b) => (a.created_at > b.created_at ? a : b));
console.log(`CME Coal Futures (final recorded value): ${final.formatted} on ${final.created_at}`);
});
Related Endpoints
- Historical Prices - Time-series data
- Commodities List - Browse all commodities