Migrate from Alpaca

Port Alpaca market data calls to the Massive API

This guide is for developers who call the Alpaca Market Data API and want to get that data from Massive. It covers market data only. You can keep Alpaca as your broker, and your order code does not change. To compare the two products before you switch, see Massive vs Alpaca.

Before you start

  • Sign up and copy your API key from the dashboard. Massive uses one key, not a key and secret pair.
  • Pick a plan for each market you use on the pricing page.
  • Read the REST quickstart for the response shape that every endpoint shares.

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 the Alpaca Market Data API.
Switch those calls to the Massive REST API, and leave Alpaca trading and order calls as they are.
Read https://massive.com/docs/migration/guides/alpaca.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

Alpaca takes a key and a secret in two headers. Massive takes one key. Alpaca's bars endpoint accepts several symbols in one request. Massive takes one ticker per request.

Alpaca reads a bare end date as a timestamp, so this request ends on October 4 to be sure October 3 is included:

curl "https://data.alpaca.markets/v2/stocks/bars?symbols=AAPL&timeframe=1Day&start=2025-10-01&end=2025-10-04&feed=sip" \
  -H "APCA-API-KEY-ID: YOUR_API_KEY" \
  -H "APCA-API-SECRET-KEY: YOUR_SECRET_KEY"

Massive's to is an inclusive date:

Massive
curl "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2025-10-01/2025-10-03?adjusted=false" \
  -H "Authorization: Bearer YOUR_API_KEY"
  • Paging. Alpaca returns a next_page_token that you send back as page_token. Massive returns a next_url to call as is. The Python client follows it for you.
  • Feed. Remove the feed parameter. Massive has one stocks feed, and it covers every US exchange.

The response

Alpaca groups bars under each symbol:

{
  "bars": {
    "AAPL": [
      {
        "t": "2025-10-01T04:00:00Z",
        "o": 255.04,
        "h": 258.79,
        "l": 254.93,
        "c": 255.45
      }
    ]
  },
  "next_page_token": null
}

Massive returns one list of bars for the ticker:

{
  "results": [
    {
      "t": 1759291200000,
      "o": 255.04,
      "h": 258.79,
      "l": 254.93,
      "c": 255.45,
      "v": 48713940,
      "vw": 256.004,
      "n": 535581
    }
  ]
}

The bar field names are the same: o, h, l, c, v, vw, and n. Two things change:

  • Read bars from results, not from bars["AAPL"].
  • Parse t as Unix milliseconds, not as an RFC 3339 string. Daily bars start at midnight ET on both.

For trades and quotes, Alpaca uses letters for exchange and condition codes. Massive uses integer IDs. Map them with Exchanges and Condition Codes.

Symbols

AlpacaMassive
AAPLAAPL
AAPL240426C00162500O:AAPL240426C00162500
BTC/USDX:BTCUSD over REST, BTC-USD over WebSocket

Prices

  • Alpaca bars are as traded by default. Massive bars are split adjusted by default. Set adjusted=false to match.
  • If you pass adjustment=split to Alpaca, leave adjusted out on Massive.
  • Alpaca's dividend and all adjustments have no Massive equivalent. To rebuild dividend-adjusted prices, use the historical adjustment factor from Dividends.
  • Alpaca returns crypto bars with zero volume when nothing traded. Massive returns no bar for an interval with no trades.

Sources: Alpaca market data overview, historical stock bars.

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.

Alpaca endpointMassive endpoint
GET /v2/stocks/barsCustom Bars
GET /v2/stocks/tradesTrades
GET /v2/stocks/quotesQuotes
GET /v2/stocks/trades/latest, /quotes/latestLast Trade, Last Quote
GET /v2/stocks/bars/latestSingle Ticker Snapshot, which returns the latest minute bar in min
GET /v2/stocks/snapshotsUnified Snapshot, or Full Market Snapshot for every ticker
GET /v1beta1/options/snapshots/{underlying}Option Chain Snapshot
GET /v1beta1/options/bars, /options/tradesOptions Custom Bars, Options Trades
GET /v1beta1/options/quotes/latestOption Contract Snapshot, or Options Quotes for history
GET /v2/options/contractsAll Contracts
GET /v1beta3/crypto/{loc}/bars, /tradesCrypto Custom Bars, Crypto Trades
GET /v1beta3/crypto/{loc}/snapshotsCrypto Single Ticker Snapshot. Massive has no REST crypto quotes
GET /v1/corporate-actionsSplits, Dividends, Ticker Events
GET /v1beta1/newsNews
GET /v1beta1/screener/{market}/moversTop Market Movers

Massive currently doesn't have an equivalent for Alpaca auctions, crypto order books, most-active screens, or logos. New data and features ship often, so check the product roadmap for what's planned. Massive adds data that Alpaca does not sell: fundamentals, forex, indices, and futures.

Streaming

Alpaca streams from wss://stream.data.alpaca.markets/v2/sip, and you subscribe with {"action":"subscribe","trades":["AAPL"]}. Massive streams from wss://socket.massive.com/stocks, and each channel has a prefix:

Alpaca channelMassive channel
tradesT.AAPL
quotesQ.AAPL
barsAM.AAPL
luldsLULD.AAPL

Options and crypto have their own connections at wss://socket.massive.com/options and wss://socket.massive.com/crypto. Massive has no news stream, so poll News instead. See the WebSocket quickstart.

Bulk history

Alpaca has no bulk download. To backfill many symbols, use Massive flat files instead of paging through the bars endpoint. Each file holds one day of daily bars, minute bars, or trades for every US stock.

SDKs

LanguageAlpacaMassive
Pythonalpaca-pyclient-python
JavaScriptOfficial Node clientclient-js
GoOfficial Go clientclient-go
Javaalpaca-javaclient-jvm, for Kotlin and Java
C#Official .NET clientNone. Call the REST API directly

Sources

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

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