{"uid":"cap_ebGeraBeARXAIwIcAJ_Z3","slug":"simple-vwap-calculator-688e69fe","name":"Simple VWAP Calculator","description":"Volume-weighted average price from price/size samples. Call when benchmarking execution against your own print tape. Returns vwap and total volume 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/vwap-simple","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"samples":{"type":"array","description":"Input field: samples."}}},"responseSchema":{"type":"json","example":{"n":2,"vwap":11,"schema":"delx/util-vwap-simple/v1","volume":4}},"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__gZluyGa12y1XIEhEnlZ2","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 volume-weighted average price (VWAP) and total volume from a list of price/size sample pairs using local deterministic math.","exampleAgentPrompt":"Calculate the VWAP for these trades: [{price: 42100.5, size: 0.3}, {price: 42250.0, size: 0.7}, {price: 42180.0, size: 1.0}] — I want to benchmark my execution against it.","exampleUseCases":[{"title":"Benchmark execution against own fills","prompt":"I just executed a series of BTC trades at different prices and sizes — can you compute the VWAP from these fills so I can see how my average execution compares? Fills are: [{price: 30100, size: 2.0}, {price: 30050, size: 1.5}, {price: 30200, size: 0.5}]."},{"title":"Evaluate slippage on equity order","prompt":"We split a large equity order into three child fills: 500 shares at $142.30, 300 shares at $142.75, and 200 shares at $143.10. What's the VWAP across those prints so I can measure slippage?"},{"title":"Summarize crypto arbitrage leg prices","prompt":"I ran an arb across three venues and got fills at different sizes and prices — [{price: 1825.40, size: 10}, {price: 1826.00, size: 5}, {price: 1824.90, size: 15}]. Give me the volume-weighted average price so I know my blended entry."}],"resultDescription":"Returns a deterministic JSON object containing the computed VWAP (volume-weighted average price) across all input samples and the total volume summed from all size fields. No external data sources are consulted — the result is purely a function of the submitted samples.","failureModes":["Empty or missing samples array returns an error or undefined VWAP","Samples with zero or negative sizes may produce division-by-zero or incorrect results","Malformed sample objects missing price or size fields cause validation errors","Payment failure via x402 returns 402 Payment Required before computation","All samples with size zero results in undefined VWAP due to zero total volume"],"whenToPreferThis":"Choose this endpoint when you have your own trade print tape or fill data and need a fast, deterministic VWAP computation without any external market data dependency. Ideal for post-trade benchmarking, execution quality analysis, or summarizing multi-leg fills into a single blended price. Prefer this over live-market VWAP feeds when you control the input data and want a pure math result with no API keys, RPC calls, or external latency.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:07:04.114Z","isFirstParty":false}