WritersLogic Verifiable AI Agent Hub Vault Exit API
The Vault Exit API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for vault exit.
The Vault Exit API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for vault exit.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-vault-exit-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: WritersLogic Verifiable AI Agent Hub Vault Exit API
version: 2.0.0
description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
contact:
name: WritersLogic
url: https://writerslogic.com/agents
email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Vault Exit
paths:
/api/v1/vault-exit:
post:
operationId: vault_exit_lawyer
summary: Vault Exit Lawyer
description: 'Before moving treasury funds out of an ERC-4626 or ERC-7540 vault: reads the chain at one pinned block and returns how much can exit now, the haircut vs convertToAssets, partial-exit maximum, liquidity coverage, queue/cooldown timing, admin-power flags (upgrade, pause, multisig threshold, timelock), and a verdict EXIT_NOW_FULL / EXIT_PARTIAL / QUEUED / BLOCKED / UNKNOWN. With a holder it simulates redeem via eth_call. Optional docsUrls are checked against the contract for contradictions. All numbers are computed deterministically; the model only reads documentation. Answers in seconds to about a minute; if a data source stalls it returns a signed partial result (partial, missing) that names what was not read instead of timing out. Not financial advice.
Price: 0.25 USDC on Base (x402).'
x-x402-price-usdc: '0.25'
x-x402-amount: '250000'
x-payment-info:
protocols:
- x402
price:
mode: fixed
currency: USD
amount: '0.25'
x-audience: crypto
x-sample-url: https://agents.writerslogic.com/api/v1/samples/vault-exit-lawyer
security:
- x402: []
- apiKey: []
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- chain
- vault
- exit
properties:
chain:
type: string
enum:
- ethereum
- base
- polygon
- arbitrum
- optimism
description: Chain the vault lives on.
vault:
type: string
pattern: ^0x[0-9a-fA-F]{40}$
description: ERC-4626 or ERC-7540 vault address.
exit:
type: object
additionalProperties: false
description: Exactly one of shares or assets, as base-unit integer strings. shares may be "max" (needs holder).
properties:
shares:
type: string
pattern: ^([0-9]{1,78}|max)$
description: Vault shares to redeem (base units), or "max" for the holder's whole balance.
assets:
type: string
pattern: ^[0-9]{1,78}$
description: Underlying assets to receive (base units).
holder:
type: string
pattern: ^0x[0-9a-fA-F]{40}$
description: Address that holds the shares. Enables an exact eth_call redeem simulation and per-holder limits.
docsUrls:
type: array
maxItems: 4
items:
type: string
maxLength: 2000
description: Public documentation pages whose redemption claims are checked against the contract.
example:
chain: ethereum
vault: '0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB'
exit:
shares: '1000000000000000000000'
responses:
'200':
description: Paid result with provenance
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
chain:
type: string
vault:
type: string
block_number:
type: integer
block_timestamp:
type: integer
verdict:
type: string
enum:
- EXIT_NOW_FULL
- EXIT_PARTIAL
- QUEUED
- BLOCKED
- UNKNOWN
confidence:
type: string
enum:
- high
- medium
- low
description: Lowered one level when the result is partial or the docs check is incomplete.
summary:
type: string
description: One-sentence decision with the amount that can leave now and the critical admin-flag count.
next_step:
type: string
description: Concrete action for the caller given the verdict.
verdict_reasons:
type: array
items:
type: string
partial:
type: boolean
description: True when the time budget ended a stage early; missing says which.
missing:
type: array
description: Stages the time budget cut off and what each gap means for the result.
items:
type: object
properties:
stage:
type: string
enum:
- vault_state
- exit_quote
- simulation
- partial_exit_search
- admin_power
- docs_check
impact:
type: string
time_budget:
type: object
description: budget_ms and elapsed_ms for this request.
vault_info:
type: object
description: Name, asset, decimals, totals, and vault-type specifics (MetaMorpho, Yearn v3, Euler v2, ERC-7540).
request:
type: object
description: Resolved exit in shares with fair (convertToAssets) and quoted (previewRedeem) values.
holder:
anyOf:
- type: object
description: Holder balance, maxRedeem, maxWithdraw, pending/claimable requests, cooldown. Null when no holder address was given.
- type: 'null'
exitable_now:
type: object
description: assets, shares, basis (simulation | liquidity_pool | claimable_queue | ...).
haircut:
type: object
description: fee_haircut_bps = price haircut vs convertToAssets; undeliverable_now_bps = share of the exit that cannot leave this block; effective_haircut_bps (null when QUEUED, which is delay not loss).
partial_exit_max:
type: object
description: Largest exit that works now (shares, assets, method, resolution_shares).
time_to_full_exit:
type: object
description: kind, seconds (null when the contract states no schedule), basis.
liquidity:
type: object
description: Pool assets, coverage_ratio, per-market (Morpho Blue) or per-strategy (Yearn) withdrawable amounts.
simulation:
anyOf:
- type: object
description: eth_call result of redeem (or requestRedeem for ERC-7540) from the holder. Null without a holder.
- type: 'null'
admin:
type: object
properties:
proxy:
type: object
controllers:
type: array
items:
type: object
power:
type: object
properties:
flags:
type: array
items:
type: object
properties:
code:
type: string
severity:
type: string
enum:
- info
- warn
- critical
detail:
type: string
unknowns:
type: array
items:
type: string
what_would_change_verdict:
type: array
items:
type: string
docs_analysis:
type: object
description: Claims with verified quotes, contradictions with severity (ensemble plus adversarial review), confidence.
_provenance:
type: object
description: C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance
required:
- data
- _provenance
'400':
description: Invalid request (no payment consumed)
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'401':
description: Invalid X-API-KEY
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'402':
description: Payment required or invalid
content:
application/json:
schema:
type: object
description: x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)
properties:
x402Version:
type: integer
error:
type: string
code:
type: string
resource:
type: object
accepts:
type: array
items:
type: object
extensions:
type: object
'502':
description: Upstream failure; the payment is released or not settled
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
tags:
- Vault Exit
components:
securitySchemes:
x402:
type: apiKey
in: header
name: PAYMENT-SIGNATURE
description: x402 v2 payment payload (base64) sent after a 402 challenge
apiKey:
type: apiKey
in: header
name: X-API-KEY