一键导入
funding-rate-analysis
Analyze perpetual futures funding rate history to identify arbitrage opportunities, sentiment trends, and carry trade setups.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze perpetual futures funding rate history to identify arbitrage opportunities, sentiment trends, and carry trade setups.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Set up, manage, and automate Dollar Cost Averaging (DCA) plans. Supports buy (DCA-in) and sell (DCA-out) on any exchange, with optional indicator-gated triggers, per-plan lookback, and Settrade stock share ordering.
Fetch real-time and historical market data from configured exchanges — tickers, OHLCV candles, order books, and market catalogues.
Compute cost basis and profit/loss across exchange accounts — both unrealized (currently held) and realized (from closed trades). Use when the user asks about profit, loss, cost basis, ต้นทุน, กำไร/ขาดทุน, or returns on holdings across one or multiple portfolios.
Query exchange balances and portfolio values across configured exchange accounts — including crypto (Binance, Bitkub, OKX), Thai equities (Settrade/SET), and US equities (Webull).
Compute and interpret technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands, ATR, Stochastic, VWAP) from live OHLCV data.
Place, monitor, and cancel orders on configured exchanges. Includes safety-first order lifecycle, paper trading simulation, and emergency stop.
基于 SOC 职业分类
| name | funding-rate-analysis |
| description | Analyze perpetual futures funding rate history to identify arbitrage opportunities, sentiment trends, and carry trade setups. |
Use the funding_rate_history tool to fetch public funding rate records and computed statistics.
funding_rate_history with provider, symbol, and an appropriate limit (e.g. 200 for ~14d of 8h intervals).funding_rate_history — fetch history + statistics (public, no credentials needed)futures_get_funding — current funding rate + next expected rate (also public)get_ohlcv — price history to correlate funding rate spikes with price movesThe positive-funding ratio is the fraction of periods in the observed window where funding rate was positive. For example, if 92 out of 100 periods had positive funding, the ratio is 92%.
When you fetch funding_rate_history, the output includes the raw funding rate series. Count the number of periods with funding_rate > 0, then divide by the total number of periods:
positive_ratio = (count of periods with funding > 0) / (total periods) × 100
The funding_rate_history tool may include this pre-computed; if not, calculate it manually.
Use positive-funding ratio as a stability signal:
A funding reversal occurs when funding shifts from positive (longs paying shorts) to negative (shorts paying longs), or when the current rate is significantly below recent averages. This is a critical risk signal for any carry or delta-neutral position.
Method 1: Consecutive Cycles Negative
Monitor recent funding ticks. If the current and previous N cycles (typically N=2) are negative, a reversal is underway:
if (current_funding < 0) and (previous_funding < 0) and (N_cycles_ago_funding < 0):
trigger_reversal_alert()
Configure N in your delta-neutral plan's risk policy (default: 2 consecutive negative periods).
Method 2: Current Rate Well Below Recent Average
Compare the current funding rate to the recent moving average:
current_funding = latest_rate
avg_7d = mean of last 7 days of rates
threshold = avg_7d × 0.5 (or your configured threshold)
if (current_funding < threshold):
trigger_reversal_warning()
This catches cases where funding has not yet turned fully negative but is clearly trending downward.
Method 3: Volatility Spike + Negative Trend
If volatility (standard deviation) is suddenly high AND the last few rates are below the mean, a reversal or squeeze may be starting:
if (recent_volatility > threshold) and (mean_last_3_periods < 0):
mark_as_unstable()
For any open delta-neutral or carry position:
Both Binance and OKX offer perpetual funding, but they operate independently with different liquidity pools and market dynamics. Comparing funding across exchanges helps you spot divergence and choose the best venue.
Funding Interval
Both use the same interval, making direct comparison straightforward.
Liquidity and Market Size
Settlement and Fee Structure
Step 1: Fetch Both Sides
Call funding_rate_history for the same symbol on both exchanges with the same limit (e.g., 200 for ~14 days):
{
"provider": "binance",
"symbol": "BTC/USDT",
"limit": 200
}
{
"provider": "okx",
"symbol": "BTC/USDT",
"limit": 200
}
Step 2: Compare Statistics
Look at the 7D and 14D averages, current rate, and volatility:
Asset: BTC/USDT
———————————————
Binance 7D avg: 0.0082%, volatility: ±0.0015%, positive ratio: 92%
OKX 7D avg: 0.0079%, volatility: ±0.0018%, positive ratio: 88%
Divergence: Binance ~3 bps higher, OKX slightly more volatile. Both attractive.
Step 3: Spot Cross-Exchange Divergence
If one exchange has significantly higher funding (e.g., 0.02% vs 0.01%), it may indicate:
Step 4: Pick the Best Venue
Rank same-exchange pairs by:
Example:
Scenario A: Binance spot + Binance futures
Funding: 0.0082%/8h → ~2.44 USDT/day on 10k USDT
Spread (spot): 0.01%, Spread (perp): 0.015%
Entry + exit slippage: ~60 USDT
Net daily carry: ~2.04 USDT → BEST
Scenario B: OKX spot + OKX futures
Funding: 0.0079%/8h → ~2.37 USDT/day on 10k USDT
Spread (spot): 0.012%, Spread (perp): 0.02%
Entry + exit slippage: ~65 USDT
Net daily carry: ~1.99 USDT
Scenario C: Binance spot + OKX futures
Binance spot spread: 0.01%, OKX futures spread: 0.02%
Mixed slippage, cross-exchange latency risk
Effective carry: ~1.95 USDT (after cross-exchange friction)
Status: WATCH (higher execution risk, marginally worse carry)
If one exchange's funding is 0.005% or more higher than the other, and both are positive:
The annualized funding rate in the funding_rate_history output is computed by assuming a fixed number of funding periods per day (typically 3 for 8h venues). This is useful for rough comparison, but must be understood correctly and adjusted for different funding intervals.
annualized = current_funding_rate × periods_per_day × 365 × 100
Example (8h venue, 3 periods/day):
current_funding = 0.01% per 8h
annualized = 0.01% × 3 × 365 = 10.95%
If an exchange uses a different funding interval, adjust periods per day:
rate × 6 × 365rate × 24 × 365rate × 1 × 365Example: If an exchange has 1h funding and shows 0.001% per period:
annualized = 0.001% × 24 × 365 = 87.6% ← very high, but unusual
The annualized figure assumes:
daily_carry = capital × current_funding_rate × periods_per_day and compare to round-trip costs.If you are comparing two assets with different data windows or intervals:
The annualized rates may be misleading if the windows do not overlap in time. Always fetch consistent windows (ideally 14 days for both) before comparing annualized rates across assets.