export type GetApiGetByUserStatsVolumeArgs = {wallet: string}; export type GetApiGetByUserStatsVolumeOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get user volume stats * * GET /get-by-user/stats/volume */ export const getApiGetByUserStatsVolume = async (args: GetApiGetByUserStatsVolumeArgs, options?: GetApiGetByUserStatsVolumeOptions) => { const {baseUrl = "https://api.raydium.io", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.wallet != null) query.append("wallet", String(args.wallet)) const url = `${baseUrl.replace(/\/+$/, '')}/get-by-user/stats/volume${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 };