quote_get
Retrieve a real-time quote snapshot for the active symbol, including last price, day OHLC, and volume.
Instructions
Get a real-time quote snapshot for the active symbol (last price, day OHLC, volume).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/quote.ts:28-41 (handler)The main handler function for quote_get. Calls page.getQuote() and wraps errors in ToolExecutionError.
export async function quoteGet( _input: z.infer<typeof quoteGetInput>, page: TradingViewPage, ): Promise<z.infer<typeof quoteGetOutput>> { try { return await page.getQuote(); } catch (cause) { throw new ToolExecutionError( 'quote_get', 'Failed to read quote — is a chart loaded?', cause, ); } } - src/tools/quote.ts:13-26 (schema)Input and output Zod schemas for quote_get. Input is empty strict object; output includes symbol, last, bid, ask, dayHigh, dayLow, dayOpen, dayClose, volume, timestamp.
export const quoteGetInput = z.object({}).strict(); export const quoteGetOutput = z.object({ symbol: z.string(), last: z.number().nullable(), bid: z.number().nullable(), ask: z.number().nullable(), dayHigh: z.number().nullable(), dayLow: z.number().nullable(), dayOpen: z.number().nullable(), dayClose: z.number().nullable(), volume: z.number().nullable(), timestamp: z.string(), }); - src/tools/index.ts:100-108 (registration)Registration of the quote_get tool in the tools array with name, description, input/output schemas, and handler function.
// --- quote --- { name: 'quote_get', description: 'Get a real-time quote snapshot for the active symbol (last price, day OHLC, volume).', input: quoteGetInput, output: quoteGetOutput, handler: quoteGet, }, - src/tools/index.ts:37-37 (registration)Import statement bringing quoteGet, quoteGetInput, and quoteGetOutput from the quote module.
import { quoteGet, quoteGetInput, quoteGetOutput } from './quote.js';