{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/debitmydata/json-schema/debitmydata-dmd-price-schema.json",
  "title": "DmdPrice",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/debitmydata-openapi.json#/components/schemas/DmdPrice",
  "properties": {
    "asset": {
      "type": "string",
      "title": "Asset"
    },
    "network": {
      "type": "string",
      "title": "Network"
    },
    "usd_per_unit": {
      "type": "string",
      "title": "Usd Per Unit"
    },
    "units_per_usd": {
      "type": "string",
      "title": "Units Per Usd"
    },
    "method": {
      "type": "string",
      "title": "Method"
    },
    "price_from": {
      "type": "string",
      "title": "Price From",
      "description": "mining_cost, or minimum when the minimum rate is higher than the mining cost."
    },
    "mining_cost_usd_per_unit": {
      "type": "string",
      "title": "Mining Cost Usd Per Unit",
      "description": "What it costs to mine 1 DMD (DebitMyData coin)."
    },
    "minimum_usd_per_unit": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Minimum Usd Per Unit",
      "description": "DebitMyData's minimum rate until DMD has a market price; null if none."
    },
    "minimum_approved_on": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ],
      "title": "Minimum Approved On"
    },
    "observed_at": {
      "type": "string",
      "format": "date-time",
      "title": "Observed At"
    },
    "age_seconds": {
      "type": "integer",
      "title": "Age Seconds"
    },
    "fresh": {
      "type": "boolean",
      "title": "Fresh",
      "description": "Recent enough to be used in a quote."
    },
    "used_for_quotes": {
      "type": "boolean",
      "title": "Used For Quotes",
      "description": "Whether DMD quotes on this server use it."
    },
    "parameters_review_overdue": {
      "type": "boolean",
      "title": "Parameters Review Overdue",
      "description": "The approved electricity price and machine efficiency are past their quarterly review."
    },
    "note": {
      "type": "string",
      "title": "Note"
    },
    "inputs": {
      "additionalProperties": true,
      "type": "object",
      "title": "Inputs"
    }
  },
  "type": "object",
  "required": [
    "asset",
    "network",
    "usd_per_unit",
    "units_per_usd",
    "method",
    "price_from",
    "mining_cost_usd_per_unit",
    "minimum_usd_per_unit",
    "observed_at",
    "age_seconds",
    "fresh",
    "used_for_quotes",
    "parameters_review_overdue",
    "note",
    "inputs"
  ]
}