HedgeFriend
API

One bearer token. Predictable JSON. Visible rate limits.

Everything you need to wire up an HTTP client. Interactive OpenAPI docs ship at /docs on the API host once you have a key.

Authentication

Every request requires an Authorization: Bearer <api_key> header. Keys are issued on signup and shown once — store them in a secret manager. Lost a key? Rotate it via POST /v1/auth/rotate-key.

Authenticated request
bash
curl -s \
  -H "Authorization: Bearer hf_live_..." \
  'https://api.hedgefriend.dev/v1/sec/filings/AAPL?filing_type=10-K'

Rate limits

Per-key limits are enforced per UTC day. Three headers come back on every response — read them, don't guess.

X-RateLimit-Limit
Daily request budget for this key
X-RateLimit-Remaining
Requests left in the current UTC day
X-RateLimit-Reset
ISO-8601 timestamp when the budget resets

When the budget is exhausted, the API responds with 429 and a Retry-After header.

Errors

Errors are JSON. Codes are stable strings — they will not change wording across versions.

401 Unauthorized
json
{
  "error": "invalid_api_key",
  "message": "API key is missing, malformed, or revoked."
}
429 Too Many Requests
json
{
  "error": "rate_limited",
  "message": "Daily request budget exhausted.",
  "retry_after_seconds": 3214
}

Endpoint reference

Path parameters in {braces}. Query filters are documented inline in the OpenAPI schema served from the API.

Account

Issue and manage API keys. Track daily usage.

POST/v1/auth/registerCreate account, return API key
POST/v1/auth/rotate-keyRevoke old key, issue a new one
GET/v1/account/usageRequests used today / this month

Market

Symbol search across the indexed universe.

GET/v1/market/searchSymbol lookup by name or ticker

SEC

Filings, insider trades, institutional holdings, XBRL financials.

GET/v1/sec/filings/{symbol}10-K, 10-Q, 8-K and other filings
GET/v1/sec/insider-trades/{symbol}Form 4 insider transactions
GET/v1/sec/institutional/{symbol}13-F institutional holdings
GET/v1/sec/financials/{symbol}XBRL structured financials

Alternative data

Positioning, weather, attention, patents, regulations, congress.

GET/v1/alt/cftc/contractsList tracked futures contracts
GET/v1/alt/cftc/positions/{code}COT positioning time series
GET/v1/alt/weather/eventsFEMA disaster declarations
GET/v1/alt/wiki/{symbol}Wikipedia daily pageviews
GET/v1/alt/patents/{symbol}USPTO patent grants
GET/v1/alt/regulationsFederal Register rules & proposed rules
GET/v1/alt/congress/tradesCongressional STOCK Act disclosures
GET/v1/alt/congress/trades/{symbol}Congress trades for a ticker

News

Tagged finance articles and daily sentiment aggregates.

GET/v1/news/ticker/{symbol}Articles mentioning a ticker
GET/v1/news/searchFull-text article search
GET/v1/news/sentiment/{symbol}Daily sentiment time series

Macro

Curated FRED series for the indicators traders watch.

GET/v1/macro/seriesList tracked FRED series
GET/v1/macro/series/{code}Time series for one indicator
GET/v1/macro/latestOne-row snapshot per indicator

Need an API key?

Free tier is 50 requests/day on every endpoint. No card required.

Get a key →