Compound Funding
workflow.run_compound_fundingProject capital growth from reinvesting perpetual futures funding income (compounding carry). Edge cases: initialCapital above zero; fundingRatePct in percent per interval (0.01 is 0.01%), either sign; intervalHours a whole number that divides 24 (1, 2, 3, 4, 6, 8, 12 or 24, default 8); durationDays above zero and at most 3650; reinvestPct 0 to 100 (default 100); a result too large to represent is an error. Assumes the rate stays constant. Not covered: a changing rate, fees, taxes, and the capital limits a venue may set. Use when user asks "how much will I make compounding 0.01% funding for 90 days?" or "what's my APY on this carry position?". Funding received is split by reinvestPct (the rest is withdrawn and still counts as earned); funding paid comes out of capital in full, and the capital never goes below 0. Returns: finalCapital, totalWithdrawn, endValue, totalEarned, totalEarnedPct, annualizedAPY, dailyEarnings, snapshots.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"initialCapital": "<initialCapital>",
"fundingRatePct": "<fundingRatePct>",
"durationDays": "<durationDays>"
},
"name": "workflow.run_compound_funding"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reinvestPct | No | Percentage of funding received that is reinvested each interval, 0-100 (the rest is withdrawn and counts as earned; funding paid always comes out of capital). 100 = full compounding. Default 100. | |
| durationDays | Yes | Number of days to project, up to 3650 | |
| intervalHours | No | Hours between funding payments, the period fundingRatePct covers, a whole number of hours that divides 24. Default 8; 1 on Hyperliquid, dYdX, Kraken and Backpack (per-hour rates); 4 or 2 on some symbols. | |
| fundingRatePct | Yes | Funding rate per interval in PERCENT: 0.01 means 0.01%, so a quoted 0.0125% is 0.0125, never 0.000125 | |
| initialCapital | Yes | Starting capital in USDT |