# 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 mention](broken://pages/pQzBnlnLhbC4MQnwWa7c)

```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.8.20 # 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** ](/old-v2-documentation-deprecated/api/swap-and-bridge-example.md)to understand the fundamentals.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.squidrouter.com/old-v2-documentation-deprecated/sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
