Migrate from Finnhub

Port Finnhub calls to the Massive API

This guide is for developers who call the Finnhub REST or WebSocket API and want to run the same app on Massive. It maps each common endpoint to the Massive endpoint that replaces it, and lists the differences that change your results. To compare the two products before you switch, see Massive vs Finnhub.

Before you start

Using AI?

Paste this into Claude Code, Cursor, Codex, or any coding agent that can read files and fetch a URL:

Find every place my project calls Finnhub.
Switch those calls to the Massive REST API.
Read https://massive.com/docs/migration/guides/finnhub.md for the endpoint map and the differences to handle.
Read https://massive.com/docs/llms.txt for the rest of the API.
Read the API key from the MASSIVE_API_KEY environment variable.
Keep my function signatures and data shapes the same, and list anything Massive does not cover.

To let the agent check real responses while it works, connect the Massive MCP server. Massive also publishes skills and plugins for coding agents.

The request

Finnhub takes the range as Unix seconds in query parameters:

curl "https://finnhub.io/api/v1/stock/candle?symbol=AAPL&resolution=D&from=1759291200&to=1759550400" \
  -H "X-Finnhub-Token: YOUR_API_KEY"

Massive takes dates in the path. Both dates are inclusive:

Massive
curl "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2025-10-01/2025-10-03" \
  -H "Authorization: Bearer YOUR_API_KEY"
  • Long ranges. Finnhub returns at most one month of intraday candles per call. Massive returns a next_url when there is more data. The Python client follows it for you.
  • Rate limits. Paid Massive plans have no per-minute limit, so you can remove code that backs off on HTTP 429.

The response

Finnhub returns one array per field:

{
  "o": [255.04],
  "h": [258.79],
  "l": [254.93],
  "c": [255.45],
  "v": [48713940],
  "t": [1759291200],
  "s": "ok"
}

Massive returns one object per bar:

{
  "results": [
    {
      "t": 1759291200000,
      "o": 255.04,
      "h": 258.79,
      "l": 254.93,
      "c": 255.45,
      "v": 48713940,
      "vw": 256.004,
      "n": 535581
    }
  ]
}
FinnhubMassiveNote
t[]tFinnhub uses Unix seconds. Massive uses Unix milliseconds
o[]o
h[]h
l[]l
c[]c
v[]v
NonevwVolume-weighted average price
NonenNumber of trades
"s": "no_data"No resultsAn empty range returns resultsCount of 0

Code that zips the arrays by index needs to loop over results instead.

Symbols

Stock tickers stay the same. Forex and crypto drop the venue.

FinnhubMassive
AAPLAAPL
^GSPCI:SPX
OANDA:EUR_USDC:EURUSD
BINANCE:BTCUSDTX:BTCUSD. Massive crypto tickers quote in USD, not USDT
A non-US ticker with an exchange suffixNot covered. Massive stocks are US listings only

Finnhub has no options. Massive options use the OCC symbol with an O: prefix, such as O:SPY251219C00650000.

Prices

  • Daily candles are split adjusted on both, so daily prices match.
  • Finnhub intraday candles are as traded. Massive adjusts every timespan for splits by default, so set adjusted=false on minute bars to match.

Sources: Finnhub API documentation, Finnhub rate limits.

Endpoint map

This map covers the most common calls. It is not a full list. To find the Massive endpoint for another call, search these docs.

Finnhub endpointMassive endpoint
/stock/candleCustom Bars
/quoteSingle Ticker Snapshot
/stock/tickTrades
/stock/bboQuotes
/search, /stock/symbolAll Tickers
/stock/profile2Ticker Overview
/stock/peersRelated Tickers
/stock/split, /stock/dividendSplits, Dividends
/stock/financials, /stock/financials-reportedMassive statements are standardized, not as reported. Income Statements, Balance Sheets, Cash Flow Statements
/stock/metricRatios, for the latest trading day only. Compute history from the statements and bars
/company-news, /newsNews
/stock/insider-transactionsForm 4
/calendar/ipoIPOs
/stock/earnings, /calendar/earningsBenzinga Earnings, a paid add-on
/stock/recommendation, /stock/price-targetBenzinga Consensus Ratings, Analyst Ratings, paid add-ons
/indicatorSMA, EMA, RSI, MACD. Compute other indicators from bars
/forex/candle, /crypto/candleForex Custom Bars, Crypto Custom Bars
/forex/ratesForex Full Market Snapshot, or Currency Conversion for one pair
/stock/market-statusMarket Status
/stock/market-holidayMarket Holidays

Massive currently doesn't have an equivalent for Finnhub's ESG scores, congressional trading, lobbying, patents, supply chain, or non-US listings. New data and features ship often, so check the product roadmap for what's planned.

Streaming

Finnhub streams trades from wss://ws.finnhub.io after you send {"type":"subscribe","symbol":"AAPL"}. Each message holds a data array of trades with s, p, t, and v.

On Massive, connect to wss://socket.massive.com/stocks, authenticate with a message, and subscribe to trades. For forex use quotes, and for crypto use trades on their own connections. See the WebSocket quickstart.

Finnhub's subscribe-news and subscribe-pr channels have no WebSocket equivalent. Poll News instead.

Bulk history

Finnhub offers monthly bulk files from its dashboard. On Massive, use flat files. Each file holds one day of trades, quotes, minute bars, or daily bars for every US stock.

SDKs

LanguageFinnhubMassive
Pythonfinnhub-pythonclient-python
JavaScriptfinnhubclient-js
Gofinnhub-goclient-go
KotlinOfficial Kotlin clientclient-jvm
Ruby, PHPOfficial clientsNone. Call the REST API directly

Sources

Finnhub details were checked against the Finnhub API documentation on October 29, 2026. Finnhub is a trademark of its owner. Massive is not affiliated with Finnhub.

Did you find this page helpful?
Do you still need help with something?