General methods
Don't forget to initialize DeFi SDK first!
Get supported protocols
>>> await defi_sdk.get_protocol_names()
['PieDAO',
'Multi-Collateral Dai',
'Bancor',
'DeFi Money Market',
'TokenSets',
'0x Staking',
'Uniswap V1',
'Synthetix',
'PoolTogether',
'Dai Savings Rate',
'Chai',
'iearn.finance (v3)',
'iearn.finance (v2)',
'Idle',
'dYdX',
'Curve',
'Compound',
'Balancer',
'Aave']
sdk.GetSupportedProtocols()
// [PieDAO Multi-Collateral Dai Bancor DeFi Money Market TokenSets 0x Staking Uniswap V1 Synthetix PoolTogether Dai Savings Rate Chai iearn.finance (v3) iearn.finance (v2) Idle dYdX Curve Compound Balancer Aave]
defiSdk.getProtocolNames().then(protocols => console.log(protocols));
// output:
// [
// 'Uniswap V2', 'PieDAO',
// 'Multi-Collateral Dai', 'Bancor',
// 'DeFi Money Market', 'TokenSets',
// '0x Staking', 'Uniswap V1',
// 'Synthetix', 'PoolTogether',
// 'Dai Savings Rate', 'Chai',
// 'iearn.finance (v3)', 'iearn.finance (v2)',
// 'Idle', 'dYdX',
// 'Curve', 'Compound',
// 'Balancer', 'Aave'
// ]
Get supported token types
>>> await defi_sdk.get_token_adapter_names()
['PieDAO Pie Token',
'SmartToken',
'MToken',
'SetToken',
'Uniswap V1 pool token',
'PoolTogether pool',
'Chai token',
'YToken',
'IdleToken',
'Curve pool token',
'CToken',
'Balancer pool token',
'AToken',
'ERC20']
sdk.GetTokenAdapterNames()
// [PieDAO Pie Token SmartToken MToken SetToken Uniswap V1 pool token PoolTogether pool Chai token YToken IdleToken Curve pool token CToken Balancer pool token AToken ERC20]
defiSdk.getTokenAdapterNames().then(adapters => console.log(adapters));
// output:
// [
// 'Uniswap V2 pool token',
// 'PieDAO Pie Token',
// 'SmartToken',
// 'MToken',
// 'SetToken',
// 'Uniswap V1 pool token',
// 'PoolTogether pool',
// 'Chai token',
// 'YToken',
// 'IdleToken',
// 'Curve pool token',
// 'CToken',
// 'Balancer pool token',
// 'AToken',
// 'ERC20'
// ]
Last updated