# candlesticks

> The thing to manage stock candlesticks

Latest version **1.3.0** (published 2017-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install candlesticks
pnpm add candlesticks
yarn add candlesticks
bun add candlesticks
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2017-11-22 |
| First published | 2017-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=4 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | kaelzhang |
| Maintainers | kael |
| Keywords | candlesticks, candlestick, fintech, stock, bullish, bearish |

## Links

- npm: https://www.npmjs.com/package/candlesticks
- Repository: https://github.com/kaelzhang/node-candlesticks
- Homepage: https://github.com/kaelzhang/node-candlesticks#readme
- Issues: https://github.com/kaelzhang/node-candlesticks/issues
- npm.io page: https://npm.io/package/candlesticks

## Dependencies (4)

- [delegates](https://npm.io/package/delegates.md) ^1.0.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.23.0
- [approximately-equal](https://npm.io/package/approximately-equal.md) ^0.1.8
- [lodash.findlastindex](https://npm.io/package/lodash.findlastindex.md) ^4.6.0

## Alternatives

- [cron](https://npm.io/package/cron.md) — 4.9M weekly downloads
- [@vercel/queue](https://npm.io/package/@vercel/queue.md) — 731.6K weekly downloads
- [create-sonicjs](https://npm.io/package/create-sonicjs.md) — 1.6K weekly downloads
- [@exellix/jobs-api](https://npm.io/package/@exellix/jobs-api.md) — 941 weekly downloads
- [@forwardimpact/libskill](https://npm.io/package/@forwardimpact/libskill.md) — 575 weekly downloads

## Recent versions

- 1.3.0 (latest) — 2017-11-22
- 1.2.1 — 2017-11-21
- 1.2.0 — 2017-11-21
- 1.1.0 — 2017-11-21
- 1.0.3 — 2017-11-21
- 1.0.2 — 2017-09-26
- 1.0.1 — 2017-09-26
- 1.0.0 — 2017-09-26

## README

[![Build Status](https://travis-ci.org/kaelzhang/node-candlesticks.svg?branch=master)](https://travis-ci.org/kaelzhang/node-candlesticks)
[![Coverage](https://codecov.io/gh/kaelzhang/node-candlesticks/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/node-candlesticks)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/node-candlesticks?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/node-candlesticks)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/candlesticks.svg)](http://badge.fury.io/js/candlesticks)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/candlesticks.svg)](https://www.npmjs.org/package/candlesticks)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/node-candlesticks.svg)](https://david-dm.org/kaelzhang/node-candlesticks)
-->

# candlesticks

The thing to manage candlesticks.

## Install

```sh
$ npm install candlesticks
```

## Usage

```js
import {
  Candlesticks,
  Candlestick
} from 'candlesticks'

const candlesticks = new Candlesticks({
  // Determine whether the candlestick is closed
  closed (time: Date): Boolean {
    // ...
  },
  transform (datum: RawDatum): ArrayDatum {

  }
})
```

### struct `ArrayDatum`

```js
[
  open,   // Number
  high,   // Number
  low,    // Number
  close,  // Number
  volume, // Number
  time    // Date
]
```

### struct `ObjectDatum`

```js
{
  open,   // Number
  high,   // Number
  low,    // Number
  close,  // Number
  volume, // Number
  time    // Date
}
```

## class: Candlesticks(options)

### Candlesticks.from(data: Array<ObjectDatum | ArrayDatum | Candlestick>)

### candlesticks.update(...data)

- **data** `Array.<RawDatum>`

### candlesticks.open

Returns `Array.<Number>` open prices

### candlesticks.high

Returns `Array.<Number>`

### candlesticks.low

Returns `Array.<Number>`

### candlesticks.close

Returns `Array.<Number>`

### candlesticks.volume

Returns `Array.<Number>`

### candlesticks.time

Returns `Array.<Date>`

## class: Candlestick(...ArrayDatum)

### Candlestick.from(datum: ObjectDatum | ArrayDatum | Candlestick)

## License

MIT

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