Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaelzhang/node-candlesticks
The thing to manage candlesticks
https://github.com/kaelzhang/node-candlesticks
candlestick fintech stock
Last synced: 17 days ago
JSON representation
The thing to manage candlesticks
- Host: GitHub
- URL: https://github.com/kaelzhang/node-candlesticks
- Owner: kaelzhang
- License: other
- Created: 2017-09-12T14:39:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T12:30:07.000Z (almost 7 years ago)
- Last Synced: 2024-04-15T12:33:01.297Z (7 months ago)
- Topics: candlestick, fintech, stock
- Language: JavaScript
- Size: 23.4 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE-MIT
Awesome Lists containing this project
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)# 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)
### candlesticks.update(...data)
- **data** `Array.`
### candlesticks.open
Returns `Array.` open prices
### candlesticks.high
Returns `Array.`
### candlesticks.low
Returns `Array.`
### candlesticks.close
Returns `Array.`
### candlesticks.volume
Returns `Array.`
### candlesticks.time
Returns `Array.`
## class: Candlestick(...ArrayDatum)
### Candlestick.from(datum: ObjectDatum | ArrayDatum | Candlestick)
## License
MIT