{"uid":"cap__47rfW8Sp8m3tBmAFBa86","slug":"treasury-preflight-fd7af14b","name":"Treasury Preflight","description":"x402-paid preflight checks for stablecoin transfers.","url":"https://preflight.admapu.xyz/v1/preflight?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["token","from","to","amount"],"properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Recipient address"},"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Sender address"},"chain":{"enum":["ethereum","base","arbitrum","optimism","polygon"],"type":"string","default":"ethereum"},"token":{"enum":["USDC","USDT"],"type":"string"},"amount":{"type":"string","pattern":"^\\d+(\\.\\d{1,6})?$","description":"Amount in token units, e.g. 2500.50"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["verdict","fee","checks","block"],"properties":{"fee":{"type":"object"},"block":{"type":"integer"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"level":{"type":"string"},"detail":{"type":"string"}}}},"verdict":{"enum":["pass","warn","fail"],"type":"string"},"validUntil":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"fee":{"usd":0.42,"native":"0.000161","timing":{"advice":"send_now","percentile24h":38},"gasUnits":43210,"nativeSymbol":"ETH"},"block":23456789,"chain":"ethereum","token":"USDC","amount":"2500","checks":[{"id":"token_balance","level":"pass","detail":"Balance 10000.0 USDC covers the transfer."},{"id":"low_gas","level":"warn","detail":"Sender has 0.0004 ETH, under 3x the estimated fee."},{"id":"simulation","level":"pass","detail":"Transfer simulates successfully (43,210 gas)."}],"verdict":"warn","validUntil":"2026-09-30T14:00:24.000Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PedqUpAOLcRZDnHIJsdtJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs preflight validation checks on a stablecoin transfer to assess feasibility, gas costs, and risks before execution","exampleAgentPrompt":"Before I send 2500 USDC from 0xAbC...123 to 0xDeF...456 on Ethereum, run a preflight check to make sure the transfer will go through — look at my balance, gas coverage, and simulate the transaction.","exampleUseCases":[{"title":"Pre-validate large treasury disbursement","prompt":"I'm about to send 50000 USDC from 0x1111...AAAA to 0x2222...BBBB on Arbitrum — can you run a preflight check first to make sure the balance is sufficient, gas is covered, and the transfer will simulate correctly?"},{"title":"Catch low gas before payroll run","prompt":"Before we kick off the payroll transfer of 8500 USDT from 0xAAAA...1234 to 0xBBBB...5678 on Polygon, do a preflight check to see if the sender has enough gas and the transfer will pass."},{"title":"Agent safety gate for automated DeFi transfers","prompt":"My bot is about to move 1000 USDC from 0xCCCC...9999 to 0xDDDD...0000 on Base — run a preflight validation and tell me the verdict so I can decide whether to proceed or hold off."}],"resultDescription":"Returns a structured verdict ('pass', 'warn', or 'fail') along with an array of individual check results (e.g. token balance, gas coverage, transaction simulation), an estimated gas fee with USD and native token amounts, the block number at time of check, the chain and token details, and a validUntil timestamp indicating how long the result is fresh.","failureModes":["Missing required query parameters (token, from, to, amount) returns a 400 error","Invalid Ethereum address format for 'from' or 'to' causes validation rejection","Unsupported token or chain enum value results in an error","RPC or on-chain simulation failure may return an error or degraded check results","Payment of $0.03 USDC via x402 protocol required; missing or invalid payment returns 402","Result may be stale if used after validUntil timestamp"],"whenToPreferThis":"Use this endpoint when you need to gate a stablecoin transfer with a safety check before execution — especially for automated agents, treasury operations, or high-value transfers where a failed on-chain transaction would be costly. Prefer this over manual balance checks when you need a combined assessment of token balance, gas adequacy, and transaction simulation in a single call. Best suited for Ethereum, Base, Arbitrum, Optimism, and Polygon with USDC or USDT.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T00:40:03.390Z","isFirstParty":false,"canonicalSlug":"treasury-preflight-fd7af14b"}