Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Queries

Fully typed query functions for Steakhouse data.

All examples below assume a client is already created:

import { SteakhouseClient } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({
  apiKey: process.env.STEAKHOUSE_API_KEY!,
})

getVaults

Fetch all Steakhouse-curated vaults. Designed for vault discovery and table views.

import { SteakhouseClient, getVaults } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const vaults = await getVaults(client) 
 
for (const vault of vaults) {
  vault.name
  vault.address
  vault.symbol
  vault.decimals
  vault.icon
  vault.priceUsd
  vault.chain
  vault.asset
  vault.totalAssets
  vault.apyInstant
  vault.apy1d
  vault.apy7d
  vault.apy30d
  vault.riskAssessment
  vault.__typename
  vault.strategy
  vault.isListed
}

getVault

Fetch detailed data for a single vault. Includes all summary fields plus protocol-specific data.

The vault must be in the Steakhouse registry (returned by getVaults) or queried as a Box vault with isBox: true.

import { SteakhouseClient, getVault } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const vault = await getVault(client, { 
  chainId: 1, 
  vaultAddress: "0x...", 
}) 
 
// Common fields (same as getVaults, plus description)
vault.name
vault.address
vault.symbol
vault.decimals
vault.icon
vault.priceUsd
vault.chain
vault.asset
vault.totalAssets
vault.apyInstant
vault.apy1d
vault.apy7d
vault.apy30d
vault.riskAssessment
vault.__typename
vault.strategy
vault.description
vault.isListed

Protocol-specific fields

Narrow on __typename to access protocol-specific fields.

Morpho V1:

if (vault.__typename === "MorphoVault") {
  vault.deploymentTimestamp
  vault.performanceFeeV1
  vault.curatorAddress
  vault.guardianAddress
  vault.totalLiquidity
  vault.allocations
}

Morpho V2:

if (vault.__typename === "MorphoVaultV2") {
  vault.deploymentTimestamp
  vault.performanceFee
  vault.managementFee
  vault.nav
  vault.liquidityAssets
  vault.idleAssets
  vault.allocations
}

Box:

if (vault.__typename === "BoxVault") {
  vault.leverage
  vault.allocations
  vault.fundingModules
}

Box vaults

Box vaults are not in the Steakhouse registry. Pass isBox: true to query them directly.

import { SteakhouseClient, getVault } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const vault = await getVault(client, { 
  chainId: 1, 
  vaultAddress: "0x...", 
  isBox: true, 
}) 

getVaultHistory

Fetch daily and weekly snapshots with APY and total supplied.

import { SteakhouseClient, getVaultHistory } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const historical = await getVaultHistory(client, { 
  chainId: 1, 
  vaultAddress: "0x...", 
}) 
 
historical.daily
historical.weekly

getStats

Fetch Steakhouse aggregate stats.

import { SteakhouseClient, getStats } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const stats = await getStats(client) 
 
stats.uniqueDepositors
stats.tvl.current.totalUsd
stats.tvl.current.byChain
stats.tvl.current.byProtocol
stats.tvl.current.byAssetCategory

With historical TVL

import { SteakhouseClient, getStats } from "@whisk/steakhouse"
 
const client = new SteakhouseClient({ apiKey: "your-api-key" })
 
const stats = await getStats(client, { includeHistorical: true }) 
 
stats.tvl.historical // daily snapshots (last 365 days)