{
  "openapi": "3.1.0",
  "info": {
    "title": "ACH Clock API",
    "version": "1.0.0",
    "description": "US payment timing: Federal Reserve holidays, ACH settlement dates, and banking business day arithmetic. Deterministic; computed from the Federal Reserve Bank holiday schedule and the FedACH processing schedule. Informational only, not banking or legal advice.",
    "contact": {
      "url": "https://achclock.com/agents/"
    },
    "license": {
      "name": "Proprietary API; underlying holiday dates are public facts",
      "url": "https://achclock.com/terms/"
    }
  },
  "servers": [
    {
      "url": "https://achclock.com"
    }
  ],
  "externalDocs": {
    "description": "Agent-oriented description",
    "url": "https://achclock.com/agents/"
  },
  "paths": {
    "/api/v1/holidays": {
      "get": {
        "summary": "Federal Reserve Bank holidays for a calendar year.",
        "description": "Federal Reserve Bank holidays for a calendar year. Returns Array of holidays with date, name, and whether ACH processes that day.",
        "operationId": "holidays",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": true,
            "description": "2026-2030",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Array of holidays with date, name, and whether ACH processes that day.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or out-of-range parameter. JSON body with an `error` field."
          },
          "401": {
            "description": "No API key supplied and per-call payment is not enabled."
          }
        }
      }
    },
    "/api/v1/settlement-date": {
      "get": {
        "summary": "ACH settlement date for a file submitted at a given date and time.",
        "description": "ACH settlement date for a file submitted at a given date and time. Returns settlementDate (ISO 8601) and bankingDays consumed.",
        "operationId": "settlementDate",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "description": "ISO 8601 date, e.g. 2026-11-25",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "time",
            "in": "query",
            "required": false,
            "description": "24h ET time, e.g. 16:45. Only affects same-day.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "speed",
            "in": "query",
            "required": false,
            "description": "same-day | next-day | two-day. Default next-day.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "settlementDate (ISO 8601) and bankingDays consumed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or out-of-range parameter. JSON body with an `error` field."
          },
          "401": {
            "description": "No API key supplied and per-call payment is not enabled."
          }
        }
      }
    },
    "/api/v1/business-days": {
      "get": {
        "summary": "Add or subtract banking days from a date.",
        "description": "Add or subtract banking days from a date. Returns result (ISO 8601) after skipping weekends and Reserve Bank closures.",
        "operationId": "businessDays",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "description": "ISO 8601 date",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": true,
            "description": "May be negative to count backwards.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "result (ISO 8601) after skipping weekends and Reserve Bank closures.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or out-of-range parameter. JSON body with an `error` field."
          },
          "401": {
            "description": "No API key supplied and per-call payment is not enabled."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Annual key from https://achclock.com/pricing/. One-time charge, valid 365 days, does not auto-renew."
      }
    }
  },
  "x-x402": {
    "enabled": false,
    "version": 2,
    "scheme": "exact",
    "asset": "USDC",
    "priceUsd": "0.001",
    "amountAtomic": "1000",
    "note": "Authoritative network, asset address and payTo are published in the PAYMENT-REQUIRED header of a live 402 response. Read them from there, not from this file."
  }
}
