derivatives.funding_apr_matrix
Turn a perpetual funding rate into APR and breakeven days for a spot-plus-perp carry trade, revealing which side collects funding and how many days recoup round-trip costs.
Instructions
Annualize a perpetual funding rate into APR + carry-trade breakeven days:
evaluates a spot+perpetual cash-and-carry trade, tells you which side
collects funding, and how many days of income recoups round-trip costs.
Pure calculation layer on top of get_funding_rate - no extra upstream call,
so prefer this over get_funding_rate whenever you need the APR/breakeven
view rather than the raw rate.
Use this to evaluate a spot+perpetual carry trade. Does NOT account for
margin borrow cost, spot-perp basis risk, or perp liquidation risk - treat
breakeven_days as a rough estimate, not a guaranteed profit timeline.
Args:
symbol: e.g. "BTC", "ETH", or "BTCUSDT".
assumed_round_trip_cost_pct: Combined entry+exit trading fee % across
both legs (default 0.2). Pass your own fee tier for accuracy.
Returns:
On success: {"success": true, "apr_pct", "collects_funding_side",
"breakeven_days", ...}
On failure: {"success": false, "error": {"type", "message"}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| assumed_round_trip_cost_pct | No |