Genesis Arbitrage

Genesis Arbitrage · · 11 min read

Genesis API funding endpoints: rates, spread and funding history analytics

In short

  • /funding/rates and /funding/spread are on every API plan: each exchange's rate per interval and per 8 hours, the next payout time and the best exchange pair by spread.
  • Settled funding analytics is four /funding/analytics/… endpoints across 13 exchanges with up to a year of history, on the Pro and Max plans.
  • Full summary, recent and daily downloads weigh up to ~12 MB gzip and are allowed once every 60–300 seconds: take a coin slice or repeat the request with If-None-Match.

The funding rate API in Genesis API is a set of endpoints with perpetual futures funding rates across exchanges, the best exchange pair by funding spread and the history of settled funding. Current rates and the spread are on every API plan; historical analytics across 13 exchanges is on Pro and Max. The site shows the same data in Funding Arbitrage, see the guide.

Funding endpoints and plans

EndpointReturnsAPI plans
/funding/ratesRates of every exchange for each coinTrial, Start, Pro, Max
/funding/spreadThe best exchange pair by spread and the other exchangesTrial, Start, Pro, Max
/funding/analytics/summarySummary for periods from 1 day to a yearPro, Max
/funding/analytics/recentEvery payout over 7 daysPro, Max
/funding/analytics/dailyDaily sums over 365 daysPro, Max
/funding/analytics/topScreener of pairs and exchange bundlesPro, Max

Parameters and fields are in the documentation sections Funding rates, Funding spread and Funding analytics. On Trial and Start the analytics endpoints return 403 plan_restricted. For an overview of funding data APIs, see the article on the funding rate API. The response examples below show the data field, shortened.

Rates and normalization to 8 hours

/funding/rates returns, for each coin, a list of exchanges with the current rate. The coin and exchange filters (comma-separated for several exchanges) are optional.

curl "https://api.genesisarbitrage.com/v1/funding/rates?coin=TON" \
  -H "X-API-Key: gns_live_XXXXXXXXXXXXXXXX"
{
  "coin": "TON",
  "exchanges": [
    {
      "exchange": "MEXC",
      "funding_pct": 0.02,
      "funding_8h_pct": 0.04,
      "next_payout": "00:00",
      "interval": "4h",
      "price": 2.184,
      "trade_url": "https://futures.mexc.com/exchange/TON_USDT"
    }
  ]
}
FieldMeaning
funding_pctRate per settlement interval, %
funding_8h_pctRate normalized to 8 hours, %
intervalSettlement interval, e.g. 8h; null — no data
next_payoutNext payout time, HH:MM UTC; null — no data
price, trade_urlPrice and a link to the exchange trading terminal

A hypothetical example: an hourly rate of 0.005% is 0.005 × 8 / 1 = 0.04% per 8 hours, the same as MEXC, except that it pays eight times and can change by the next hour.

Annualized without compounding, the 8-hour rate × 3 × 365 gives APR. A hypothetical example: 0.01% every 8 hours gives 0.01 × 3 × 365 = 10.95% a year, as long as the rate holds. What the rate says about the market is covered in Funding rate as a market indicator.

Funding spread: the best exchange pair

/funding/spread returns, for each coin, the best exchange pair by funding spread (best) and the other exchanges (others). Filters: coin and min_spread, the minimum spread in %.

{
  "coin": "BTC",
  "spread_pct": 0.01,
  "best": {
    "exchange_1": "Hyper",
    "exchange_2": "CoinEx",
    "funding_1_pct": 0.0,
    "funding_2_pct": 0.0,
    "next_payout_1": null,
    "next_payout_2": "08:00",
    "interval_1": "1h",
    "interval_2": "8h",
    "trade_url_1": "https://app.hyperliquid.xyz/trade/BTC",
    "trade_url_2": "https://www.coinex.com/futures/BTC-usdt"
  },
  "others": [ … ]
}

