{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/satoshidata-ai/json-schema/satoshidata-ai-wallet-overview-response-schema.json",
  "title": "WalletOverviewResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/satoshidata-ai-openapi.json#/components/schemas/WalletOverviewResponse",
  "additionalProperties": false,
  "properties": {
    "kind": {
      "const": "wallet_overview",
      "default": "wallet_overview",
      "title": "Kind",
      "type": "string"
    },
    "address": {
      "title": "Address",
      "type": "string"
    },
    "address_type": {
      "$ref": "#/$defs/WalletAddressType",
      "description": "Parsed Bitcoin address type and support metadata."
    },
    "balance_btc": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Balance Btc"
    },
    "balance_sat": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Balance Sat"
    },
    "unconfirmed_balance_btc": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Unconfirmed Balance Btc"
    },
    "unconfirmed_balance_sat": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Unconfirmed Balance Sat"
    },
    "balance_usd": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Balance Usd"
    },
    "tx_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tx Count"
    },
    "utxo_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Utxo Count"
    },
    "first_seen_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "First Seen At"
    },
    "first_seen_at_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "First Seen At Source"
    },
    "last_seen_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Seen At"
    },
    "last_inbound_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Inbound At"
    },
    "last_outbound_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Outbound At"
    },
    "last_activity_direction": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Activity Direction"
    },
    "dormancy_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Dormancy Status"
    },
    "activity_timestamp_semantics": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Activity Timestamp Semantics"
    },
    "address_history_first_seen_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Address History First Seen At"
    },
    "history_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "History Source"
    },
    "history_degraded": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "History Degraded"
    },
    "history_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "History Note"
    },
    "indexer_start_date": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Indexer Start Date"
    },
    "btc_price_usd": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Btc Price Usd"
    },
    "price_change_24h_pct": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Price Change 24H Pct"
    },
    "price_fetched_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Price Fetched At"
    },
    "price_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Price Source"
    },
    "fx_rates": {
      "additionalProperties": true,
      "title": "Fx Rates",
      "type": "object"
    },
    "fx_rates_as_of": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Fx Rates As Of"
    },
    "fx_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Fx Status"
    },
    "wallet_health": {
      "description": "Wallet-health checks estimated from the overview balance, UTXOs, and transaction count.",
      "items": {
        "$ref": "#/$defs/WalletHealthCheck"
      },
      "title": "Wallet Health",
      "type": "array"
    },
    "access": {
      "$ref": "#/$defs/PublicAccessProjection"
    },
    "_meta": {
      "$ref": "#/$defs/ResponseMeta"
    },
    "beta": {
      "title": "Beta",
      "type": "boolean"
    }
  },
  "required": [
    "address",
    "address_type",
    "_meta",
    "beta"
  ],
  "type": "object",
  "$defs": {
    "PublicAccessProjection": {
      "additionalProperties": false,
      "properties": {
        "tier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tier"
        },
        "auth_mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Auth Mode"
        },
        "auth_header": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Auth Header"
        },
        "authorization_scheme": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Authorization Scheme"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Label"
        }
      },
      "title": "PublicAccessProjection",
      "type": "object"
    },
    "ResponseMeta": {
      "additionalProperties": false,
      "properties": {
        "endpoint": {
          "title": "Endpoint",
          "type": "string"
        },
        "freshness": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Freshness"
        },
        "freshness_semantics": {
          "anyOf": [
            {
              "enum": [
                "internal_refresh",
                "source_poll",
                "claim_made"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Freshness Semantics"
        },
        "source": {
          "title": "Source",
          "type": "string"
        },
        "price_sats": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price Sats"
        },
        "price_usd": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Price Usd"
        },
        "docs": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Docs"
        },
        "warnings": {
          "items": {
            "$ref": "#/$defs/ResponseWarning"
          },
          "title": "Warnings",
          "type": "array"
        },
        "pagination": {
          "anyOf": [
            {
              "$ref": "#/$defs/ResponsePagination"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "view": {
          "anyOf": [
            {
              "const": "compact",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "View"
        },
        "bitcoin_backend": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Bitcoin Backend"
        },
        "beta": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Beta"
        },
        "cache_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Seconds"
        },
        "cache_ttl_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Ttl Seconds"
        },
        "cache_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Status"
        },
        "cache_age_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Age Seconds"
        },
        "cache_cached_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Cached At"
        },
        "cached": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cached"
        },
        "cache_policy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cache Policy"
        },
        "compute_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Compute Ms"
        },
        "warning": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Warning"
        },
        "refresh_warning": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Refresh Warning"
        },
        "last_refresh_started_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Refresh Started At"
        },
        "last_refresh_completed_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Refresh Completed At"
        },
        "last_refresh_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Refresh Status"
        },
        "last_refresh_error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Refresh Error"
        },
        "last_refresh_duration_ms": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Refresh Duration Ms"
        },
        "feature_flag": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Feature Flag"
        },
        "rollout_state": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Rollout State"
        },
        "schema_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Schema Version"
        },
        "methodology_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Methodology Version"
        },
        "materialized_source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Materialized Source"
        },
        "max_hops": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max Hops"
        },
        "retention": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Retention"
        },
        "not_compliance_advice": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Not Compliance Advice"
        },
        "future_native_price_mode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Future Native Price Mode"
        },
        "future_native_price_note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Future Native Price Note"
        },
        "future_native_quote_endpoint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Future Native Quote Endpoint"
        },
        "overview_activity_cache": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Overview Activity Cache"
        },
        "attribution_confidence": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Attribution Confidence"
        },
        "generated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Generated At"
        },
        "last_computed": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Last Computed"
        },
        "snapshot_generated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshot Generated At"
        },
        "snapshot_age_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshot Age Seconds"
        },
        "snapshot_stale_after_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshot Stale After Seconds"
        },
        "snapshot_status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Snapshot Status"
        },
        "history_window_basis": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "History Window Basis"
        },
        "total_blocks_last_24h": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Total Blocks Last 24H"
        },
        "field_semantics": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Field Semantics"
        },
        "semantic_completeness": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Semantic Completeness"
        }
      },
      "required": [
        "endpoint",
        "source"
      ],
      "title": "ResponseMeta",
      "type": "object"
    },
    "ResponsePagination": {
      "additionalProperties": false,
      "properties": {
        "offset": {
          "title": "Offset",
          "type": "integer"
        },
        "limit": {
          "title": "Limit",
          "type": "integer"
        },
        "total_alerts": {
          "title": "Total Alerts",
          "type": "integer"
        },
        "next_offset": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Next Offset"
        },
        "has_more": {
          "title": "Has More",
          "type": "boolean"
        }
      },
      "required": [
        "offset",
        "limit",
        "total_alerts",
        "next_offset",
        "has_more"
      ],
      "title": "ResponsePagination",
      "type": "object"
    },
    "ResponseWarning": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "title": "Code",
          "type": "string"
        },
        "message": {
          "title": "Message",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "ResponseWarning",
      "type": "object"
    },
    "WalletAddressType": {
      "additionalProperties": false,
      "properties": {
        "label": {
          "description": "Human-readable Bitcoin address type, such as Legacy or Taproot.",
          "title": "Label",
          "type": "string"
        },
        "short": {
          "description": "Short address format label, such as P2PKH, P2SH, Bech32, or Bech32m.",
          "title": "Short",
          "type": "string"
        },
        "class_name": {
          "description": "Stable UI/API class key for the address type, such as legacy, p2sh, or bech32.",
          "title": "Class Name",
          "type": "string"
        }
      },
      "required": [
        "label",
        "short",
        "class_name"
      ],
      "title": "WalletAddressType",
      "type": "object"
    },
    "WalletHealthCheck": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "description": "Stable check identifier, such as consolidation, dust, reuse, script, or concentration.",
          "title": "Id",
          "type": "string"
        },
        "code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Stable Chain Notes message variant. Display title and comment as sent.",
          "title": "Code"
        },
        "params": {
          "additionalProperties": {
            "type": "integer"
          },
          "description": "Numeric facts used to render the message variant.",
          "title": "Params",
          "type": "object"
        },
        "status": {
          "description": "Severity of the wallet-health check.",
          "enum": [
            "good",
            "info",
            "warning",
            "alert"
          ],
          "title": "Status",
          "type": "string"
        },
        "title": {
          "description": "Human-readable wallet-health check title.",
          "title": "Title",
          "type": "string"
        },
        "comment": {
          "description": "Short explanation of the check result.",
          "title": "Comment",
          "type": "string"
        }
      },
      "required": [
        "id",
        "status",
        "title",
        "comment"
      ],
      "title": "WalletHealthCheck",
      "type": "object"
    }
  }
}