{"uid":"cap_JoIHyznQMXAvS03iB_lO8","slug":"token-bid-ask-spread-weighted-mean-b073d26a","name":"Token Bid-Ask Spread Weighted Mean","description":"Token bid-ask spread — Weighted result mean: Weighted result mean for Token bid-ask spread. Supplied token observations only. Deterministic calculation or caller-threshold verdict, not a live scan, safety proof or trade recommendation. Specialised preset in a shared 50-profile, 20-operation engine. 0.01 USDC includes one bounded weighted result mean report.","url":"https://market.datapackvibe.com/x402/assistant-bx-token-quote-spread-weighted-mean?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["ask","bid"],"properties":{"ask":{"type":"number","default":1.02,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0},"bid":{"type":"number","default":0.98,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0}},"additionalProperties":false},"default":[{"ask":1.02,"bid":0.98},{"ask":1.122,"bid":1.078},{"ask":1.02,"bid":0.98},{"ask":1.122,"bid":1.078}],"maxItems":200,"minItems":2},"weights":{"type":"array","items":{"type":"number","default":1,"maximum":1000000000000,"minimum":0},"default":[1,2,1,2],"maxItems":200,"minItems":2}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cvJWTtcm8VkE0vD-C7KTc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes a weighted mean of bid-ask spread observations for a token, given an array of bid/ask price pairs and corresponding weights.","exampleAgentPrompt":"Calculate the weighted mean bid-ask spread for this token using these 4 observations: bids [0.98, 1.078, 0.98, 1.078] and asks [1.02, 1.122, 1.02, 1.122], with weights [1, 2, 1, 2].","exampleUseCases":[{"title":"Liquidity quality check across time slots","prompt":"I have 6 bid-ask snapshots for a token taken at different times of day — bids [0.99, 1.05, 1.10, 0.97, 1.02, 1.08] and asks [1.01, 1.07, 1.13, 0.99, 1.04, 1.11] — and I want to weight recent snapshots more heavily with weights [1, 1, 2, 2, 3, 3]. Give me the weighted mean spread."},{"title":"Comparing spread across market regimes","prompt":"Can you compute the weighted mean bid-ask spread for this token during a volatile period? I have 3 observations: bids [0.95, 1.20, 0.88] and asks [1.05, 1.35, 0.98], all equally weighted at [1, 1, 1]."},{"title":"Aggregating venue quotes for best spread estimate","prompt":"I'm pulling quotes from 5 different venues for the same token — bids [1.00, 1.001, 0.999, 1.002, 0.998] and asks [1.010, 1.012, 1.009, 1.011, 1.008] — and I want to weight the most liquid venues more: weights [3, 5, 2, 4, 1]. What's the weighted mean spread?"}],"resultDescription":"A single weighted mean value representing the average bid-ask spread across the supplied token price observations, computed deterministically from the provided bid/ask pairs and their associated weights. No live market scanning or trade recommendation is included.","failureModes":["Fewer than 2 rows provided — minimum of 2 bid/ask observation pairs required","Weights array length does not match rows array length — arrays must be equal in length","Bid or ask value is zero or negative — all prices must be strictly positive","Ask value less than or equal to bid value for a row — inverted spread not supported","Row count exceeds 200 maximum items limit","Weight value exceeds maximum of 1,000,000,000,000"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, weighted aggregation of bid-ask spread observations for a token and already have the raw bid/ask data in hand. Prefer it over raw spread calculators when different observations should contribute unequally to the result (e.g. by volume, recency, or venue quality). It is not a live market scanner or a trade signal — use it for post-hoc analysis, reporting, or pre-trade spread benchmarking from collected quote data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T18:48:15.596Z","isFirstParty":false,"canonicalSlug":"token-bid-ask-spread-weighted-mean-b073d26a"}