curl -X GET "https://stocks-dev.up.railway.app/api/v1/commodities?commodity_type=energy" \ -H "X-API-Key: your_api_key"
{ "commodities": [ { "symbol": "CL=F", "name": "Crude Oil WTI", "price": 78.45, "change": 1.23, "changesPercentage": 1.59, "unit": "per barrel", "category": "energy", "lastUpdated": "2024-01-19T15:30:00Z" }, { "symbol": "BZ=F", "name": "Brent Crude Oil", "price": 82.67, "change": 0.89, "changesPercentage": 1.09, "unit": "per barrel", "category": "energy", "lastUpdated": "2024-01-19T15:30:00Z" }, { "symbol": "NG=F", "name": "Natural Gas", "price": 2.845, "change": -0.125, "changesPercentage": -4.21, "unit": "per MMBtu", "category": "energy", "lastUpdated": "2024-01-19T15:30:00Z" } ], "timestamp": "2024-01-19T15:30:00Z" }
Get current prices for commodities including energy, metals, and agriculture
all
energy
metals
agriculture
Show Commodity object properties