/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { futuresGetCalendar } from "../funcs/futuresGetCalendar.js"; import { futuresGetForecasts } from "../funcs/futuresGetForecasts.js"; import { futuresGetHedgeIndicator } from "../funcs/futuresGetHedgeIndicator.js"; import { futuresGetLongTermForecast } from "../funcs/futuresGetLongTermForecast.js"; import { futuresGetPrices } from "../funcs/futuresGetPrices.js"; import { futuresList } from "../funcs/futuresList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Futures extends ClientSDK { /** * List all available futures * * @remarks * Returns a list of all available future symbols that * Hedgewise tracks. */ async list( options?: RequestOptions, ): Promise { return unwrapAsync(futuresList( this, options, )); } /** * Get trading calendar for a future * * @remarks * Returns a list of all trading days for a given future * symbol, based on the exchange where its contracts are traded. Prices, * forecasts, and indicators are available for each of these days. */ async getCalendar( request: operations.GetAssetCalendarRequest, options?: RequestOptions, ): Promise { return unwrapAsync(futuresGetCalendar( this, request, options, )); } /** * Get forecasts for a future * * @remarks * Returns a list of all forecasts made for a given future * symbol. Forecasts are made at various horizons, and can be interpolated * to daily values. Forecasted prices, estimated lower and upper bounds, * and market drivers are available for each forecast. */ async getForecasts( request: operations.GetFuturesForecastsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(futuresGetForecasts( this, request, options, )); } /** * Get long-term forecast for a future * * @remarks * Returns a list of booleans indicating whether the price of the given future is expected to increase over the next 12 months. */ async getLongTermForecast( request: operations.GetLongTermForecastRequest, options?: RequestOptions, ): Promise { return unwrapAsync(futuresGetLongTermForecast( this, request, options, )); } /** * Get hedge indicator for a future * * @remarks * 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. */ async getHedgeIndicator( request: operations.GetHedgeIndicatorRequest, options?: RequestOptions, ): Promise { return unwrapAsync(futuresGetHedgeIndicator( this, request, options, )); } /** * Get historical prices for a future * * @remarks * Returns historical price data for a given future symbol. * Prices are available for all actively traded contracts on each day. */ async getPrices( request: operations.GetFuturesPricesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(futuresGetPrices( this, request, options, )); } }