Integrating Squid's SDK or API into an aggregator is easy.
- The SDK has some helper functions for executing transactions and parsing API responses, but otherwise they have the same functionality.
Follow the documentation for the SDK or API as normal.
Cross chain fees are returned in the
route.estimate.feeCostsarray. You can see the amount, the tokens to be paid and their USD value.
Cross chain fees in Squid are always overpaid, and any excess gas which isn't used is refunded. This means that Squid's gas costs are on average 35% cheaper than we quote them.
Squid and Axelar support two modes of cross-chain execution. One regular mode and one express mode. You can toggle modes by setting the param
falsein your SDK or API route request.
For routes with
true, execution will take from 5-30 seconds. There is an additional fee for express, which is returned in the
route.estimate.feeCostsarray. You'll need to add this to the total fee costs for these routes.
We recommend making two calls to Squid every time you get a quote. One labelled as Squid, and one labelled as Squid Express.