> For the complete documentation index, see [llms.txt](https://docs.byscript.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.byscript.io/exchange/kraken.md).

# Kraken

### Before we start with API keys

1. Kraken has introduced a new **Kraken Pro** version that offers the same API keys creation feature. So to create new API keys, you need to switch to the **Kraken Classic** or **Kraken Pro**:

<figure><img src="/files/ddLgvUDO4jKDJcT5Qfi7" alt=""><figcaption></figcaption></figure>

If you stay just on Kraken and try to create API keys, you will still be prompted to move to **Kraken Pro**:

<figure><img src="/files/14jC0StxAi4btnrHr8Jl" alt=""><figcaption></figcaption></figure>

2. The process of the API keys creation on **Kraken Classic** has not changed. Here in this article, you will be given screenshots of both **Classic** and **Pro** versions.

## Kraken Pro

#### 1. Go to Kraken

Log in or create a new account on [https://www.kraken.com/](http://kraken.pxf.io/3commas).

#### 2. Switch to Kraken Pro

Or go straight to [Kraken Pro website](https://pro.kraken.com/app).

<figure><img src="/files/m2400tHHVOav9QxiuwKs" alt=""><figcaption></figcaption></figure>

#### 3. Go to the [Settings page](https://pro.kraken.com/app/settings/account) and click Create API key

<figure><img src="/files/mmFYVrXIgrSizMfCqPQx" alt=""><figcaption></figcaption></figure>

#### 4. Name your key

When you have multiple APIs, a proper name helps to manage it.

<figure><img src="/files/46gehF7K1VLEzzKn30E7" alt=""><figcaption></figcaption></figure>

#### 5. Select permissions

You must enable them as in the screenshot below:

* Funds permissions
  * Query
* Orders and trades
  * Query open orders & trades
  * Query closed orders & trades
  * Create & modify orders
  * Cancel & close orders
* Data
  * Query ledger entries

Enable **WebSocket interface.**

ATTENTION!

If you don't check at least one of the permissions, it may result in an error that will block you from further trading! If you have any error like "Not enough permission for API keys", please update the API keys permission or create new keys with the correct permissions.

#### 6. Enable the option for IP Whitelisting and add whitelisted IP addresses

<figure><img src="/files/C1VI7YajKxYMu4cjYKUZ" alt=""><figcaption></figcaption></figure>

1. Enable the **IP address restriction** option
2. Go to the connecting Kraken exchange page and copy the IP range from there:

<figure><img src="/files/CCaV069hPMxlpIa6bgCL" alt=""><figcaption></figcaption></figure>

#### 7. Enable Custom nonce window

Enter 2000000 (2 million):

<figure><img src="/files/iCG8vSgDITqoBJw1oKGM" alt=""><figcaption></figcaption></figure>

#### 8. Do not configure any other options and click "Generate key"

<figure><img src="/files/Ok2xX61s2L5CTpvBJU9m" alt=""><figcaption></figcaption></figure>

#### 9. Connect Kraken with created API keys

Enter the API keys into the appropriate fields:

<figure><img src="/files/jQ8TLs8pH6irsxyLO57F" alt=""><figcaption></figcaption></figure>

Please note that the **Private key** on the screenshot below refers to the **API Secret** field on the exchange connection page:<br>

<figure><img src="/files/3s7oJyEcknd0cYa3LMYD" alt=""><figcaption></figcaption></figure>

## Kraken Classic

#### 1. Go to Kraken

Log in or create a new account on <https://www.kraken.com/>.

#### 2. Switch to Kraken Classic

<figure><img src="/files/Qi48QZxL4KsRgB0HjCrS" alt=""><figcaption></figcaption></figure>

#### 3. Follow to the API page

Click on the profile icon on the top right corner, click on "Security" then "API":

<figure><img src="/files/oYVCH9v2SDyeqUhhptaU" alt=""><figcaption></figcaption></figure>

#### 4. Click on "Add key"

<figure><img src="/files/F2yAWZtIsa8cC5ncylPX" alt=""><figcaption></figcaption></figure>

#### 5. Name your key

When you have multiple APIs, a proper name helps to manage it.

⚠️IMPORTANT: Please set the "Nonce window" value to 2 000 000!⚠️

<figure><img src="/files/svDvuwfNhTDgLWq10Shc" alt=""><figcaption></figcaption></figure>

#### 6. Select permissions

You must enable them as in the screenshot below:

* **Important: Please Ensure "Nonce Window" is set to 2000000 (2 million)**
* Query Funds
* Query Open Orders & Trades
* Query Closed Orders & Trades
* Modify Orders
* Cancel/Close Trades
* Query Ledger Entries
* Access WebSockets API

<figure><img src="/files/2XBlMiTFWdVc57qfNeWb" alt=""><figcaption></figcaption></figure>

ATTENTION!

If you don't check at least one of the permissions, it may result in an error that will block you from further trading! If you have any error like "Not enough permission for API keys", please update the API keys permission or create new keys with the correct permissions.

#### 7. Enable the option for IP Whitelisting

<figure><img src="/files/uL8OuTaU5NEJ2OWHeiRU" alt=""><figcaption></figcaption></figure>

1. Enable the option for **IP whitelisting**
2. Click the "Add an IP address or range" button
3. Go to the connecting Kraken exchange page and copy the IP range from there:

<figure><img src="/files/RXr03BsiNVj1s3TbkBnD" alt=""><figcaption></figcaption></figure>

#### 8. Do not configure any other options and click "Generate key"

<figure><img src="/files/HKesyLriIisKpHuG0FV0" alt=""><figcaption></figcaption></figure>

#### 9. Connect Kraken with created API keys

Enter the API keys into the appropriate fields:

<figure><img src="/files/KIu8xCvetCYhWsHRFKSc" alt=""><figcaption></figcaption></figure>

Please note that the **Private key** on the screenshot below refers to the **API Secret** field on the exchange connection page:

<figure><img src="/files/hYSj8n2nhhBGzjYJJ6aU" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.byscript.io/exchange/kraken.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
