<commit_before># kraken-exchange-api
[![Build Status](https://travis-ci.org/lucklo/kraken-exchange-api.svg?branch=master)](https://travis-ci.org/lucklo/kraken-exchange-api)
# Quick Start

## Status
This project is still in very early development and some major functionality is probably missing.
All documented endpoints and objects should be usable though.

If you like to contribute feel free to contact author of this repo or push `Pull Request` with changes.


## Installation
Please install this package using `npm`
kraken-exchange-node-api
```bash
npm install kraken-exchange-node-api
```

## Requirements
This library was written in ES2015 code. We highly recommenda any version of Node.js greater than 7.


## API Clients
API Clients provide simple way to use Kraken API directly without need to use Classes that we provided.

### Public API Client
Kraken Exchange provide set of endpoints that don't require authentication
to get basic information about Market. See [`Public market data section at Kraken Docs`](https://www.kraken.com/help/api#public-market-data) 

### Authenticated API Client
To access Private API from Kraken you need to request ApiKey and ApiSecret from your Account Settings in Kraken Dashboard.


## Built-In Kraken API Support
Every Class we created provide both `Promise` and `callback` interface.

### Kraken.Time
#### getUnixTime()
```javascript
Kraken.Time.getUnixTime(/** optional **/ callback) 
```
* Arguments:
    * `callback` (optional)   
* Returns: `Promise`
    * Resolved Value Type: `integer`
#### getTimeinRfc1123()
```javascript
Kraken.Time.getTimeInRfc1123(/** optional **/ callback) 
```
Returns RFC1123 compilant timestamp string.

* Arguments:
    * `callback` (optional)   
* Returns: `Promise`
    * Resolved Value Type: `string`

##### Example Usage:
```javascript
const KrakenTime = require('kraken-exchange-node-api').Time
const time = new KrakenTime

// Promise Based
time<commit_msg>Changed a little bit example of usage<commit_after># kraken-exchange-api
[![Build Status](https://travis-ci.org/lucklo/kraken-exchange-api.svg?branch=master)](https://travis-ci.org/lucklo/kraken-exchange-api)
# Quick Start

## Status
This project is still in very early development and some major functionality is probably missing.
All documented endpoints and objects should be usable though.

If you like to contribute feel free to contact author of this repo or push `Pull Request` with changes.


## Installation
Please install this package using `npm`
kraken-exchange-node-api
```bash
npm install kraken-exchange-node-api
```

## Requirements
This library was written in ES2015 code. We highly recommenda any version of Node.js greater than 7.


## API Clients
API Clients provide simple way to use Kraken API directly without need to use Classes that we provided.

### Public API Client
Kraken Exchange provide set of endpoints that don't require authentication
to get basic information about Market. See [`Public market data section at Kraken Docs`](https://www.kraken.com/help/api#public-market-data) 

### Authenticated API Client
To access Private API from Kraken you need to request ApiKey and ApiSecret from your Account Settings in Kraken Dashboard.


## Built-In Kraken API Support
Every Class we created provide both `Promise` and `callback` interface.

### Kraken.Time
#### getUnixTime()
```javascript
Kraken.Time.getUnixTime(/** optional **/ callback) 
```
* Arguments:
    * `callback` (optional)   
* Returns: `Promise`
    * Resolved Value Type: `integer`
#### getTimeinRfc1123()
```javascript
Kraken.Time.getTimeInRfc1123(/** optional **/ callback) 
```
Returns RFC1123 compilant timestamp string.

* Arguments:
    * `callback` (optional)   
* Returns: `Promise`
    * Resolved Value Type: `string`

##### Example Usage:
```javascript
const Kraken = require('kraken-exchange-node-api')
const time = new Kraken.Time()

// Promise Based
time
{'fraction_non_alphanumeric': 0.10348360655737705, 'fraction_numerical': 0.008709016393442622, 'mean_word_length': 4.717423133235725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583785', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1104, 'n_words': 427}