If you wish to report an issue, please join our Discord
If you want to learn about LlamaSwap, read the Twitter Thread
The best way to integrate is through an iframe of our page, like this:
<iframe
title="LlamaSwap Widget"
name="LlamaSwap Widget"
src="https://swap.defillama.com?chain=ethereum"
width="450px"
height="565px"
allow="fullscreen"
marginwidth="0"
marginheight="0"
frameborder="0"
scrolling="no"
loading="eager"
></iframe>
The widget is responsive, so you can change the width and height in any way you want and the widget will adjust to fit the space. On top of that, you can customize the widget by adding the following params to the query url:
chain=ethereum
). This parameter is requiredfrom=0x0000000000000000000000000000000000000000
)to=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
)background=rgb(10,20,30)
)Note: only tokens that are part of our token lists are accepted in from
and to
, this is to prevent scammers linking to llamaswap with fake tokens loaded (eg a fake USDC)
Widget integrations are preferred cause:
But if you'd prefer to instead integrate through our API please contact @0xngmi on discord through defillama's discord and ask for an api key. We are forced to use api keys because many of the underlying aggregators have rate limits, so we have to control the volume of requests we send to them.
yarn install
yarn dev
Visit: http://localhost:3000/