{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sochain-com/json-schema/sochain-com-network-info-schema.json",
  "title": "NetworkInfo",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sochain-com-openapi.json#/components/schemas/NetworkInfo",
  "type": "object",
  "required": [
    "block_count",
    "best_block_hash",
    "hashrate",
    "mempool"
  ],
  "properties": {
    "block_count": {
      "type": "integer",
      "description": "Height of the newest block."
    },
    "best_block_hash": {
      "type": "string"
    },
    "hashrate": {
      "type": "string",
      "description": "Estimated hashes per second (solutions per second on Zcash), as a decimal string."
    },
    "mempool": {
      "type": "object",
      "required": [
        "mempool_txs",
        "mempool_size",
        "updated_at",
        "blocks"
      ],
      "properties": {
        "mempool_txs": {
          "type": "integer"
        },
        "mempool_size": {
          "type": "integer",
          "description": "Bytes."
        },
        "updated_at": {
          "type": "integer"
        },
        "blocks": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "$ref": "#/$defs/ProjectedBlock"
          }
        },
        "loading": {
          "type": "boolean",
          "description": "true while the mempool is still being read in: its counts can be low until this turns false."
        },
        "quote_targets": {
          "type": [
            "object",
            "null"
          ],
          "description": "Dogecoin only: fee rates its pools have accepted lately, learned from the last samples blocks with payments. fast, normal and slow are each { fee_rate, within_blocks }: the lowest rate (koinu/vB, like the rates beside it) at which payments got into a block within within_blocks blocks, as often as confidence says (0.95: 95% of the time). null on other networks, and until it has learned.",
          "properties": {
            "fast": {
              "$ref": "#/$defs/QuoteTarget"
            },
            "normal": {
              "$ref": "#/$defs/QuoteTarget"
            },
            "slow": {
              "$ref": "#/$defs/QuoteTarget"
            },
            "confidence": {
              "type": "number",
              "description": "How often the quotes held, from 0 to 1."
            },
            "samples": {
              "type": "integer",
              "description": "Blocks with payments they're learned from."
            }
          }
        }
      }
    }
  },
  "$defs": {
    "ProjectedBlock": {
      "type": "object",
      "required": [
        "block_num",
        "min_fee_rate",
        "max_fee_rate",
        "median_fee_rate",
        "min_fee_rate_possible",
        "weight",
        "size",
        "num_txs"
      ],
      "description": "A block projected from the mempool. Fee rates are per virtual byte, in satoshis (BTC, BTCTEST), litoshis (LTC, LTCTEST) or koinu (DOGE, DOGETEST); on Zcash (ZEC, ZECTEST), zatoshis per logical action (ZIP 317).",
      "properties": {
        "block_num": {
          "type": "integer",
          "minimum": 1,
          "maximum": 6
        },
        "min_fee_rate": {
          "type": "integer"
        },
        "max_fee_rate": {
          "type": "integer"
        },
        "median_fee_rate": {
          "type": "integer"
        },
        "min_fee_rate_possible": {
          "type": "integer"
        },
        "min_fee_rate_precise": {
          "type": "string",
          "description": "min_fee_rate to two decimal places (\"0.31\"), so rates under one unit show."
        },
        "median_fee_rate_precise": {
          "type": "string",
          "description": "median_fee_rate to two decimal places."
        },
        "max_fee_rate_precise": {
          "type": "string",
          "description": "max_fee_rate to two decimal places."
        },
        "min_fee_rate_possible_precise": {
          "type": "string",
          "description": "min_fee_rate_possible to two decimal places."
        },
        "weight": {
          "type": "integer"
        },
        "size": {
          "type": "integer"
        },
        "num_txs": {
          "type": "integer"
        },
        "fee_unit": {
          "const": "zat/action",
          "description": "Zcash only: the rates on this block are zatoshis per logical action (ZIP 317), not per byte."
        },
        "marginal_fee": {
          "type": "integer",
          "description": "Zcash only: the ZIP 317 fee per logical action, in zat."
        },
        "grace_actions": {
          "type": "integer",
          "description": "Zcash only: the fewest actions a fee pays for, 2."
        }
      }
    },
    "QuoteTarget": {
      "type": "object",
      "properties": {
        "fee_rate": {
          "type": "integer",
          "description": "The lowest rate, in koinu/vB, at which payments got into a block within within_blocks blocks, as often as confidence says."
        },
        "within_blocks": {
          "type": [
            "integer",
            "null"
          ],
          "description": "How many blocks the quote is for."
        }
      }
    }
  }
}