Wallet Integration
Example code + mini tutorial showing Portfolio and Transactional integrations with Vaults.fyi
The example will:
Check user balances (idle assets) and display them in a formatted table
Display the best deposit options filtered for USDC/USDS only
Generate a transactional payload for depositing into a vault that includes optional deposit fee for wallets
Show all user positions across different vaults
Run the tutorial code
Clone or download tutorial code
git clone https://github.com/WallfacerLabs/js-examples.gitgit clone https://github.com/WallfacerLabs/python-examples.gitCreate virtual environment and install dependencies:
cd js_examples/
npm installcd python_examples/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtSet your API key as an environment variable:
export VAULTS_FYI_API_KEY="your_api_key_here"Run
npm run wallet_integrationpython wallet_integration.pyStep by step
1. SDK Initialization
2. Viewing User Balances
3. Finding Best Deposit Options
4. Generating Deposit Transactions
5. Viewing User Positions
Last updated
