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/opportunities | List 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/current | Current funding for every perpetual. Filters: exchange, symbol. |
| GET | /v1/funding/history | Hourly normalized funding. Params: symbol, exchange, from, to (max 31 days per call). |
| GET | /v1/spreads/history | 1 minute spread and net APR history for an opportunity key. |
| GET | /v1/pulse | Open interest, OI-weighted funding, long/short ratios, taker flow and regime per coin, with 7 days of hourly series. |
| GET | /v1/mood | Market and per-coin Mood scores with every input and component, plus 7 days of hourly history. |
| GET | /v1/exchanges | Venues with status, fee schedule, default intervals and funding caps. |
| GET | /v1/markets | Market metadata: canonical asset, contract size, expiry, listing status. |
| POST | /v1/alerts | Create an alert (Pro and above). |
| GET | /v1/alerts | List 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
400invalid parameter, with a field name in the body401missing or invalid key403endpoint not included in your plan429rate limit exceeded503upstream venue data stale; retry after the indicated delay
Data dictionary: Opportunity
| Field | Type | Meaning |
|---|---|---|
| id | string | Stable key: strategy|symbol|long venue|short venue |
| strategy | enum | spot-perp, perp-perp, spot-spot, basis, extremes |
| long / short | Leg | exchange, market, price, fundingRate (% per interval), intervalH, nextFundingTs, volume24hUsd, oiUsd, depth05Usd, feePct |
| entrySpreadPct | number | Short leg bid vs long leg ask, percent |
| grossAprPct | number | Funding or basis only, annualized |
| feesPct | number | Fees on all fills, percent of notional |
| slippagePct | number | Estimated impact at sizeUsd, entry and exit, both legs |
| netAprPct | number | Net of fees, slippage and entry spread, annualized over holdingH, on notional |
| capitalAprPct | number | Same, on capital posted (spot plus margin) |
| netProfitUsd | number | At sizeUsd over holdingH |
| breakEvenH | number | Hours of funding to recover costs |
| realizedApr7dPct | number | 7 day mean of hourly funding (or differential), annualized |
| stabilityScore | 0..100 | Consistency of funding over 7 days |
| liquidityScore | 0..100 | Depth within 0.5% and 24h volume of the thinner leg |
| maxSizeUsd | number | Largest size still above the minimum net APR |
| score | 0..100 | HedgeRift Score |
| updatedTs | ms epoch | Time 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.