Portfolio rebalancing calculator
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.
10000 (raw units)
price
3
calls / 30d
1
unique payers
2026-08-30
updated
Provider
x402.outpimp.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x548eFd4f4d4A5C3669dbb4CBB2B1A637FeeEc5F6",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000",
"maxTimeoutSeconds": 300
},
{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"payTo": "APer2AbhckyMWyJanW2MZ2eRLcpL9Lmhks8rkmXfqjRG",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "10000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"holdings": [
{
"currentAmount": 60000,
"name": "stocks",
"targetPercent": 0.7
},
{
"currentAmount": 40000,
"name": "bonds",
"targetPercent": 0.3
}
],
"rebalancingPeriodMonths": 1
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"data": {
"holdings": [
{
"currentAmount": 60000,
"gap": 10000,
"monthlyInflow": 10000,
"name": "stocks",
"targetAmount": 70000
},
{
"currentAmount": 40000,
"gap": -10000,
"monthlyInflow": -10000,
"name": "bonds",
"targetAmount": 30000
}
],
"params": {
"holdings": [
{
"currentAmount": 60000,
"name": "stocks",
"targetPercent": 0.7
},
{
"currentAmount": 40000,
"name": "bonds",
"targetPercent": 0.3
}
],
"rebalancingPeriodMonths": 1
},
"totalValue": 100000
},
"ok": true
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"holdings": {
"description": "Array of holdings, each with name, currentAmount, and targetPercent (must sum to 1 across all holdings). Max 50 entries.",
"items": {
"properties": {
"currentAmount": {
"type": "number"
},
"name": {
"type": "string"
},
"targetPercent": {
"type": "number"
}
},
"type": "object"
},
"type": "array"
},
"rebalancingPeriodMonths": {
"default": 1,
"description": "Number of months to spread the rebalancing over. Default 1 (immediate lump-sum rebalance).",
"type": "number"
}
},
"required": [
"holdings"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"a": "x402_api_vendor",
"s": [
"cdp_sdk_server"
]
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"maxItems": 11,
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
},
"eip2612GasSponsoring": {},
"erc20ApprovalGasSponsoring": {}
}Use it
curl
curl "https://x402.outpimp.com/portfolioRebalancingCalculator" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://x402.outpimp.com/portfolioRebalancingCalculator");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://x402.outpimp.com/portfolioRebalancingCalculator")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/8398.json, and this resource appears in /discovery/resources and /discovery/search.