Installing our SDK

Install the SDK via npm or yarn.

npm install --save @0xsquid/sdk

or

yarn add @0xsquid/sdk

Get an integratorId

To use the SDK, you need to register an integratorId with the Squid Team, please complete this form to acquire one.

Base URLs

Mainnet: https://api.squidrouter.com

Testnet: https://testnet.api.squidrouter.com

Code example

import { Squid } from "@0xsquid/sdk";

(async () => {
  // instantiate the SDK
  const squid = new Squid();

  squid.setConfig({
    baseUrl: "https://testnet.api.squidrouter.com", // for mainnet use "https://api.0xsquid.com"
    integratorId: "your-integrator-id"
  });

  // init the SDK
  await squid.init();
  console.log("Squid inited");
})();

Advanced configuration

Check out Advanced set up if you're a power user.

Last updated