spread_pct is the best pair's spread, %. funding_1_pct and funding_2_pct are rates per their own interval (interval_1, interval_2): to compare them by hand, normalize both to 8 hours. The short goes where the rate is higher, the long where it is lower. Hyperliquid appears as Hyper in responses.

The Python script prints the ten coins with the highest spread_pct (from 0.05%) and the pair's settlement intervals. On 429 and 503 it waits Retry-After seconds; in a loop, repeat the request no more often than once per meta.freshness_sec.

import os
import time
import requests

URL = "https://api.genesisarbitrage.com/v1/funding/spread"
HEADERS = {"X-API-Key": os.environ["GENESIS_API_KEY"]}

for _ in range(3):
    r = requests.get(URL, headers=HEADERS,
                     params={"min_spread": 0.05}, timeout=15)
    if r.status_code not in (429, 503):
        break
    # rate limit or data being rebuilt: wait and retry
    time.sleep(int(r.headers.get("Retry-After", "5")))
r.raise_for_status()

rows = sorted(r.json()["data"], key=lambda x: x["spread_pct"],
              reverse=True)
for row in rows[:10]:
    b = row["best"]
    print(f'{row["coin"]:<10} {row["spread_pct"]:>8.4f}%  '
          f'{b["exchange_1"]} {b["interval_1"]} / '
          f'{b["exchange_2"]} {b["interval_2"]}')

Settled funding analytics

Four /funding/analytics/… endpoints return the history of settled funding across 13 exchanges — the same data as the Analytics tab in Funding Arbitrage. Rates are percent per settlement period, timestamps are epoch seconds UTC.

EndpointContentsFull sectionWithout coin, at most
/funding/analytics/summarySums, average rates, APR and coverage for 7 periods~600 KB gziponce per 60 s
/funding/analytics/recentEvery payout over 7 days~1 MB gziponce per 60 s
/funding/analytics/dailyDaily sums over 365 daysup to ~12 MB gziponce per 300 s
/funding/analytics/topTop-50 pairs and top-50 bundles per period—no limit

A full download before the window ends gets 429 with Retry-After. ETag and compression rules are covered in the response format and errors guide.

curl --compressed -i \
  "https://api.genesisarbitrage.com/v1/funding/analytics/summary" \
  -H "X-API-Key: gns_live_XXXXXXXXXXXXXXXX" \
  -H "If-None-Match: <ETag from the previous response>"

--compressed asks for a compressed response and decompresses it, and -i prints the headers, ETag among them. Send the first request without If-None-Match.

The summary and the m array

Every coin×exchange pair in the summary has m: the key is a period (1d, 3d, 7d, 30d, 90d, 180d, 365d), the value is 14 numbers in metric_order. A period is absent from m when there is no data for it at all.

{
  "metric_order": ["sum", "avg8h", "apr", "n", "pos", "neg", "zero",
                   "min", "max", "cov", "med8h", "pos_streak",
                   "neg_streak", "flips"],
  "coins": {
    "BTC": {
      "canon": "BTC",
      "mult": 1,
      "exchanges": {
        "Binance": {
          "interval_h": 8.0,
          "data_since": 1568102400,
          "last8h": 0.004123,
          "m": {
            "7d": [0.12802, 0.006298, 6.896, 21, 21, 0, 0,
                   0.000125, 0.01, 1.0, 0.00588, 7, 0, 0]
          }
        }
      }
    }
  }
}
MetricIndexMeaning
sum0Accumulated over the period, %
avg8h1Average rate in 8-hour terms, %
apr2Annualized, %
n3Number of settlements
pos, neg, zero4–6Positive, negative and zero settlements
min, max7–8Smallest and largest settlement, %
cov9Period coverage from 0 to 1
med8h10Median in 8-hour terms, %
pos_streak, neg_streak11–12Days in a row positive and negative
flips13Sign changes

