{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/laso-finance/json-schema/laso-finance-account-balance-schema.json",
  "title": "AccountBalance",
  "description": "Account balance information.",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/laso-finance-openapi.json#/components/schemas/AccountBalance",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "description": "The user's ID (lowercase wallet address)"
    },
    "balance_type": {
      "type": "string",
      "enum": [
        "account_balance"
      ],
      "description": "Names what `balance` measures: the Laso account balance, not the agent wallet."
    },
    "balance": {
      "type": "number",
      "description": "Laso account balance in USD. This is a ledger held by Laso and is what `/withdraw` draws on. It is not the agent wallet's on-chain balance; see `agent_wallet`."
    },
    "total_deposits": {
      "type": "number",
      "description": "Total lifetime USD credited to the account balance. Includes every paid request settled from the agent wallet, because each one arrives as a deposit before the purchase debits it. It is not a measure of money received from outside."
    },
    "agent_wallet": {
      "$ref": "#/$defs/AgentWalletBalance"
    },
    "note": {
      "type": "string",
      "description": "Plain-language explanation of how the account balance and the agent wallet relate."
    },
    "created_timestamp": {
      "type": "number"
    },
    "created_timestamp_readable": {
      "type": "string"
    }
  },
  "$defs": {
    "AgentWalletBalance": {
      "type": "object",
      "description": "The caller's managed agent wallet: separate on-chain USDC on Solana and Base, with `balance_usdc` the total. Not part of the account balance. Spend it through `agentX402Pay` and move it with `agentWalletTransfer`.",
      "properties": {
        "has_wallet": {
          "type": "boolean",
          "description": "False for wallet-native accounts and managed accounts with no wallet provisioned yet."
        },
        "wallet_address": {
          "type": [
            "string",
            "null"
          ],
          "description": "The wallet's Solana address, or null when `has_wallet` is false."
        },
        "balance_usdc": {
          "type": "number",
          "description": "USDC held on-chain by the agent wallet. The same figure `getAgentWallet` reports."
        }
      }
    }
  }
}