General methods

Don't forget to initialize DeFi SDK first!

Get supported protocols

Python
Go
JavaScript
Python
>>> 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']
Go
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]
JavaScript
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

Python
Go
JavaScript
Python
>>> 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']
Go
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]
JavaScript
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'
// ]

‚Äč