Indices 10–13 are null for the 1d and 3d periods. With cov < 0.9 the data covers only part of the period, so flag such values. In the example, BTC on Binance over 7 days: 21 settlements, all positive, cov 1.0, and apr equals avg8h × 3 × 365: 0.006298 × 1095 ≈ 6.896.

If avg8h is well above med8h, a spike has inflated the average: the median, pos_streak and flips show stability better. The pair's other fields:

Payouts over 7 days and daily sums

In /funding/analytics/recent each exchange has an s string of the form ts:rate;ts:rate;… in ascending time order and an interval i in hours. In /funding/analytics/daily the string day_ts:sum:pos:neg;… holds the UTC midnight, the day's sum and the counts of positive and negative settlements.

def parse_recent(s):
    # "ts:rate;ts:rate;…" → [(ts, rate), …]
    return [(int(t), float(v)) for t, v in
            (p.split(":") for p in s.split(";") if p)]


def parse_daily(s):
    # "day_ts:sum:pos:neg;…" → [(day, sum, positive, negative), …]
    out = []
    for p in filter(None, s.split(";")):
        d, total, pos, neg = p.split(":")
        out.append((int(d), float(total), int(pos), int(neg)))
    return out

Bundle screener

/funding/analytics/top is a ready-made screener with no parameters: for each period, the top 50 coin×exchange pairs by accumulated funding and the top 50 short/long bundles. Bundle legs are always on different exchanges with coverage of at least 0.9, and rows with net ≤ 0 never appear.

Bundle fieldMeaning
gross, fees, netGross funding, the fees of four trades per taker_fees, and net = gross − fees
apr_net, apr_capitalAnnualized on one leg's notional, and apr_net / 2 on the capital of both legs
win_rate, max_ddShare of profitable days (0..1) and the max drawdown of the cumulative result
worst_streak, risk_daysThe longest run of losing days and the days risk was measured over, max 90
live_8h, trend_1d, trend_7dThe current rate difference over 8 hours and the gross spread over the last day and week
price_divThe current price gap between the legs; null when prices are unavailable
short_sym, long_symActual leg tickers on the exchanges, which may differ: PEPE and 1000PEPE

In the documentation example, the PEPE bundle — short on HTX, long on Hyperliquid — earned a gross of 1.51504% over 7 days. Fees are 0.05% each to open and close on HTX and 0.045% each on Hyperliquid: 0.05 × 2 + 0.045 × 2 = 0.19.

So net = 1.51504 − 0.19 = 1.32504%, apr_net = 1.32504 × 365 / 7 ≈ 69.09%, apr_capital = 69.09 / 2 ≈ 34.55%. The price gap between the legs, slippage and margin are not included.

How to build a funding monitor

  1. Find candidates

    Request /funding/spread with min_spread (any API plan) and sort by spread_pct.

  2. Check rates and payouts

    Request /funding/rates with coin: interval, next_payout and funding_8h_pct on both exchanges. The position has to be open at the settlement time.

  3. Look at the history

    On Pro and Max, request /funding/analytics/summary with coin: sum, apr, cov and flips for 7d and 30d show whether the rate gap holds.

  4. Assess the bundle as a whole

    In /funding/analytics/top, compare net, apr_capital, win_rate, max_dd and the current price_div.

  5. Open the positions yourself

    The trade_url links lead to the exchange terminals; price the bundle with fees in the spread calculator.

Questions and answers

How do I normalize a funding rate to 8 hours?

Multiply the rate per interval by 8 and divide by the interval length in hours. /funding/rates does it for you in the funding_8h_pct field.

Where do I get funding rate history?

/funding/analytics/recent has every payout over 7 days, /funding/analytics/daily daily sums over a year, and /funding/analytics/summary totals per period. All three are on the API Pro and Max plans.

Why does a full analytics section return 429?

Full downloads without coin are limited: summary and recent once per 60 seconds, daily once per 300 seconds per key. Coin slices and 304 replies to If-None-Match are not limited.