> 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/~/changes/JpxQ3y4p9AD4BHUqimHx/products-and-features/trading-apis/kana-perps-api/installation-setup.md).

# Installation Setup

### Supported Markets

This API provides information for the following trading markets:

<table data-header-hidden><thead><tr><th width="350"></th><th width="179"></th><th></th></tr></thead><tbody><tr><td><strong>Asset</strong></td><td><strong>Market ID</strong></td><td><strong>Description</strong></td></tr><tr><td>APT/USDC</td><td>301</td><td>Aptos-based trading market.</td></tr><tr><td>BTC/USDC</td><td>302</td><td>Bitcoin-based trading market.</td></tr><tr><td>ETH/USDC</td><td>303</td><td>Ethereum-based trading market.</td></tr></tbody></table>

#### Prerequisites

Before using the API, ensure you have the following:

1. **Node.js**: Install version 16 or higher. [Download here](https://nodejs.org/).
2. **npm**: Verify npm is installed to manage packages.

#### Install Required Packages

Run these commands to install the required dependencies:

1. Install `dotenv` and `axios`:

   ```bash
   npm install dotenv axios
   ```
2. Install the Aptos SDK for TypeScript:

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

#### Example Setup in TypeScript

Create a file, e.g., `setup.ts`, and use the following code:

```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 from .env file
dotenv.config();

// Setup the client
const config = new AptosConfig({ network: Network.TESTNET });
const aptos = new Aptos(config);
const formattedPrivateKey = PrivateKey.formatPrivateKey(
    process.env.APTOS_PRIVATEKEY || '',
    'ed25519' as PrivateKeyVariants
);
const account = Account.fromPrivateKey({
    privateKey: new Ed25519PrivateKey(formattedPrivateKey),
});
```
