{"uid":"cap_KcKg-rVhJhc-TmGtkIKxg","slug":"flow-fill-instruction-api-7927afae","name":"Flow Fill Instruction API","description":"Flow fill instruction on Base: the executable route package (venue, router, calldata params, min output, expiry block) for a swap whose best quote beats the Uniswap V3 baseline. Priced dynamically at 25% of the measured improvement, capped at 10 bps of output; $0 when there is no improvement.","url":"https://flow-kg4x.vercel.app/api/fill?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":null,"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08117","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.08117/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08117","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08117","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4jffOEqOHmEtKayKFEO1O","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08117","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns an executable swap route package for Base that beats the Uniswap V3 baseline, priced at 25% of the measured improvement (capped at 10 bps of output).","exampleAgentPrompt":"Before I commit to swapping 500 USDC for WETH on Base, get me the best executable fill instruction — I want the venue, router, calldata, minimum output, and expiry block for the route that beats the Uniswap V3 price right now.","exampleUseCases":[{"title":"Pre-swap price optimization on Base","prompt":"I'm about to swap 1000 USDC into CBETH on Base — before I sign anything, get me the best executable fill instruction with the venue, calldata, and minimum output that beats the Uniswap V3 quote right now."},{"title":"Smart wallet agent automated buy","prompt":"My smart wallet agent is ready to buy BRETT on Base with 200 USDC. Get the optimal swap fill instruction — venue, router, calldata params, min output, and expiry block — so it can execute the best available price."},{"title":"Arbitrage route validation before execution","prompt":"I'm running a Base arb strategy and need the fill instruction package for swapping DAI to USDC — give me the full executable route with calldata and minimum output so I can check if the improvement over Uniswap V3 is worth executing."}],"resultDescription":"Returns a complete executable swap route package including the venue (DEX), router address, calldata parameters, minimum output amount, and expiry block number. The package is ready to submit on-chain. Only returned when the route beats the Uniswap V3 baseline; the fee is 25% of the measured improvement, capped at 10 bps of output, and $0 when there is no improvement.","failureModes":["No improvement over Uniswap V3 baseline — returns $0 cost response with no fill instruction","Expired expiry block — route may be stale by the time of submission","Insufficient liquidity for the requested swap size — no valid route returned","Invalid token pair or unsupported token on Base — request fails","Payment failure via x402 protocol — call not processed"],"whenToPreferThis":"Use this endpoint when an agent is about to execute a token swap on Base and wants the best executable price beyond what Uniswap V3 offers, with a ready-to-submit calldata package. Prefer this over a generic quote endpoint when you need both the price improvement validation and the executable route in one call. Best suited for smart wallet agents that need actionable fill instructions rather than just indicative quotes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T00:31:02.908Z","isFirstParty":false,"canonicalSlug":"flow-fill-instruction-api-7927afae"}