Skip to content

Funding Arbitrage Bot

Automated funding rate harvester that captures extreme funding payments delta-neutral. Framework: Python + ccxt.

Live Output Preview

If you ran this bot right now, the API would return:

# Live API output — June 17, 2026
Market Regime: Trending
Safety Score: 96.5 (HIGH)

Composite Signals:
  BTC: buy (score: 0.272)\n  ETH: neutral (score: 0.053)\n  SOL: buy (score: 0.224)\n  HYPE: buy (score: 0.200)\n
# The bot would use this data to make trading decisions

Complete Source Code

Copy this code and run — no API key required:

import requests, time

BASE = "https://algotick.dev"

def scan_funding_opportunities():
    """Find extreme funding rates and execute delta-neutral carry trades."""
    for coin in ["BTC", "ETH", "SOL", "HYPE"]:
        resp = requests.get(f"{{BASE}}/v1/signals/spreads",
                           params={{"coin": coin}})
        spreads = resp.json().get("spreads", [])

        for s in spreads:
            funding = s.get("funding_rate", 0)
            zscore = s.get("funding_zscore", 0)

            if abs(zscore) > 2.0:  # Extreme funding
                apy = abs(funding * 3 * 365 * 100)
                direction = "SHORT perp + LONG spot" if funding > 0 else "LONG perp + SHORT spot"

                # Check squeeze risk before entering
                sq = requests.get(f"{{BASE}}/v3/signals/squeeze",
                                 params={{}}).json()
                squeezes = sq.get("squeezes", [])
                coin_sq = next((x for x in squeezes if x.get("coin") == coin), {{}})
                squeeze_risk = coin_sq.get("squeeze_probability_pct", 0)

                if squeeze_risk < 30:  # Safe to enter
                    print(f"[TRADE] {{coin}}: {{direction}}")
                    print(f"  APY: {{apy:.1f}}% | Z-score: {{zscore:.2f}} | Squeeze: {{squeeze_risk:.0f}}%")
                else:
                    print(f"[SKIP] {{coin}}: Squeeze risk too high ({{squeeze_risk:.0f}}%)")

while True:
    scan_funding_opportunities()
    time.sleep(60)

Setup Instructions

  1. Install dependencies: pip install requests (Python) or npm install node-fetch (TypeScript)
  2. Run the script and monitor the output
  3. Connect your exchange API for live trading

API Endpoints Used

Framework
Python + ccxt
Data Source
Algo Tick API
# No API key required. All endpoints used by this template:
curl https://algotick.dev/v3/signals/regime
curl https://algotick.dev/v1/signals/composite
curl https://algotick.dev/v3/signals/safety
curl https://algotick.dev/v1/signals/volatility?coin=BTC

Don't just stare at the dashboard. Automate it.

Every metric on this page is available via our sub-millisecond API.
Build trading bots, backtest strategies, and power AI agents with institutional-grade data.

Explore API →

More Python Templates

Other Frameworks

Continue the Research

⚡ API Docs📁 Data Library📖 Playbooks🎯 Alpha Strategies