{"uid":"cap_0Wjs-FlyMOOuEMQ1oBn1J","slug":"mid-price-calculator-99c00bff","name":"Mid Price Calculator","description":"Mid price = (bid + ask) / 2 for spread-aware marks. Call when normalizing BBO into a single mid for agents. Returns mid price 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/mid-price","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-mid-price/v1"}},"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_7zWRhp9n0C4gTABW2QrfW","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 mid price as (bid + ask) / 2 from a supplied best bid and offer (BBO) pair, returning a single deterministic mark price.","exampleAgentPrompt":"Calculate the mid price for me — the bid is 1845.50 and the ask is 1847.20.","exampleUseCases":[{"title":"Option mark price normalization","prompt":"I have a bid of 2.35 and an ask of 2.65 on an options contract — what's the mid price I should use as my mark?"},{"title":"Spread-aware crypto pricing","prompt":"The order book shows best bid at 63,200 and best ask at 63,250 for BTC — give me the mid price to use for my position valuation."},{"title":"Slippage baseline reference","prompt":"Before I route this equity order, I need the mid price from a bid of 148.10 and ask of 148.30 so I can measure expected slippage."}],"resultDescription":"A deterministic JSON response containing the computed mid price value, derived purely from local arithmetic on the supplied bid and ask inputs — no live market feed or external data involved.","failureModes":["Missing bid or ask field returns a validation error","Non-numeric values for bid or ask cause a bad request response","Ask lower than bid may produce a negative spread mid (no validation guard documented)","Payment failure via x402 (insufficient USDC balance or wrong network) blocks the call"],"whenToPreferThis":"Prefer this endpoint when you need a simple, deterministic, auditable mid-price computation without spinning up local math, when you want a standardized JSON response for pipeline consistency, or when operating in an x402 micropayment context on Base where a $0.001 per-call cost is acceptable. It is purely local arithmetic — choose it over live market feed endpoints when you already have bid/ask values and just need the midpoint.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:02:40.443Z","isFirstParty":false}