{
  "openapi": "3.1.0",
  "info": {
    "title": "FabTally Chain — on-chain monitoring reads for agents",
    "version": "1.0.0",
    "description": "Cheap per-call READS an AI agent or dev polls: ens-expiry (resolve an ENS .eth / Basename .base.eth name's registration expiry + grace period on-chain), gas (live base + priority fee for a chain, with an optional at/below-threshold check), token-unlocks (next vesting/unlock event(s) from DefiLlama's public emissions data), and oracle-health (Chainlink feed staleness / round health / deviation). All read-only, keyless, stateless, descriptive market-data/utility reads — never signals or price predictions. Paid via x402 (USDC on Base) or a prepaid credit key; each has a rate-limited free teaser. Also available as an MCP server. The stateful 'alert me when …' delivery is a separate product (the FabTally Alerts Telegram bot).",
    "x-guidance": "Paid (x402 USDC on Base, or prepaid X-FabTally-Key): POST /v1/ens-expiry ($0.001), /v1/gas ($0.001), /v1/token-unlocks ($0.003), /v1/oracle-health ($0.003) — each has a rate-limited /free teaser. Unpaid paid-calls return an x402 402 challenge; pay and retry with the X-PAYMENT header. Bad input -> 400, never charged. Read-only market-data/utility reads, not financial advice.",
    "contact": {
      "email": "hello@fabtally.com"
    }
  },
  "servers": [
    {
      "url": "https://chain.fabtally.com"
    }
  ],
  "paths": {
    "/agent/overview": {
      "get": {
        "operationId": "overview",
        "summary": "Capabilities, pricing, payment info (free)",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Overview"
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Health (free)",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/v1/ens-expiry": {
      "post": {
        "operationId": "ens_expiry",
        "summary": "ens-expiry (paid, $0.001 USDC on Base)",
        "tags": [
          "Paid"
        ],
        "description": "Resolve an ENS .eth or Basename .base.eth name's registration expiry ON-CHAIN (public RPC, no key). Give {name}; get expiry date, days-left, whether it's in the 90-day grace period, the release date it becomes registrable again, and the current owner. Read-only, stateless, descriptive.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "1000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://chain.fabtally.com/v1/ens-expiry",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "vitalik.eth"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (never charged)"
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge)"
          }
        }
      }
    },
    "/v1/ens-expiry/free": {
      "post": {
        "operationId": "ens_expiry_free",
        "summary": "ens-expiry — rate-limited free teaser",
        "tags": [
          "Free"
        ],
        "security": [],
        "description": "Free teaser for ens-expiry (daily per-IP quota).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "name": "vitalik.eth"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Teaser result"
          },
          "429": {
            "description": "Free daily quota exceeded"
          }
        }
      }
    },
    "/v1/gas": {
      "post": {
        "operationId": "gas",
        "summary": "gas (paid, $0.001 USDC on Base)",
        "tags": [
          "Paid"
        ],
        "description": "Current gas for a chain via public RPC (no key). Give {chain: ethereum|base|arbitrum|polygon|bsc|optimism, below_gwei?}; get base fee + suggested priority + suggested max fee (gwei) at the latest block, and — if below_gwei is set — a boolean of whether the base fee is at/below your threshold right now. Read-only, stateless.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "1000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://chain.fabtally.com/v1/gas",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "chain": "base",
                "below_gwei": 5
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (never charged)"
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge)"
          }
        }
      }
    },
    "/v1/gas/free": {
      "post": {
        "operationId": "gas_free",
        "summary": "gas — rate-limited free teaser",
        "tags": [
          "Free"
        ],
        "security": [],
        "description": "Free teaser for gas (daily per-IP quota).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "chain": "base",
                "below_gwei": 5
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Teaser result"
          },
          "429": {
            "description": "Free daily quota exceeded"
          }
        }
      }
    },
    "/v1/token-unlocks": {
      "post": {
        "operationId": "token_unlocks",
        "summary": "token-unlocks (paid, $0.003 USDC on Base)",
        "tags": [
          "Paid"
        ],
        "description": "Next token vesting/unlock event(s) from DefiLlama's PUBLIC emissions dataset. Give {token: symbol|name|address, chain?}; get the upcoming unlock date(s), token amount, and % of max supply, with a human description. Cleanly says so when a token has no public unlock schedule. Read-only, stateless, descriptive — not a price signal.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "3000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://chain.fabtally.com/v1/token-unlocks",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "token": "ARB"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (never charged)"
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge)"
          }
        }
      }
    },
    "/v1/token-unlocks/free": {
      "post": {
        "operationId": "token_unlocks_free",
        "summary": "token-unlocks — rate-limited free teaser",
        "tags": [
          "Free"
        ],
        "security": [],
        "description": "Free teaser for token-unlocks (daily per-IP quota).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "token": "ARB"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Teaser result"
          },
          "429": {
            "description": "Free daily quota exceeded"
          }
        }
      }
    },
    "/v1/oracle-health": {
      "post": {
        "operationId": "oracle_health",
        "summary": "oracle-health (paid, $0.003 USDC on Base)",
        "tags": [
          "Paid"
        ],
        "description": "Chainlink price-feed health via public RPC. Give {feed_address, chain, heartbeat_seconds?, reference?}; get last-update age, latest answer (scaled by decimals), round monotonicity (is the answer current?), a stale flag vs the heartbeat, optional deviation vs a reference price, and per-factor flags. Read-only, stateless, descriptive.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "maxAmountRequired": "3000",
                "payTo": "0xccB5d25C698FdfdaA7B21d54088774cF512A90e3",
                "resource": "https://chain.fabtally.com/v1/oracle-health",
                "facilitator": "https://facilitator.daydreams.systems",
                "maxTimeoutSeconds": 60
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "feed_address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
                "chain": "ethereum",
                "heartbeat_seconds": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (never charged)"
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge)"
          }
        }
      }
    },
    "/v1/oracle-health/free": {
      "post": {
        "operationId": "oracle_health_free",
        "summary": "oracle-health — rate-limited free teaser",
        "tags": [
          "Free"
        ],
        "security": [],
        "description": "Free teaser for oracle-health (daily per-IP quota).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "feed_address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
                "chain": "ethereum",
                "heartbeat_seconds": 3600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Teaser result"
          },
          "429": {
            "description": "Free daily quota exceeded"
          }
        }
      }
    }
  }
}