Integrating Squid's SDK or API into an aggregator is easy.

First, choose whether you would like to integrate our Typescript SDK, or our API directly.

  • 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.

Special considerations for aggregators:

Gas fees and cross-chain fees

Cross chain fees are returned in the route.estimate.feeCosts array. 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.

Express and Regular transactions

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 expressEnabled to true or false in your SDK or API route request.

For routes with expressEnabled set to true, execution will take from 5-30 seconds. There is an additional fee for express, which is returned in the route.estimate.feeCosts array. 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.

Last updated