> For the complete documentation index, see [llms.txt](https://docs.kanalabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kanalabs.io/perpetual-futures/kana-perps/for-developers-and-mms/installation-setup.md).

# Installation setup

## Prerequisites

Before using the API, ensure you have the following installed:

* **Node.js** (version 18 or higher)
* **npm** (for package management)

## Installation

Install required dependencies with these commands:

```bash
npm install dotenv axios @aptos-labs/ts-sdk
```

### Aptos Client & Account Setup

Configure your TypeScript environment with this template:

```typescript
// Import required packages
import dotenv from 'dotenv';
import axios from 'axios';
import { 
  AptosConfig, 
  Aptos, 
  Network, 
  Account, 
  Ed25519PrivateKey, 
  PrivateKeyVariants 
} from "@aptos-labs/ts-sdk";

// Load environment variables
dotenv.config();

// Initialize Aptos client
const config = new AptosConfig({ network: Network.TESTNET });
const aptos = new Aptos(config);

// Configure account
const formattedPrivateKey = PrivateKey.formatPrivateKey(
  process.env.APTOS_PRIVATEKEY || '',
  'ed25519' as PrivateKeyVariants
);

const account = Account.fromPrivateKey({
  privateKey: new Ed25519PrivateKey(formattedPrivateKey),
});
```
