{"uid":"cap_NJhVW41MOC8VxVNdaY9OL","slug":"spread-percent-calculator-3d4a81ad","name":"Spread Percent Calculator","description":"Bid–ask spread as percent of mid for cross-asset compare. Call when comparing liquidity across price levels and assets. Returns spread percent of 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/spread-pct","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_ct0NJezxdjuYUh38JVIb-","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 bid-ask spread as a percentage of the mid-price for cross-asset liquidity comparison","exampleAgentPrompt":"What's the bid-ask spread as a percent of mid for a stock quoted at bid 99.80 and ask 100.20?","exampleUseCases":[{"title":"Liquidity comparison across asset classes","prompt":"I'm comparing liquidity between a stock and a futures contract — the stock has a bid of 150.10 and ask of 150.30, and the futures have bid 4990.00 and ask 4991.00. Can you calculate the spread percent of mid for each so I can compare them on equal footing?"},{"title":"Options chain spread screening","prompt":"I'm screening options contracts and want to filter out illiquid ones. For an option quoted at bid 2.35 and ask 2.65, what's the spread as a percent of the mid price?"},{"title":"Trading cost estimation before entry","prompt":"Before I enter this trade, can you tell me the spread percent of mid? The current bid is 0.4820 and the ask is 0.4850 — I want to know how much the spread is costing me relative to the price."}],"resultDescription":"Returns a deterministic JSON object containing the bid-ask spread expressed as a percentage of the mid-price (calculated as (ask - bid) / mid * 100), enabling normalized liquidity comparison across assets at different price levels.","failureModes":["Missing bid or ask field returns a validation error","Ask less than or equal to bid produces an invalid or zero/negative spread — may return an error or unexpected result","Non-numeric input for bid or ask causes a schema validation failure","Bid or ask of zero causes division-by-zero in mid-price calculation","Payment failure or insufficient USDC balance blocks the request via x402 protocol"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic, local-math computation of spread percent with no external data dependencies — ideal for normalizing bid-ask spreads across assets at wildly different price levels (e.g. comparing a $1 asset to a $5000 asset). Prefer this over manual calculation when you need consistent, auditable results in a pipeline. It is not suitable for fetching live market quotes — caller must supply bid and ask values from their own data source.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:04:52.370Z","isFirstParty":false}