{"uid":"cap_YguJLaUi_Uzjmtif42api","slug":"delx-commerce-spread-percentage-calculator-47589f71","name":"Delx Commerce Spread 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/spread-pct?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ask":{"type":"number","description":"Input field: ask."},"bid":{"type":"number","description":"Input field: bid."}}},"responseSchema":{"type":"json","example":{"ask":100.5,"bid":99.5,"mid":100,"schema":"delx/util-spread-pct/v1","spread_pct":1}},"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_uP0tzinGahghOe60bLoVq","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 bid-ask spread percentage and midpoint price given a bid and ask price","exampleAgentPrompt":"What is the bid-ask spread percentage if the bid is 99.5 and the ask is 100.5? Give me the spread pct and the midpoint price.","exampleUseCases":[{"title":"Evaluating liquidity of a trading pair","prompt":"I'm looking at a crypto pair with a bid of 49800 and an ask of 50200 — what's the spread percentage and midpoint price?"},{"title":"Monitoring tightness of FX quotes","prompt":"For a forex quote where bid is 1.0820 and ask is 1.0825, can you calculate the spread percentage for me?"},{"title":"Comparing spreads across multiple assets","prompt":"I have bid 205.10 and ask 205.40 for a stock I'm watching — what's the spread as a percentage of the mid price?"}],"resultDescription":"Returns a JSON object containing the original ask and bid prices, the computed midpoint price (mid), the spread as a percentage (spread_pct), and a schema identifier string (delx/util-spread-pct/v1).","failureModes":["Missing bid or ask fields results in a validation error","Non-numeric values for bid or ask cause a parsing error","Ask price lower than bid price may return a negative or unexpected spread_pct","Payment failure via x402 (insufficient USDC balance) blocks the request"],"whenToPreferThis":"Use this endpoint when you need a simple, cheap, verifiable computation of bid-ask spread percentage and midpoint from raw price quotes, without needing to integrate a full market data provider. Ideal for agents that receive raw bid/ask quotes from exchanges and need to normalize or filter by spread width on-the-fly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:04.439Z","isFirstParty":false,"canonicalSlug":"delx-commerce-spread-percentage-calculator-47589f71"}