Migrate from Twelve Data
This guide is for developers who call the Twelve Data 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 Twelve Data.
Before you start
- Sign up and copy your API key from the dashboard.
- 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:
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
Both APIs take the key in a header. Twelve Data puts the symbol and dates in query parameters. Massive puts them in the path.
Twelve Data's end_date is exclusive, so a range that ends on October 3 sets end_date=2025-10-04:
Massive's to date is inclusive, so the range ends on October 3:
- Long ranges. Twelve Data caps a response at 5,000 rows, so code loops over date windows. Massive returns a next_url when there is more data. The Python client follows it for you.
- Credits. Paid Massive plans have no per-request cost, so you can remove credit tracking.
- Extended hours. Twelve Data leaves out pre-market and after-hours bars unless you pass prepost=true. Massive intraday bars include them. To match the default, keep bars from 9:30 a.m. to 4:00 p.m. ET.
The response
Twelve Data returns values as strings, newest first:
Massive returns numbers, oldest first:
| Twelve Data | Massive | Note |
|---|---|---|
| datetime | t | Unix milliseconds at the bar start. Daily bars start at midnight ET |
| open | o | |
| high | h | |
| low | l | |
| close | c | |
| volume | v | |
| None | vw | Volume-weighted average price |
| None | n | Number of trades |
Remove any float() or parseFloat calls on the values. If your code reads the first bar as the latest, set sort=desc or read from the end.
Symbols
Stock tickers stay the same. Forex and crypto take a prefix instead of a slash.
| Twelve Data | Massive |
|---|---|
| AAPL | AAPL |
| EUR/USD | C:EURUSD |
| BTC/USD | X:BTCUSD |
| A ticker with exchange or mic_code for a non-US venue | Not covered. Massive stocks are US listings only |
Twelve Data has no options. Massive options use the OCC symbol with an O: prefix, such as O:SPY251219C00650000.
Prices
- Both APIs adjust for splits by default, so daily prices match without extra parameters.
- adjust=none becomes adjusted=false on Massive.
- adjust=dividends and adjust=all have no Massive equivalent. Massive adjusts for splits only. To rebuild dividend-adjusted prices, use the historical adjustment factor from Dividends.
Errors
Twelve Data returns "status": "ok" in lowercase. Massive returns "status": "OK". Check the HTTP status code rather than the string.
Sources: Twelve Data documentation, Twelve Data pricing.
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.
| Twelve Data endpoint | Massive endpoint |
|---|---|
| /time_series | Custom Bars. Forex, crypto, and indices have their own Custom Bars pages |
| /quote | Single Ticker Snapshot |
| /price | Last Trade |
| /eod | Previous Day Bar, or Daily Ticker Summary for a past date |
| /symbol_search, /stocks | All Tickers |
| /forex_pairs, /cryptocurrencies | All Tickers with market=fx or market=crypto |
| /profile | Ticker Overview |
| /splits, /dividends | Splits, Dividends |
| /income_statement, /balance_sheet, /cash_flow | Income Statements, Balance Sheets, Cash Flow Statements |
| /statistics | Ratios, for the valuation fields |
| /earnings, /earnings_calendar | Benzinga Earnings, a paid add-on |
| /ipo_calendar | IPOs |
| /insider_transactions | Form 4 |
| /market_movers | Top Market Movers |
| /sma, /ema, /rsi, /macd | SMA, EMA, RSI, MACD. Compute other indicators from bars |
| /exchange_rate, /currency_conversion | Currency Conversion. Set precision, which defaults to 2 decimal places |
| /market_state | Market Status |
| /etfs | All Tickers with type=ETF |
Massive currently doesn't have an equivalent for non-US listings, mutual funds, bonds, dividend-adjusted bars, or indicators other than SMA, EMA, RSI, and MACD. New data and features ship often, so check the product roadmap for what's planned.
Streaming
Twelve Data streams one price event per tick from wss://ws.twelvedata.com/v1/quotes/price, with symbol, price, timestamp, and day_volume. Massive streams each trade, each quote, and bars, one connection per asset class. Twelve Data timestamp is in Unix seconds, and Massive uses Unix milliseconds:
- Stocks: connect to wss://socket.massive.com/stocks and subscribe to trades. Each trade message has the price, size, and a millisecond timestamp.
- Forex: subscribe to quotes on wss://socket.massive.com/forex.
- Crypto: subscribe to trades on wss://socket.massive.com/crypto.
Massive authenticates with a message after you connect, not with a URL parameter. See the WebSocket quickstart. Twelve Data's heartbeat action has no equivalent, so you can remove it.
Bulk history
Twelve Data's /batch endpoint bundles many requests into one call and charges credits for each. To build a local history across many symbols, use flat files instead. Each file holds one day of daily bars, minute bars, or trades for every US stock.
SDKs
| Language | Twelve Data | Massive |
|---|---|---|
| Python | twelvedata | client-python |
| JavaScript | twelvedata for Node.js | client-js |
| Go | Official Go client | client-go |
| Java | Official Java client | client-jvm, for Kotlin and Java |
| R | Official R client | None. Call the REST API directly |
Sources
Twelve Data details were checked against the Twelve Data documentation and pricing page on October 29, 2026. The exclusive end_date was confirmed with a live request. Twelve Data is a trademark of its owner. Massive is not affiliated with Twelve Data.