# kraken-api

> kraken.com API client library for NodeJS

Latest version **1.0.2** (published 2024-08-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install kraken-api
pnpm add kraken-api
yarn add kraken-api
bun add kraken-api
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2024-08-12 |
| First published | 2013-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 2 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 404 |
| Author | Robert Myers |
| Maintainers | nothingisdead |
| Keywords | kraken, api, btc, bitcoin |

## Links

- npm: https://www.npmjs.com/package/kraken-api
- Repository: https://github.com/nothingisdead/npm-kraken-api
- Homepage: https://github.com/nothingisdead/npm-kraken-api#readme
- Issues: https://github.com/nothingisdead/npm-kraken-api/issues
- npm.io page: https://npm.io/package/kraken-api

## Dependencies (2)

- [qs](https://npm.io/package/qs.md) ^6.9.4
- [got](https://npm.io/package/got.md) ^11.1.4

## Recent versions

- 1.0.2 (latest) — 2024-08-12
- 1.0.1 — 2020-05-16
- 1.0.0 — 2017-07-23
- 0.1.7 — 2015-09-07
- 0.1.6 — 2015-01-03
- 0.1.5 — 2014-06-21
- 0.1.4 — 2014-04-20
- 0.1.3 — 2014-02-11
- 0.1.2 — 2014-01-09
- 0.1.1 — 2013-12-01
- 0.1.0 — 2013-11-30
- 0.0.9 — 2013-11-27
- 0.0.8 — 2013-11-25
- 0.0.7 — 2013-11-22
- 0.0.6 — 2013-11-22
- … 5 more at https://npm.io/package/kraken-api/versions

## README

# DEPRECATED
## This project has been deprecated. Please see [#66](https://github.com/nothingisdead/npm-kraken-api/issues/66). I suggest using the [REST API](https://docs.kraken.com/api/docs/guides/spot-rest-intro) directly with [fetch](https://nodejs.org/dist/latest/docs/api/globals.html#fetch).

Node Kraken
===========

NodeJS Client Library for the Kraken (kraken.com) API

This is an asynchronous node js client for the kraken.com API. It exposes all the API methods found here: https://www.kraken.com/help/api through the ```api``` method.

### Installation

```bash
npm install kraken-api
```

### Example Usage:

```javascript
const key          = '...'; // API Key
const secret       = '...'; // API Private Key
const KrakenClient = require('kraken-api');
const kraken       = new KrakenClient(key, secret);

(async () => {
	// Display user's balance
	console.log(await kraken.api('Balance'));

	// Get Ticker Info
	console.log(await kraken.api('Ticker', { pair : 'XXBTZUSD' }));
})();
```

### Updates:

#### 1.0.1:
- Update dependencies
- Update required NodeJS version: [#42](https://github.com/nothingisdead/npm-kraken-api/pull/42)
- Add GetWebSocketsToken private method: [#65](https://github.com/nothingisdead/npm-kraken-api/pull/65)
- Update README: [#44](https://github.com/nothingisdead/npm-kraken-api/pull/44)

#### 1.0.0:

- All methods return a promise.
- The second argument (parameters) can be omitted.
- The third argument to the constructor can be an object (configuration) or a string (OTP), for backwards compatibility.

#### 0.1.0:

The callback passed to the ```api``` function conforms to the Node.js standard of

```javascript
function(error, data) {
	// ...
}
```

Thanks to @tehsenaus and @petermrg for pointing this out.

### Credit:

I used the example php implementation at https://github.com/payward/kraken-api-client and the python implementation at https://github.com/veox/python3-krakenex as references.

BTC donation address: 12X8GyUpfYxEP7sh1QaU4ngWYpzXJByQn5

---
_Source: https://npm.io/package/kraken-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
