{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sochain-com/json-schema/sochain-com-bucket-summary-schema.json",
  "title": "BucketSummary",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sochain-com-openapi.json#/components/schemas/BucketSummary",
  "type": "object",
  "required": [
    "bucket",
    "num_addresses",
    "txs_sent",
    "txs_received",
    "txs_total",
    "confirmed_balance",
    "unconfirmed_balance",
    "confirmed_received",
    "funded_addresses",
    "version"
  ],
  "properties": {
    "bucket": {
      "$ref": "#/$defs/BucketName"
    },
    "network": {
      "enum": [
        "BTC",
        "LTC",
        "DOGE",
        "ZEC",
        "BTCTEST",
        "LTCTEST",
        "DOGETEST",
        "ZECTEST"
      ]
    },
    "num_addresses": {
      "type": "integer"
    },
    "txs_sent": {
      "type": "integer"
    },
    "txs_received": {
      "type": "integer"
    },
    "txs_total": {
      "type": "integer"
    },
    "confirmed_balance": {
      "$ref": "#/$defs/Amount"
    },
    "unconfirmed_balance": {
      "$ref": "#/$defs/Amount"
    },
    "confirmed_received": {
      "$ref": "#/$defs/Amount"
    },
    "confirmed_sent": {
      "$ref": "#/$defs/Amount",
      "description": "Everything its addresses have sent, summed over them (a move between two of them counts on both sides, as in confirmed_received)."
    },
    "unconfirmed_txs": {
      "type": "integer",
      "description": "How many of its transactions are still pending."
    },
    "funded_addresses": {
      "type": "integer",
      "description": "Addresses holding a balance."
    },
    "first_active": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "height": {
          "type": "integer"
        },
        "time": {
          "type": "integer"
        }
      },
      "description": "Its oldest confirmed transaction's block and time; null without one."
    },
    "last_active": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "height": {
          "type": "integer"
        },
        "time": {
          "type": "integer"
        }
      },
      "description": "Its newest confirmed transaction's block and time; null without one."
    },
    "version": {
      "type": "integer"
    },
    "tip_height": {
      "type": "integer",
      "description": "The newest block when the answer was made."
    }
  },
  "$defs": {
    "Amount": {
      "type": "string",
      "pattern": "^-?[0-9]+\\.[0-9]{8}$",
      "description": "An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float."
    },
    "BucketName": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]+$",
      "description": "Letters, numbers, - and _, up to 64 characters. Unique within your account.",
      "maxLength": 64
    }
  }
}