# SDK

## Overview

The SDK is ideal for integrating cross-chain swaps, bridges, and deposits into applications that utilize JavaScript or Typescript, while the API can be used for similar purposes in a more language-agnostic manner.

## Types

We recommend using the types from our npm package. If you are using our API without our SDK, you can find the types inside `node_modules/@0xsquid/sdk/dist/types/index.d.ts` after [Broken link](https://docs.squidrouter.com/api-and-sdk-integration/broken-reference "mention")

```typescript
import { Token, ChainData } from '@0xsquid/sdk/dist/types'
```

## **Installing the SDK**

### From the terminal, install [our SDK](https://www.npmjs.com/package/@0xsquid/sdk)

```bash
npm install --save @0xsquid/sdk@2.12.0 # or higher
```

### Now in your typescript file

```typescript
import { Squid } from "@0xsquid/sdk"; // Import Squid SDK

// Initialize the Squid client with the base URL and integrator ID
const getSDK = (): Squid => {
  const squid = new Squid({
    baseUrl: "https://v2.api.squidrouter.com",
    integratorId: integratorId,
  });
  return squid;
};

```

Next, explore the first [**Swap & Bridging with the Squid SDK** ](https://docs.squidrouter.com/old-v2-documentation-deprecated/api/swap-and-bridge-example)to understand the fundamentals.
