{"uid":"cap_I-pCLxdknfqTRqXSpvCVm","slug":"api-usage-trailing-mean-series-5cb253b2","name":"API Usage Trailing Mean Series","description":"API usage - Trailing mean series: Trailing mean series for API usage. Up to 200 supplied typed records. Local numeric and data-quality processing; no external enrichment or forecasting. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded trailing mean series deliverable.","url":"https://market.datapackvibe.com/x402/assistant-sector-analytics-api-usage-rolling?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["row_id","endpoint","date","requests","latency_ms"],"properties":{"date":{"type":"string","default":"","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10},"row_id":{"type":"string","default":"","maxLength":80,"minLength":1},"endpoint":{"type":"string","default":"","maxLength":80},"requests":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000},"latency_ms":{"type":["number","null"],"maximum":1000000000000,"minimum":-1000000000000}},"additionalProperties":false},"default":[{"date":"2026-10-01","row_id":"row-1","endpoint":"group-a","requests":10,"latency_ms":1},{"date":"2026-10-02","row_id":"row-2","endpoint":"group-b","requests":20,"latency_ms":2},{"date":"2026-10-03","row_id":"row-3","endpoint":"group-a","requests":15,"latency_ms":3},{"date":"2026-10-04","row_id":"row-4","endpoint":"group-b","requests":30,"latency_ms":4}],"maxItems":200,"minItems":1},"field":{"enum":["requests","latency_ms"],"type":"string","default":"requests"},"window":{"type":"integer","default":2,"maximum":200,"minimum":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_CucauvArbiixIpTJv7ILQ","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 trailing (rolling) mean series over API usage metrics (requests or latency) for up to 200 time-series records, grouped by endpoint.","exampleAgentPrompt":"Compute a trailing mean series for my API usage data — I have 4 rows of daily request counts for two endpoints (group-a and group-b), and I want the smoothed 'requests' field using a window of 2.","exampleUseCases":[{"title":"Smoothing noisy API request volume","prompt":"I have daily request counts for three of my API endpoints over the past 30 days and the numbers are really spiky — can you compute a rolling average with a window of 7 days on the 'requests' field so I can see the underlying trend?"},{"title":"Latency trend analysis across endpoints","prompt":"Run a trailing mean series on my API latency data with a window size of 5 — I've got about 60 rows covering two endpoints over the last two months, and I want to smooth out the 'latency_ms' values to spot any gradual degradation."},{"title":"Comparing smoothed usage across endpoint groups","prompt":"I want to compare smoothed request volume between my 'auth' and 'search' API endpoints — can you apply a trailing mean with window 3 to my 100 rows of daily usage records on the 'requests' field?"}],"resultDescription":"Returns a rolling/trailing mean series derived from the supplied typed records (up to 200), computing the windowed average of the selected numeric field (requests or latency_ms) over the specified window size, with local numeric and data-quality processing applied — no external enrichment or forecasting.","failureModes":["Fewer than 1 row submitted — violates minItems:1 constraint","Window size exceeds number of rows — trailing mean may be undefined for early records","Invalid date format (not YYYY-MM-DD pattern) — schema validation failure","Numeric values outside allowed range (±1,000,000,000,000) — rejected","More than 200 rows submitted — violates maxItems:200 constraint","Field value not 'requests' or 'latency_ms' — enum validation error","Payment failure — 402 response if USDC payment not included"],"whenToPreferThis":"Choose this endpoint when you need a fast, low-cost ($0.01) locally-computed rolling/trailing mean over API usage time-series data (requests or latency) with up to 200 records. Ideal for smoothing noisy API metrics without external dependencies. Prefer alternatives if you need forecasting, anomaly detection, or more than 200 records.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T19:11:57.877Z","isFirstParty":false,"canonicalSlug":"api-usage-trailing-mean-series-5cb253b2"}