Skip to content
HedgeRift

Developers

API reference

The same numbers you see in the screener, over REST and WebSocket. The public API is not launched yet and has no launch date. This page shows the planned object shapes. Access will be included with Desk / API and Enterprise.

Base URL and authentication

https://api.hedgerift.com/v1
wss://stream.hedgerift.com/v1

X-API-Key: <your key>

Keys are created in your account and can be scoped to read-only or alerts. Write endpoints also require an HMAC signature header. Never embed a key in browser code.

Endpoints

GET/v1/opportunitiesList opportunities. Filters: strategy, exchanges, symbol, minNetApr, sizeUsd, holdingH, sort, limit.
GET/v1/opportunities/{id}One opportunity with the fee and slippage breakdown and a depth summary for both legs.
GET/v1/funding/currentCurrent funding for every perpetual. Filters: exchange, symbol.
GET/v1/funding/historyHourly normalized funding. Params: symbol, exchange, from, to (max 31 days per call).
GET/v1/spreads/history1 minute spread and net APR history for an opportunity key.
GET/v1/pulseOpen interest, OI-weighted funding, long/short ratios, taker flow and regime per coin, with 7 days of hourly series.
GET/v1/moodMarket and per-coin Mood scores with every input and component, plus 7 days of hourly history.
GET/v1/exchangesVenues with status, fee schedule, default intervals and funding caps.
GET/v1/marketsMarket metadata: canonical asset, contract size, expiry, listing status.
POST/v1/alertsCreate an alert (Pro and above).
GET/v1/alertsList your alerts. PATCH and DELETE on /v1/alerts/{id}.

Example request

curl -H "X-API-Key: $HEDGERIFT_API_KEY" \
  "https://api.hedgerift.com/v1/opportunities?strategy=spot-perp&exchanges=binance,bybit&minNetApr=10&sizeUsd=25000"

WebSocket stream

Subscribe once; the server sends a full snapshot, then sequenced deltas. If a sequence number is skipped, resubscribe to get a fresh snapshot.

→ { "op": "subscribe", "channel": "opportunities",
    "params": { "strategy": "perp-perp", "minNetApr": 10, "sizeUsd": 10000, "holdingH": 168 } }

← { "type": "snapshot", "channel": "opportunities", "seq": 1, "data": [ ... ] }
← { "type": "delta", "channel": "opportunities", "seq": 2,
    "upsert": [ ... ], "remove": ["perp-perp|SOL|hyperliquid|bybit"] }
← { "type": "ping", "ts": 1760198400000 }

Other channels: funding:{SYMBOL}, opportunity:{id} (detail with depth) and alerts (your own alert events).

Rate limits

  • Desk / API: 600 requests per minute, 1,000,000 calls included per month, then $0.50 per 1,000, pausing after $500 of overage
  • Enterprise: 6,000 requests per minute, 10,000,000 calls included per month

Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Exceeding the limit returns 429 with a Retry-After header.

Errors

  • 400 invalid parameter, with a field name in the body
  • 401 missing or invalid key
  • 403 endpoint not included in your plan
  • 429 rate limit exceeded
  • 503 upstream venue data stale; retry after the indicated delay

Data dictionary: Opportunity

FieldTypeMeaning
idstringStable key: strategy|symbol|long venue|short venue
strategyenumspot-perp, perp-perp, spot-spot, basis, extremes
long / shortLegexchange, market, price, fundingRate (% per interval), intervalH, nextFundingTs, volume24hUsd, oiUsd, depth05Usd, feePct
entrySpreadPctnumberShort leg bid vs long leg ask, percent
grossAprPctnumberFunding or basis only, annualized
feesPctnumberFees on all fills, percent of notional
slippagePctnumberEstimated impact at sizeUsd, entry and exit, both legs
netAprPctnumberNet of fees, slippage and entry spread, annualized over holdingH, on notional
capitalAprPctnumberSame, on capital posted (spot plus margin)
netProfitUsdnumberAt sizeUsd over holdingH
breakEvenHnumberHours of funding to recover costs
realizedApr7dPctnumber7 day mean of hourly funding (or differential), annualized
stabilityScore0..100Consistency of funding over 7 days
liquidityScore0..100Depth within 0.5% and 24h volume of the thinner leg
maxSizeUsdnumberLargest size still above the minimum net APR
score0..100HedgeRift Score
updatedTsms epochTime of the snapshot that produced the row

Versioning

Breaking changes ship under a new version prefix with at least six months of overlap. Additive fields can appear at any time, so ignore fields you do not recognise.