/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { futuresGetPrices } from "../../funcs/futuresGetPrices.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetFuturesPricesRequest$inboundSchema, }; export const tool$futuresGetPrices: ToolDefinition = { name: "futures-get-prices", description: `Get historical prices for a future Returns historical price data for a given future symbol. Prices are available for all actively traded contracts on each day.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await futuresGetPrices( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };