For the complete documentation index, see llms.txt. This page is also available as Markdown.
API
Overview
Squid API is for devs using a client other than javascript. The API offers nearly the full functionality of the SDK, and is only missing some helper functions for front end work.
Base URL
All API endpoints use the following base URL:
https://v2.api.squidrouter.com/v2/
Squid Intents (Enabled by Default)
Squid Intents is enabled by default on all integrations. When a Squid Intents route is used, you must pass the quoteId in the status call for the transaction to be executed successfully. Failing to poll status with the quoteId will cause the transaction to fail.
After executing a Squid Intents transaction, you must call the status API with the quoteId parameter. See Track Status for details.
Below is the most basic example of building with Squid, a cross-chain swap. In this example, we will cover the key concepts involved in the swap.
To find all examples, please visit our examples repo.
Once you download the example folder evmToEVMSwapuse the yarn install to install the necessary packages and create a .env file modeled based off the .env.example folder.
The following actions take place in the index.js:
Loading necessary packages and environmental variables
Defining route parameters, RPC provider, and wallet signer
Creating the route request and the transaction status functions
Defining the route parameters and requesting the route