{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-bank-schema.json",
  "title": "Bank",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-accounts-api-openapi.yml#/components/schemas/Bank",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Format: 2020-01-01T01:01:01Z"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Format: 2020-01-01T01:01:01Z"
    },
    "account_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "enum": [
        "QUEUED",
        "SENT_TO_CLEARING",
        "APPROVED",
        "CANCELED"
      ],
      "description": "QUEUED, SENT_TO_CLEARING, APPROVED, CANCELED"
    },
    "name": {
      "type": "string",
      "description": "Name of recipient bank"
    },
    "bank_code": {
      "type": "string",
      "description": "9-Digit ABA RTN (Routing Number) or BIC"
    },
    "bank_code_type": {
      "type": "string",
      "enum": [
        "ABA",
        "BIC"
      ],
      "description": "ABA (Domestic) or BIC (International)"
    },
    "country": {
      "type": "string",
      "description": "Only for international banks"
    },
    "state_province": {
      "type": "string",
      "description": "Only for international banks"
    },
    "postal_code": {
      "type": "string",
      "description": "Only for international banks"
    },
    "city": {
      "type": "string",
      "description": "Only for international banks"
    },
    "street_address": {
      "type": "string",
      "description": "Only for international banks"
    },
    "account_number": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "created_at",
    "updated_at",
    "name",
    "bank_code",
    "bank_code_type",
    "account_number"
  ]
}