import { z } from "zod";
import { apiGet } from "../client.js";
export const name = "get_etf_flows";
export const description =
"Get ETF flow data for BTC, ETH, SOL, or XRP spot ETFs. Shows daily net inflows/outflows " +
"across all major ETF issuers (BlackRock, Fidelity, Grayscale, etc.). Consistent positive " +
"flows signal institutional demand; negative flows signal institutional selling. " +
"BTC ETF flows have been a major market driver since January 2024.";
export const schema = z.object({
asset: z
.enum(["btc", "eth", "sol", "xrp"])
.describe("Asset for ETF flows: btc, eth, sol, or xrp"),
});
export async function handler(args: z.infer<typeof schema>) {
return apiGet(`/api/v1/market-intelligence/etf/${args.asset}/flows`);
}