{"uid":"cap_zJAjwbaSPWcFP_BPU7mAx","slug":"sindri-portfolio-rebalancing-calculator-9f92bf2e","name":"Sindri Portfolio Rebalancing Calculator","description":"Portfolio rebalancing calculator. Given current holdings and target allocation percentages, computes the dollar gap per asset and the monthly buy/sell inflow needed to reach the target allocation over a chosen rebalancing period.","url":"https://x402.outpimp.com/portfolioRebalancingCalculator","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"holdings":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"currentAmount":{"type":"number"},"targetPercent":{"type":"number"}}},"description":"Array of holdings, each with name, currentAmount, and targetPercent (must sum to 1 across all holdings). Max 50 entries."},"rebalancingPeriodMonths":{"type":"number","default":1,"description":"Number of months to spread the rebalancing over. Default 1 (immediate lump-sum rebalance)."}}},"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_LrXVRZF304wERGiAI76XF","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 dollar gap per asset and monthly buy/sell amounts needed to reach a target allocation over a chosen rebalancing period.","exampleAgentPrompt":"I have $30,000 in stocks (target 60%), $8,000 in bonds (target 30%), and $2,000 in cash (target 10%) — can you calculate how much I need to buy or sell of each to hit my target allocation, spread over 3 months?","exampleUseCases":[{"title":"Immediate lump-sum portfolio rebalance","prompt":"My portfolio is out of whack: I have $50,000 in US equities (target 50%), $20,000 in international equities (target 25%), $5,000 in bonds (target 20%), and $1,000 in REITs (target 5%). What do I need to buy or sell right now to get back to my target allocation?"},{"title":"Gradual rebalancing over 12 months","prompt":"I want to rebalance my portfolio gradually over 12 months. I currently hold $80,000 in tech stocks (target 40%), $10,000 in index funds (target 40%), and $5,000 in gold (target 20%). Can you calculate my monthly buy and sell amounts to reach those targets?"},{"title":"New investor reaching target weights","prompt":"I'm starting to invest and want to allocate $5,000 across assets: I have $3,500 in ETFs (target 70%), $500 in bonds (target 20%), and $0 in commodities (target 10%). Can you show me the gap between where I am now and my targets, and how much to add each month over 6 months?"}],"resultDescription":"Returns the dollar gap (surplus or deficit) for each asset relative to the target allocation, along with the monthly buy/sell amount per asset needed to close the gap over the specified rebalancing period. Enables the user to see exactly which assets are overweight or underweight and by how much.","failureModes":["Target percentages do not sum to 1 across all holdings — returns validation error","More than 50 holdings submitted — returns limit exceeded error","Negative currentAmount values — returns invalid input error","rebalancingPeriodMonths set to zero or a negative number — returns invalid period error","Missing required holdings array — returns schema validation error"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic calculation of portfolio rebalancing trades — specifically the dollar gaps and monthly installment amounts per asset. Ideal for personal finance agents, robo-advisor workflows, or investment planning tools where the user knows their current holdings and target allocation percentages. Prefer this over general-purpose financial APIs when you need a structured per-asset breakdown with optional multi-month spreading.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:47:03.751Z","isFirstParty":false}