{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-commodity-spot-response-schema.json",
  "title": "CommoditySpotResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-commodity-price-api-openapi.yml#/components/schemas/CommoditySpotResponse",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The commodity's display name."
    },
    "value": {
      "type": "string",
      "description": "The commodity's name parameter value."
    },
    "price": {
      "type": "number",
      "description": "The spot price: the price for immediate delivery."
    },
    "bid": {
      "type": "number",
      "description": "Spot bid price (composite spot only)."
    },
    "ask": {
      "type": "number",
      "description": "Spot ask price (composite spot only)."
    },
    "spot_type": {
      "type": "string",
      "enum": [
        "composite",
        "assessed"
      ],
      "description": "How the price is produced: composite = a live spot price with bid/ask (gold, silver, platinum, palladium; refreshed every minute on Developer plans, about every 10 seconds on Business plans and above); assessed = the daily spot price at the benchmark's physical delivery hub (oil and energy)."
    },
    "date": {
      "type": "string",
      "description": "Assessed spot only: the trading day of the price (YYYY-MM-DD). Daily spot prices are published with a delay, so it trails by several days."
    },
    "benchmark": {
      "type": "string",
      "description": "Assessed spot only: the physical spot benchmark (e.g., WTI Cushing, Oklahoma)."
    },
    "previous_close": {
      "type": "number",
      "description": "The previous session's closing spot price."
    },
    "change_24h": {
      "type": "number",
      "description": "Change versus the previous close."
    },
    "change_24h_percent": {
      "type": "number",
      "description": "Percent change versus the previous close."
    },
    "high_24h": {
      "type": "number",
      "description": "Composite spot only: the session's high price."
    },
    "low_24h": {
      "type": "number",
      "description": "Composite spot only: the session's low price."
    },
    "market_status": {
      "type": "string",
      "enum": [
        "open",
        "closed"
      ],
      "description": "Composite spot only: whether the market is trading (Sunday 6 PM to Friday 5 PM ET, with a daily 5-6 PM ET break)."
    },
    "updated": {
      "type": "integer",
      "description": "Unix timestamp (seconds) of the spot price."
    },
    "unit": {
      "type": "string",
      "description": "The quote unit."
    },
    "currency_unit": {
      "type": "string",
      "description": "Price currency, USD by default."
    }
  }
}