{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gnosis-pay/json-schema/gnosis-pay-account-balances-v2-response-schema.json",
  "title": "AccountBalancesV2Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-user-movements-api-openapi.yml#/components/schemas/AccountBalancesV2Response",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccountBalanceV2"
      },
      "description": "List of balances per currency."
    }
  },
  "$defs": {
    "AccountBalanceV2": {
      "type": "object",
      "required": [
        "currency",
        "decimals",
        "spendable",
        "nonSpendable",
        "processingDeposits",
        "processingWithdrawals",
        "tokens"
      ],
      "properties": {
        "currency": {
          "type": "string",
          "description": "Currency code."
        },
        "decimals": {
          "type": "integer",
          "format": "int32",
          "description": "Number of decimal places for this currency's raw amounts."
        },
        "spendable": {
          "type": "string",
          "description": "Spendable balance. Raw bigint string in the currency's smallest unit."
        },
        "nonSpendable": {
          "type": "string",
          "description": "Non-spendable balance. Raw bigint string."
        },
        "processingDeposits": {
          "type": "string",
          "description": "Incoming deposits being processed. Raw bigint string."
        },
        "processingWithdrawals": {
          "type": "string",
          "description": "Outgoing withdrawals being processed. Raw bigint string."
        },
        "tokens": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TokenBalance"
          },
          "description": "Per-token breakdown of balances."
        }
      }
    },
    "TokenBalance": {
      "type": "object",
      "required": [
        "token",
        "decimals",
        "spendable",
        "nonSpendable",
        "processingDeposits",
        "maxInstantWithdraw"
      ],
      "properties": {
        "token": {
          "type": "string",
          "description": "Token symbol."
        },
        "decimals": {
          "type": "integer",
          "format": "int32",
          "description": "Number of decimal places for this token."
        },
        "spendable": {
          "type": "string",
          "description": "Spendable balance for this token. Raw bigint string."
        },
        "nonSpendable": {
          "type": "string",
          "description": "Non-spendable balance for this token. Raw bigint string."
        },
        "processingDeposits": {
          "type": "string",
          "description": "Incoming deposits for this token being processed. Raw bigint string."
        },
        "maxInstantWithdraw": {
          "type": "string",
          "description": "Maximum amount of this token that an instant withdrawal would accept right\nnow, in token base units. Already accounts for pending card authorization\nholds and available on-chain backing."
        }
      }
    }
  }
}