export type GetApiContextDevBrandRetrieveByTickerArgs = {ticker: string, ticker_exchange?: string | undefined, maxSpeed?: boolean | undefined, timeoutMS?: number | undefined}; export type GetApiContextDevBrandRetrieveByTickerOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Retrieve brand information using a stock ticker symbol. This endpoint looks up the company associated with the ticker and returns its brand data. * * GET /context-dev/brand/retrieve-by-ticker */ export const getApiContextDevBrandRetrieveByTicker = async (args: GetApiContextDevBrandRetrieveByTickerArgs, options?: GetApiContextDevBrandRetrieveByTickerOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.ticker != null) query.append("ticker", String(args.ticker)) if (args.ticker_exchange != null) query.append("ticker_exchange", String(args.ticker_exchange)) if (args.maxSpeed != null) query.append("maxSpeed", String(args.maxSpeed)) if (args.timeoutMS != null) query.append("timeoutMS", String(args.timeoutMS)) const url = `${baseUrl.replace(/\/+$/, '')}/context-dev/brand/retrieve-by-ticker${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };