SDK Reference
Installation
For installation instructions use Getting Started with the SDK
SDK references
getAllVaults(params?)
Get information about all available vaults.
const vaults = await sdk.getAllVaults({
query: {
page: 0,
perPage: 100,
allowedNetworks: ['mainnet', 'polygon'],
allowedProtocols: ['aave', 'compound'],
allowedAssets: ['USDC', 'USDT'],
minTvl: 1000000,
maxTvl: 100000000,
onlyTransactional: true,
onlyAppFeatured: false
}
})getVault(params)
Get detailed information about a specific vault.
const vault = await sdk.getVault({
path: {
network: 'mainnet',
vaultAddress: '0x1234...'
}
})Historical Data Methods
getVaultHistoricalData(params)
Get historical APY and TVL data for a vault.
Portfolio Methods
getPositions(params)
Get all positions for a user address.
getDepositOptions(params)
Get the best deposit options for a user.
getIdleAssets(params)
Get idle assets in a user's wallet that could be earning yield.
getVaultTotalReturns(params)
Get total returns for a specific user and vault.
getVaultHolderEvents(params)
Get events (deposits, withdrawals) for a specific user and vault.
Transaction Methods
getTransactionsContext(params)
Get transaction context for a specific vault interaction.
getActions(params)
Get available actions (deposit, withdraw, etc.) for a vault.
Benchmark Methods
(WIP)
Error Handling
The SDK throws HttpResponseError for API errors:
TypeScript Support
This SDK is written in TypeScript and provides full type safety. All API responses are properly typed based on the OpenAPI specification.
License
MIT License - see the LICENSE file for details.
Last updated