Skip to content

funding#

Funding-rate history, cross-asset snapshot, perp-vs-perp basis, and naive prediction. Reads from the local cache; never calls HL live.

Subcommands#

Command What it does
history <asset> Time-series summary plus ASCII sparkline.
heatmap Cross-asset funding bars sorted by absolute rate.
arb <asset> Perp-vs-perp basis leaderboard against every other cached asset.
predict <asset> Naive EWMA next-period baseline.

hlr funding history <asset>#

hlr data pull-funding BTC --since 2024-01-01
hlr funding history BTC

Output is a panel with observation count, range, latest rate, mean rate, and a unicode sparkline of the full series.

hlr funding heatmap#

hlr funding heatmap --top 20

Iterates every cached asset's most recent funding rate. Each row is the asset, latest rate, and a signed horizontal bar centered on zero. Annotated with annualized APR (latest × 3 × 365).

hlr funding arb <asset>#

hlr funding arb BTC --top 10

Computes funding-rate basis between <asset> and every other cached asset. Output columns:

  • Pair (BTC / ETH)
  • Latest basis (current funding-rate difference)
  • Annualized basis (latest × periods per year)
  • Mean basis over the cached history
  • Observation count

Useful for spotting persistent funding divergences between correlated assets. The v0 method compares two perp funding-rate streams; spot data integration is reserved for a future release.

hlr funding predict <asset>#

hlr funding predict BTC --span 8

Naive EWMA baseline:

  • predicted_rate — EWMA forecast for the next period
  • lower_bound / upper_bound — 95% band from residual standard deviation
  • confidence_band — half-width of the band
  • methodnaive_ewma_baseline

Labeled explicitly as "do not trade on this without a real model." Useful as a benchmark.

JSON mode#

All four commands honor --json and emit structured output suitable for piping into other tools.