{"uid":"cap_y-Tl2i9grxE-Jb3l6PkXa","slug":"butterfly-delta-delta-preflight-6751a46d","name":"Butterfly Delta Delta-Preflight","description":"Check which explicit assumptions became stale before an autonomous machine commits a consequential action.","url":"https://butterflydelta.com/api/agent/delta-preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"trade":{"type":"object","required":["pair"],"properties":{"pair":{"type":"string","pattern":"^[A-Za-z0-9]{2,15}[-/_]USD$","description":"USD spot pair, for example BTC-USD."},"side":{"enum":["buy","sell"],"type":"string"},"venue":{"enum":["coinbase","gemini"],"type":"string","description":"Optional execution venue. Include with side and baseSize for exact-order simulation."},"summary":{"type":"string","maxLength":1000},"baseSize":{"type":"number","description":"Exact base-asset size, for example 0.25 BTC.","exclusiveMinimum":0},"deadline":{"type":"string","maxLength":120},"orderType":{"enum":["market","limit"],"type":"string","default":"market"},"limitPrice":{"type":"number","description":"Required when orderType is limit.","exclusiveMinimum":0},"minHealthyVenues":{"type":"number","default":2,"maximum":2,"minimum":1},"maxVenueSpreadBps":{"type":"number","default":10,"maximum":10000,"minimum":0},"maxQuoteAgeSeconds":{"type":"number","default":10,"maximum":3600,"minimum":0},"minDepthCoveragePct":{"type":"number","default":100,"maximum":100,"minimum":0},"maxEstimatedSlippageBps":{"type":"number","default":25,"maximum":10000,"minimum":0},"maxCrossVenueDivergenceBps":{"type":"number","default":20,"maximum":10000,"minimum":0}},"description":"Bot-native input. Butterfly Delta expands this policy into explicit, signed venue assertions.","additionalProperties":false},"action":{"type":"object","required":["kind","target"],"properties":{"kind":{"enum":["trade","purchase","transfer","deploy","publish","api_call","execute","other"],"type":"string"},"stakes":{"type":"object","properties":{"value":{"type":"string","maxLength":80},"currency":{"type":"string","maxLength":32},"irreversible":{"type":"boolean"}},"additionalProperties":false},"target":{"type":"string","maxLength":240,"minLength":2},"summary":{"type":"string","maxLength":1000},"deadline":{"type":"string","maxLength":120},"execution":{"type":"object","required":["venue","side","baseSize"],"properties":{"side":{"enum":["buy","sell"],"type":"string"},"venue":{"enum":["coinbase","gemini"],"type":"string"},"baseSize":{"type":"number","exclusiveMinimum":0},"orderType":{"enum":["market","limit"],"type":"string","default":"market"},"limitPrice":{"type":"number","exclusiveMinimum":0},"minDepthCoveragePct":{"type":"number","default":100,"maximum":100,"minimum":0},"maxEstimatedSlippageBps":{"type":"number","default":25,"maximum":10000,"minimum":0}},"description":"Exact intended order used to simulate visible depth and estimated slippage on the selected venue.","additionalProperties":false},"jurisdiction":{"type":"string","maxLength":120}},"additionalProperties":false},"intent":{"type":"object","required":["kind","instrument"],"deprecated":true,"properties":{"kind":{"enum":["trade","allocation","transfer","other"],"type":"string"},"side":{"type":"string","maxLength":32},"venue":{"type":"string","maxLength":120},"horizon":{"type":"string","maxLength":120},"summary":{"type":"string","maxLength":1000},"instrument":{"type":"string","maxLength":120,"minLength":2}},"description":"Compatibility input for butterflydelta-gate/0.x. Use action instead.","additionalProperties":false},"checkpoint":{"type":"string","maxLength":160},"assumptions":{"type":"array","items":{"type":"object","required":["statement"],"properties":{"id":{"type":"string","maxLength":64},"assertion":{"type":"object","required":["metric","operator","value"],"properties":{"unit":{"type":"string","maxLength":32},"value":{"type":["string","number","boolean"]},"metric":{"enum":["market.coinbase.accepting_orders","market.coinbase.spread_bps","market.coinbase.last_trade_age_seconds","market.gemini.accepting_orders","market.gemini.spread_bps","market.coinbase.estimated_slippage_bps","market.coinbase.depth_coverage_pct","market.gemini.estimated_slippage_bps","market.gemini.depth_coverage_pct","market.cross_venue_mid_deviation_bps","market.source_count"],"type":"string"},"operator":{"enum":["lt","lte","eq","neq","gte","gt"],"type":"string"}},"additionalProperties":false},"statement":{"type":"string","maxLength":1000,"minLength":8}},"additionalProperties":false},"maxItems":20,"minItems":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VUwzbJOvp2N30wShs-rzG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates that all explicit assumptions behind a pending autonomous action (crypto trade, transfer, deploy, etc.) are still current before the agent commits to it.","exampleAgentPrompt":"Before my bot places a market buy of 0.25 BTC on Coinbase, run a Butterfly Delta preflight to make sure the order book has enough depth, estimated slippage is under 25 bps, and venue spread hasn't blown out — flag any assumptions that have gone stale since I set my policy.","exampleUseCases":[{"title":"Autonomous crypto trading bot guard","prompt":"My trading bot is about to place a market sell of 1.5 ETH on Gemini — before it commits, run a preflight to confirm order book depth covers the full size, cross-venue divergence is under 20 bps, and estimated slippage is within 25 bps. Flag any stale assumptions."},{"title":"Limit order pre-validation for agent","prompt":"I'm having my agent place a limit buy of 0.1 BTC at $62,000 on Coinbase — can you run a preflight check to make sure the venue spread is still under 10 bps, the quote is fresh (no more than 10 seconds old), and at least one healthy venue confirms depth coverage before it goes through?"},{"title":"Multi-step agent action integrity check","prompt":"My autonomous agent is about to execute a token transfer action targeting my cold wallet — run a Butterfly Delta preflight on it first to make sure none of the assumptions it was working from have gone stale, and tell me if anything looks off before it commits."}],"resultDescription":"Returns a structured preflight report indicating which explicit assumptions (slippage, venue spread, order book depth, quote freshness, cross-venue divergence) are still valid and which have become stale. Includes signed venue assertions for Coinbase and/or Gemini, a go/no-go recommendation, and per-check failure reasons if any threshold is breached.","failureModes":["Quote age exceeds maxQuoteAgeSeconds — returns stale-quote flag","Insufficient order book depth — minDepthCoveragePct threshold not met","Cross-venue price divergence exceeds maxCrossVenueDivergenceBps","Estimated slippage exceeds maxEstimatedSlippageBps","Fewer than minHealthyVenues venues are responsive","Invalid trading pair format — does not match ^[A-Za-z0-9]{2,15}[-/_]USD$","limitPrice missing when orderType is limit","Payment failure or missing x402 payment header ($0.01 USDC required)"],"whenToPreferThis":"Use this endpoint when an autonomous agent must validate that the real-world market conditions underpinning a crypto trading decision are still accurate before committing an irreversible or high-stakes action. It is especially valuable when the agent was configured with a policy at one point in time but may be executing later, when market conditions may have shifted. Prefer this over generic health checks when you need signed, per-venue assertions with configurable thresholds for slippage, spread, depth, and quote freshness specifically for Coinbase and Gemini spot markets.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:37:51.638Z","isFirstParty":false,"canonicalSlug":"butterfly-delta-delta-preflight-6751a46d"}