/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { futuresGetHedgeIndicator } from "../../funcs/futuresGetHedgeIndicator.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetHedgeIndicatorRequest$inboundSchema, }; export const tool$futuresGetHedgeIndicator: ToolDefinition = { name: "futures-get-hedge-indicator", description: `Get hedge indicator for a future Returns a list of values indicating the likelihood that the future price will increase, indicating that this is a good time to hedge. The indicator is quintiles of the ratio of the forecasted price trajectory (out to a specified horizon) to the forecasted ulcer index, where the quintiles are given by historical values of this indicator back a specified number of lookback days.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await futuresGetHedgeIndicator( 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); }, };