{"uid":"cap_npA2dyjTZF1ZGmw_sorx5","slug":"trade-balance-weighted-result-mean-calculator-2cb7c1f6","name":"Trade Balance Weighted Result Mean Calculator","description":"Trade balance - Weighted result mean: Calculate a mean of up to 200 results using supplied nonnegative weights; not a pooled accounting ratio. Metric: Trade balance. Supplied figures only; returns JSON with formula, units and limitations. One of 50 calculators with 20 analysis modes. No live feed, financial advice or trade execution. 0.01 USDC includes one bounded weighted result mean report.","url":"https://market.datapackvibe.com/x402/assistant-finance-trade-balance-weighted-mean?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","required":["exports","imports"],"properties":{"exports":{"type":"number","default":250,"maximum":1000000000000,"minimum":0,"description":"Amount in a consistent supplied currency and reporting period"},"imports":{"type":"number","default":200,"maximum":1000000000000,"minimum":0,"description":"Amount in a consistent supplied currency and reporting period"}},"additionalProperties":false},"default":[{"exports":250,"imports":200},{"exports":275,"imports":220.00000000000003},{"exports":250,"imports":200},{"exports":275,"imports":220.00000000000003}],"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_KiGnaVrw_BrIgt6uRa1Dm","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":"Calculates a weighted mean of trade balance figures (exports minus imports) across up to 200 data rows using user-supplied nonnegative weights.","exampleAgentPrompt":"Calculate the weighted mean trade balance for these four periods: exports of 250, 275, 250, 275 and imports of 200, 220, 200, 220 — use weights of 1, 2, 1, 2 to emphasize the more recent quarters.","exampleUseCases":[{"title":"Quarterly trade balance weighted summary","prompt":"I have four quarters of trade data — exports were 300, 320, 310, 340 billion and imports were 280, 300, 295, 315 billion. Weight Q3 and Q4 twice as heavily as Q1 and Q2. What's the weighted mean trade balance?"},{"title":"Cross-country weighted trade balance comparison","prompt":"I have trade figures for five countries with different economic sizes — exports are 500, 1200, 800, 600, 950 and imports are 450, 1100, 820, 580, 900. Use GDP weights of 3, 10, 6, 4, 7 to get a weighted mean trade balance across all of them."},{"title":"Annual deficit trend weighted by trade volume","prompt":"For the last six years our exports were 180, 195, 210, 205, 220, 235 and imports were 200, 210, 215, 225, 230, 240. Weight each year by total trade volume — 380, 405, 425, 430, 450, 475 — and give me the weighted mean trade balance."}],"resultDescription":"A JSON object containing the weighted mean trade balance value computed from the supplied exports and imports rows, along with the formula used, units, and stated limitations of the calculation. No live data, financial advice, or trade execution is included.","failureModes":["Fewer than 2 rows provided — minimum is 2 data points","More than 200 rows submitted — exceeds maximum","Negative exports or imports values supplied — must be nonnegative","Weights array length does not match rows array length","All weights are zero — division by zero in weighted mean","Exports or imports values exceed 1,000,000,000,000 maximum","Payment of 0.01 USDC not completed — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need a statistically weighted mean of trade balance figures (exports minus imports) across multiple periods, regions, or entities, especially when different observations carry different importance. It is appropriate when you have your own data and need a formula-backed weighted average with documented limitations — not when you need live trade data feeds, pooled accounting ratios, or trade execution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T13:07:08.594Z","isFirstParty":false,"canonicalSlug":"trade-balance-weighted-result-mean-calculator-2cb7c1f6"}