{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-commodity-snapshot-item-schema.json",
  "title": "CommoditySnapshotItem",
  "description": "Snapshot returns a trimmed schema for batch efficiency. For previous_close, change_24h_percent, high_24h, low_24h, high_52w, low_52w, use /v1/commodityprice on a specific commodity.",
  "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/CommoditySnapshotItem",
  "type": "object",
  "properties": {
    "exchange": {
      "type": "string",
      "description": "Listing exchange."
    },
    "name": {
      "type": "string",
      "description": "Display name of the commodity."
    },
    "value": {
      "type": "string",
      "description": "The API ?name= parameter value for this commodity."
    },
    "category": {
      "type": "string",
      "enum": [
        "precious_metals",
        "base_metals",
        "energy",
        "grains",
        "softs",
        "livestock"
      ],
      "description": "Product category for filtering."
    },
    "currency_unit": {
      "type": "string",
      "enum": [
        "USD",
        "USX"
      ],
      "description": "USD = US dollars per unit; USX = US cents per unit."
    },
    "unit": {
      "type": "string",
      "description": "The quote unit."
    },
    "price": {
      "type": "number",
      "description": "Current price in the commodity's native unit and currency convention."
    },
    "change_24h": {
      "type": "number",
      "description": "Absolute price change vs the previous close."
    },
    "volume": {
      "type": "integer",
      "description": "Trading volume for the session."
    },
    "updated": {
      "type": "integer",
      "description": "Unix timestamp when the snapshot was fetched."
    }
  }
}