# Set up the SDK

To get started, you have to instantiate and configure the AKKA SDK:

```typescript
import { AKKA } from '@akkafinance/sdk'
const akka = new AKKA({})

// or

const { AKKA } = require("@akkafinance/sdk")
const akka = new AKKA({})
```

The optional `config` parameter can be used to pass custom configuration to the SDK (Currently, only api url can be customized, but in the near future, many personal settings can be made):

```typescript
type ConfigUpdate = {
  apiUrl: string
}
```

The `apiUrl` defines which backend should be called. This only has to be edited when accessing a dedicated API endpoint.

{% hint style="info" %}
If you are interested in a dedicated API endpoint for your service, reach out via our [Discord](https://discord.gg/lifi) or file an issue in our repository [here](https://github.com/lifinance/sdk).
{% endhint %}

## Node.js Compatibility

SDK uses native Fetch API and in Node.js 16 and lower versions `fetch` is not natively included, so it needs to be added manually. To provide access to Fetch API you need to patch `global` object using [node-fetch](https://github.com/node-fetch/node-fetch#providing-global-access) or [cross-fetch](https://github.com/lquixada/cross-fetch).&#x20;

Here is an [example](https://github.com/lifinance/sdk/blob/main/test/setupEnv.ts) using cross-fetch:

```typescript
import fetch, { Headers, Request, Response } from 'cross-fetch'

if (!globalThis.fetch) {
  const globalThisAny: any = globalThis
  globalThisAny.fetch = fetch
  globalThisAny.Headers = Headers
  globalThisAny.Request = Request
  globalThisAny.Response = Response
}
```


---

# 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.akka.finance/install-akka-js-sdk/set-up-the-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.
