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.

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.

Getting Started: Cross-chain Swaps

This example walks through the index.js code included in the EVMtoEVM API swap example.

Once you download the example folder evmToEVMSwap use 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

  • Executing the route transactions

  • Checking the status of the transactions

Last updated