get_quotes
Fetch historical NBBO stock quotes with optional date range and pagination.
Instructions
Historical NBBO quotes for a stock.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | Stock symbol. | |
| timestamp_gte | No | Inclusive lower bound ("YYYY-MM-DD" or ns/ms unix). | |
| timestamp_lt | No | Exclusive upper bound. | |
| limit | No | Max rows (Massive cap typically 50000). Default 50. | |
| cursor | No | Pagination cursor from a previous `next_cursor`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/massive_mcp/tools/quotes.py:30-54 (handler)Handler function that fetches historical NBBO quotes for a stock ticker via Massive API /v3/quotes/{ticker}.
async def get_quotes( ticker: str, timestamp_gte: str | None = None, timestamp_lt: str | None = None, limit: int = 50, cursor: str | None = None, ) -> dict[str, Any]: """Historical NBBO quotes for a stock. Args: ticker: Stock symbol. timestamp_gte: Inclusive lower bound ("YYYY-MM-DD" or ns/ms unix). timestamp_lt: Exclusive upper bound. limit: Max rows (Massive cap typically 50000). Default 50. cursor: Pagination cursor from a previous `next_cursor`. """ return await client.get( f"/v3/quotes/{ticker}", { "timestamp.gte": timestamp_gte, "timestamp.lt": timestamp_lt, "limit": limit, "cursor": cursor, }, ) - src/massive_mcp/tools/quotes.py:10-11 (registration)The register() function decorates tool handlers with @mcp.tool(), including get_quotes. This is where get_quotes is registered as an MCP tool.
def register(mcp: FastMCP, client: MassiveClient) -> None: @mcp.tool() - src/massive_mcp/server.py:37-48 (helper)The build_server() function iterates over tool modules (including 'quotes') and calls module.register(mcp, client) to register all tools including get_quotes.
for module in ( aggregates, quotes, snapshots, tickers, news, reference, indicators, corporate, financials, ): module.register(mcp, client)