# Perpetual Funding Rate & Spot-Perp Basis AI Agent (MCP Script)

> Query `eterna.getTickers()` across linear perpetuals and matching spot markets in a single `execute_code` call to rank pairs by annualized funding rate and spot-perp basis spread. Use extreme positive funding to spot overcrowded longs or hedge spot inventory with short perpetuals.

- Canonical URL: https://ai.eterna.exchange/strategies/funding-rate-and-basis-monitor
- Last updated: November 23, 2026
- Author: Eterna Quant & AI Team (Systematic Execution & MCP Playbooks)
- MCP endpoint: https://mcp.eterna.exchange/mcp

Funding rates reveal real positioning pressure faster than social media sentiment. Because Eterna lists both 800+ USDT perps and 380+ USDT spot pairs under one roof, an AI agent can measure live basis and funding carry in milliseconds.

## Key Facts

| Metric | Value | Notes |
|--------|-------|-------|
| Unified Venues | Perp + Spot in 1 SDK | Compare linear vs spot tickers directly |
| Funding Math | rate * 3 * 365 | Standard 8-hour funding annualization |
| Maker Fee | 0.014% | Low round-trip cost for carry entry |
| Use Cases | Carry + Contrarian | Spot crowded longs/shorts early |

## 1. Runnable Funding Rate & Basis Leaderboard

### funding-basis-scanner.ts

```typescript
const symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "XRPUSDT", "DOGEUSDT", "SUIUSDT", "1000PEPEUSDT"];
const rows = [];

for (const symbol of symbols) {
  const perp = (await eterna.getTickers({ symbol, market: "linear" }))[0];
  const fundingRate = Number(perp.fundingRate ?? 0);
  const aprPct = fundingRate * 3 * 365 * 100;

  rows.push({
    symbol,
    markPrice: Number(perp.markPrice ?? perp.lastPrice),
    fundingRate8hPct: Number((fundingRate * 100).toFixed(4)),
    annualizedAprPct: Number(aprPct.toFixed(1)),
  });
}

return rows.sort((a, b) => Math.abs(b.annualizedAprPct) - Math.abs(a.annualizedAprPct));
```

**Returns:** Perpetuals ranked by absolute annualized funding rate.

## Frequently Asked Questions

### Can an AI agent hedge my spot holdings with a short perpetual on Eterna?

Yes. Because Eterna supports both spot and USDT perpetuals in the same SDK, an agent can read your spot balance (`getAllCoinsBalance`) and open a matching short linear perpetual (`placeOrder`) to neutralize directional beta.

## References & Primary Sources

- [Eterna Pricing & Fee Schedule](https://ai.eterna.exchange/pricing): Calculate carry breakeven days using 0.014% maker / 0.035% taker fees.

## Related Guides

- [Automated Crypto Spot DCA & Portfolio Rebalance Agent (MCP Script)](https://ai.eterna.exchange/strategies/spot-dca-and-rebalance-agent)
- [Trading 800+ USDT Perpetuals & 380+ Spot Pairs from One MCP Server](https://ai.eterna.exchange/guides/spot-and-perpetual-futures-mcp)
- [Eterna AI Pricing & Trading Fees for AI Agents](https://ai.eterna.exchange/pricing)
- [Eterna MCP SDK Reference: All 30+ eterna.* Methods](https://ai.eterna.exchange/sdk)
