Analytics & Metrics
getVolume
Get total trading volume across all Zyfai accounts, optionally filtered by asset type.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
getVolume(assetType?: "usdc" | "eth"): Promise<VolumeResponse>
| Parameter | Type | Required | Description |
|---|---|---|---|
assetType | string | ❌ | Asset to get volume for: "usdc" or "eth" (default: "usdc") |
interface VolumeResponse {
success: boolean;
volumeInUSD: string;
}
// Get USDC volume (default)
const usdcVolume = await sdk.getVolume();
console.log("USDC Volume:", usdcVolume.volumeInUSD);
// Get ETH/WETH volume
const ethVolume = await sdk.getVolume("eth");
console.log("ETH Volume:", ethVolume.volumeInUSD);