{"uid":"cap_KO8QSKuGq6SYYmxOdPr8v","slug":"slippage-percent-calculator-45060cab","name":"Slippage Percent Calculator","description":"Slippage percent of expected mid versus fill/impact price. Call when post-trade quality checks and pre-trade impact budgets. Returns slippage percent vs mid as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/slippage-pct","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mid":{"type":"integer","description":"Input field: mid."},"fill":{"type":"number","description":"Input field: fill."}}},"responseSchema":{"type":"json","example":{"mid":100,"fill":100.3,"schema":"delx/util-slippage-pct/v1","slippage_pct":0.2999999999999972}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_RyOe7fP0UC4Dg1wepdnp1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates the slippage percent between an expected mid price and an actual fill/impact price for pre- and post-trade quality checks.","exampleAgentPrompt":"Calculate the slippage percent for a trade where the mid price was 1500 and the fill price came in at 1503.75.","exampleUseCases":[{"title":"Post-trade execution quality audit","prompt":"I just executed a large order — the mid price was 2000 and we filled at 2006. Can you tell me what slippage percent that represents against the mid?"},{"title":"Pre-trade impact budget validation","prompt":"Before I place this block trade, I want to check: if my mid is 450 and I expect a fill at 451.8, what's the slippage percent so I can see if it's within my 40bps impact budget?"},{"title":"Algorithmic strategy benchmarking","prompt":"For my TWAP run this morning, average mid was 100 and the volume-weighted fill came out to 100.12 — compute the slippage percent so I can log it against my strategy benchmark."}],"resultDescription":"A deterministic JSON object containing the slippage percent computed as the difference between the fill/impact price and the mid price, expressed as a percentage of the mid price. No live market data, RPC calls, or external feeds are involved — the result is pure local arithmetic.","failureModes":["Missing or invalid 'mid' field (zero or null mid would cause division by zero)","Non-numeric values for mid or fill causing computation failure","Mid price of zero causing divide-by-zero error","Malformed JSON request body returning a 400 error","Payment failure or insufficient USDC balance returning a 402 error"],"whenToPreferThis":"Use this endpoint when you need a lightweight, deterministic, no-dependency slippage percent calculation for post-trade quality checks or pre-trade impact budgeting. It requires no API keys, market data feeds, or RPC connections — making it ideal for sandboxed agents, audit pipelines, or strategy backtests that need reproducible slippage math at minimal cost ($0.001 USDC per call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:14:45.913Z","isFirstParty":false}