This quickstart guide demonstrates some use cases of the Portals API to help you get started. The API provides comprehensive data about the DeFi ecosystem, including token prices, liquidity, APYs, balances, and more. In addition, you can retrieve quotes for swapping any token or zapping into/out of any pool, vault, etc. on any of our supported networks. You can try the example requests below directly in your browser or with our Swagger UI .
Feel free to play around with the API and explore its features.
Get all Curve pools that contain FRAX
Find the most liquid Balancer pools
Use the sort feature of the API to find the most liquid Balancer pools on Polygon:
Get all Beefy vaults
To get a less granular response that you can filter or process yourself, you can simply call the v2/tokens endpoint without a search string or filters. For example, to get all Beefy vaults on Optimism:
Get the USD price of an Aave token
Use the IDs filter to find a specific token and get its USD price, as well as metrics like its APY and liquidity. For example, to get the price of Aave V3 wrapped staked ETH (aOptwstETH) on Optimism:
Get the latest ETH price
All of the v2/tokens endpoints return the latest price of each token in USD, as well as other contextual data like its contract address on different networks, relevant images, and more. To get the latest price of ETH on all networks:
Get the balance of Vitalik Buterin's wallet on all networks
Use the account endpoint to query the balance of any wallet on any network. For example, to get the balance of Vitalik Buterin's wallet on all networks:
Track the 1inch treasury Safe Multisig
The account endpoint can also be used to track the balance of a smart contract. For example, to track the balance of the 1inch treasury Safe Multisig on Ethereum:
Zap into a Yearn vault with any token
Swap BNB for USDC
You can also execute basic swaps - for example, to swap BNB for USDC on Binance Smart Chain (BSC):
Dig deeper by learning more about the structure and categorization of the Portals API in the Concepts section. You can also check out the Guides section for more in-depth examples of how to use the API.