Usage docs 使用文档

REST and WebSocket examples, base URL configuration, and SDK notes for your shared Massive.com access. 拼车获得的 Massive.com API 调用方式:base_url 配置、REST 和 WebSocket 示例、SDK 注意事项。

Quick start 快速开始

Make your first request 发起你的第一个请求

All requests must use the base URL we give you over email — never the public Massive.com endpoint.

所有请求必须用邮件里给你的 base_url 发起,不要用 Massive.com 公开的端点。

🔗

Use your assigned base URL

使用我们分配的 base URL

We'll send you a personal base_url after you join a team. Replace base_url below with the one in your onboarding email — both REST and WebSocket go through it.

加入 team 后我们会邮件发你专属的 base_url。把下面的 base_url 全部替换成邮件里给你的那个 —— REST 和 WebSocket 都用同一个。

REST

RESTful request

RESTful 请求

Point the official Massive Python SDK's RESTClient at your base_url — no other changes needed. Or use curl directly (see below).

把 Massive 官方 Python package 里的 RESTClient 指向你的 base_url,其他不用动。或者直接用 curl(见下方)。

curl
curl
curl -X GET "https://base_url/v2/aggs/ticker/AAPL/range/1/day/2025-11-03/2025-11-28?adjusted=true&sort=asc&limit=120&apiKey=KEY"
WebSocket

WebSocket request

WebSocket 请求

Connect to wss://base_url/stocks, send an auth message with your key, then subscribe to tickers.

wss://base_url/stocks,先发一条 auth 消息带 key,再 subscribe 订阅代码。

Python
Python
import asyncio
import json
import websockets


async def main():
    async with websockets.connect("wss://base_url/stocks") as ws:
        await ws.send(json.dumps({
            "action": "auth",
            "params": "API_KEY"
        }))

        print(await ws.recv())

        await ws.send(json.dumps({
            "action": "subscribe",
            "params": "Q.NVDA"
        }))

        async for msg in ws:
            print(msg)


asyncio.run(main())

Note: Replace base_url with the host we emailed you, and KEY with your personal API key. The endpoint shape, parameters, and SDK behavior all match Massive.com exactly — only the host differs.

注意:base_url 换成邮件里给你的地址,KEY 换成你的专属 API key。接口路径、参数、SDK 行为跟 Massive.com 完全一致,只是域名不同。

Need a base URL? 还没拿到 base URL?

Email us and we'll send you a personal base URL with an API key bound to you — typically within 24 hours.

发邮件给我们,24 小时内我们会给你一个专属 base URL 和绑定你的 API key。

✉️ general.kim.vpn@gmail.com