{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cpz-lab-com/json-schema/cpz-lab-com-cash-account-schema.json",
  "title": "CashAccount",
  "description": "A connected account with the last balance the metrics sync recorded. coverage says whether a balance is on record.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cpz-lab-com-openapi.yml#/components/schemas/CashAccount",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "broker": {
      "type": "string"
    },
    "broker_display_name": {
      "type": "string"
    },
    "environment": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "live",
        "paper"
      ]
    },
    "account_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "account_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "tradable": {
      "type": "boolean"
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "cash": {
      "type": [
        "number",
        "null"
      ]
    },
    "buying_power": {
      "type": [
        "number",
        "null"
      ]
    },
    "equity": {
      "type": [
        "number",
        "null"
      ]
    },
    "as_of": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "stale": {
      "type": "boolean"
    },
    "coverage": {
      "type": "string",
      "enum": [
        "synced",
        "not_synced",
        "no_balance_source"
      ]
    }
  }
}