{"uid":"cap_4Vz_alIiWt1RMTASYUT6j","slug":"delx-commerce-slippage-percentage-calculator-ca7fce66","name":"Delx Commerce Slippage Percentage Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/slippage-pct?utm_source=zero.xyz","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_IGoYbXqS7BMfBREA5dUE1","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":"Computes the slippage percentage between a mid price and a fill price for a trade","exampleAgentPrompt":"What's the slippage percentage if the mid price was 100 and my fill came in at 100.3?","exampleUseCases":[{"title":"Post-trade execution quality check","prompt":"I just got filled at 2050.5 on an asset with a mid price of 2048 — what's my slippage percentage?"},{"title":"DeFi swap slippage measurement","prompt":"I swapped at a fill price of 1.035 when the mid was 1.000 — can you tell me the slippage percentage I paid?"},{"title":"Algorithmic trading performance audit","prompt":"Our algo filled orders at 500.75 against a mid of 500.00 — compute the slippage pct so I can log it to our execution report."}],"resultDescription":"Returns a JSON object containing the original mid price, fill price, schema identifier (delx/util-slippage-pct/v1), and the computed slippage percentage as a floating-point number representing the percent deviation of the fill from the mid.","failureModes":["Missing required fields (mid or fill) results in a validation error","Non-numeric or invalid type for mid (must be integer) or fill (must be number) causes a 400 error","Payment failure via x402 protocol prevents execution","Network timeout or service unavailability returns a 5xx error"],"whenToPreferThis":"Use this endpoint when you need a lightweight, pay-per-use, verifiable computation of slippage percentage without setting up a full analytics stack. It is ideal for AI agents that need to quantify trade execution quality on the fly, particularly in crypto or DeFi contexts where on-chain verifiability and micropayment billing via USDC/x402 are desirable. Prefer this over building your own arithmetic when you want auditable, schema-versioned results.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:47.535Z","isFirstParty":false,"canonicalSlug":"delx-commerce-slippage-percentage-calculator-ca7fce66"}