Prerequisites
- Node.js 18+ or Bun
- A RebelFi API key (get one here)
- A wallet for testing (Ethereum, Polygon, Base, or Solana)
Installation
Initialize the Client
- Sandbox (Recommended for Testing)
- Production
Store your API key securely. Never commit it to version control or expose it in client-side code. See the Sandbox guide for testing setup.
Register a Wallet
Before supplying, register the user’s wallet:List Available Venues
Query available yield venues and their strategies:Plan a Supply Operation
Select a strategy and plan a supply operation:Sign and Submit
After the user signs the transaction:Check Operation Status
Poll for confirmation:View Allocations
After supply is confirmed, check the allocation:Complete Example
Next Steps
Full Walkthrough
Complete integration walkthrough
Error Handling
Handle errors gracefully