{"uid":"cap_YImXBtu3aAS25bvTqeDCk","slug":"delx-commerce-average-entry-price-calculator-b05a68df","name":"Delx Commerce — Average Entry Price Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/avg-entry?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"fills":{"type":"array","description":"Input field: fills."}}},"responseSchema":{"type":"json","example":{"fills":2,"schema":"delx/util-avg-entry/v1","avg_entry":11.5,"total_size":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_EEcvVTd4uI-XbWxNg-uYv","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 volume-weighted average entry price across a list of trade fills","exampleAgentPrompt":"Calculate my average entry price for a position where I have fills like [{price: 10, size: 2}, {price: 12, size: 1}, {price: 13, size: 1}].","exampleUseCases":[{"title":"Average cost basis for a crypto position","prompt":"I bought ETH in three separate fills — 1 ETH at $3000, 2 ETH at $3200, and 1 ETH at $3100. What's my average entry price for the whole position?"},{"title":"Reconciling algo trading fills","prompt":"My trading bot executed 5 partial fills on a single order. Can you compute the volume-weighted average entry price from this fills array: [{price:100, size:10},{price:101, size:5},{price:99, size:20},{price:102, size:3},{price:100.5, size:7}]?"},{"title":"Position sizing and cost review","prompt":"I want to know my blended entry cost for a stock position. I have two fills: one for 3 shares at $45 and another for 1 share at $50. What's my average entry?"}],"resultDescription":"Returns a JSON object containing the computed average entry price (avg_entry), total position size (total_size), number of fills processed (fills), and a schema identifier (schema: 'delx/util-avg-entry/v1').","failureModes":["Empty or missing fills array returns an error or undefined result","Non-numeric price or size values in fills cause computation failure","Malformed JSON body rejected with 400-level error","Payment failure via x402 protocol blocks request execution","Zero-size fills may cause division errors or be silently ignored"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-use computation of volume-weighted average entry price from a list of trade fills without setting up any account or subscription. It is ideal for agents operating in trading, DeFi, or portfolio management contexts that need cost-basis calculations on the fly, paid in USDC via the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:07.690Z","isFirstParty":false,"canonicalSlug":"delx-commerce-average-entry-price-calculator-b05a68df"}