export type GetApiApiDtaoLiquidityPositionV1Args = {id?: number | undefined, coldkey?: string | undefined, netuid?: number | undefined, status?: string | undefined, page?: number | undefined, limit?: number | undefined, order?: string | undefined}; export type GetApiApiDtaoLiquidityPositionV1Options = {baseUrl?: string | undefined, sec0?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /api/dtao/liquidity/position/v1 */ export const getApiApiDtaoLiquidityPositionV1 = async (args: GetApiApiDtaoLiquidityPositionV1Args, options?: GetApiApiDtaoLiquidityPositionV1Options) => { const {baseUrl = "https://api.taostats.io", fetch: fetchFn = fetch, sec0} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.id != null) query.append("id", String(args.id)) if (args.coldkey != null) query.append("coldkey", String(args.coldkey)) if (args.netuid != null) query.append("netuid", String(args.netuid)) if (args.status != null) query.append("status", String(args.status)) if (args.page != null) query.append("page", String(args.page)) if (args.limit != null) query.append("limit", String(args.limit)) if (args.order != null) query.append("order", String(args.order)) if (sec0 !== undefined) headers.set("Authorization", sec0) const url = `${baseUrl.replace(/\/+$/, '')}/api/dtao/liquidity/position/v1${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 };