{"uid":"cap_tiW5R2iDi1MNS7GQcP4P8","slug":"token-pool-quote-relative-difference-weighted-result-mean-d824f419","name":"Token Pool Quote Relative Difference — Weighted Result Mean","description":"Token pool quote relative difference — Weighted result mean: Weighted result mean for Token pool quote relative difference. 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-pool-price-gap-weighted-mean?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["pool_price","reference_price"],"properties":{"pool_price":{"type":"number","default":1.1,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0},"reference_price":{"type":"number","default":1,"maximum":10000000000000000,"minimum":0,"exclusiveMinimum":0}},"additionalProperties":false},"default":[{"pool_price":1.1,"reference_price":1},{"pool_price":1.2100000000000002,"reference_price":1.1},{"pool_price":1.1,"reference_price":1},{"pool_price":1.2100000000000002,"reference_price":1.1}],"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_edtbdpjFPuKqavqweiQXY","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 the weighted mean of relative price differences between pool quotes and reference prices across multiple token observations.","exampleAgentPrompt":"Calculate the weighted mean of the relative price differences for these token pool observations: pool prices [1.1, 1.21, 1.1, 1.21] vs reference prices [1.0, 1.1, 1.0, 1.1], using weights [1, 2, 1, 2].","exampleUseCases":[{"title":"Monitor DEX pool price drift","prompt":"I have four recent observations of a token pool: pool prices were 1.05, 1.12, 1.08, and 1.15 against reference prices of 1.0, 1.07, 1.03, and 1.10. Use weights 1, 3, 1, 3 to give me a weighted mean of the relative price gap."},{"title":"Compare pool quote accuracy across trades","prompt":"I want to see how much our pool prices deviate from the reference on average — pool prices are 2.05, 2.18, 2.09 and reference prices are 2.0, 2.1, 2.0, all with equal weights of 1."},{"title":"Validate liquidity pool pricing before a swap","prompt":"Before I execute a swap, can you compute the weighted mean relative difference between these pool quotes — [0.995, 1.002, 0.998] — and my reference prices [1.0, 1.0, 1.0], with weights [2, 1, 2]?"}],"resultDescription":"Returns a single weighted mean value representing the average relative difference (as a fraction or ratio) between pool prices and reference prices across all supplied observations, weighted by the provided weights array. This is a deterministic calculation — not a live scan or trading recommendation.","failureModes":["Mismatched array lengths between rows and weights cause validation error","rows array with fewer than 2 items returns schema validation error","pool_price or reference_price of zero or negative causes exclusiveMinimum validation failure","weights containing negative values fail minimum constraint","More than 200 rows or weights exceed maxItems limit","Malformed JSON body returns HTTP 400 or payment gateway error","Payment not supplied or insufficient USDC causes x402 payment required response"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, weighted aggregate of relative price deviations across multiple token pool observations — especially when observations have different importance levels (expressed via weights). It is purpose-built for DeFi/token pool price gap analysis and avoids the need for custom aggregation logic. Prefer it over simple mean endpoints when recency or volume weighting matters across your observation set.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:52:22.546Z","isFirstParty":false,"canonicalSlug":"token-pool-quote-relative-difference-weighted-result-mean-d824f419"}