5.2.2 • Published 6 years ago
data-source-loader-qq v5.2.2
data-source-loader-qq
data-source loader for gu.qq with lru-cache
Install
$ npm install data-source-loader-qq --save
Usage
const Loader = require('data-source-loader-qq')
new Loader('sz000002', 'DAY').get(new Date)
.then(({
open,
close,
high,
low,
volume
}) => {
// do something ...
})
new Loader(code, span, {request, loaded})
- code
string
stock code - span
Enum<MONTH|WEEK|DAY|MINUTE60|MINUTE30|MINITE15|MINITE5>
time span - request
function(url, {code, span})=
- loaded
function(data)=NOOP
method to execute when the data loaded.
get(time)
Gets a candlestick data by time
- time
Date
the specified time.
Returns Candlestick
struct Candlestick
- open
- high
- low
- close
- volume
- time
get(...times)
- times
Array<Date>
Gets the latest datum.
Returns Array<Candlestick>
between(from: Date, to: Date)
- from
Date
left-closed border of a region - to
Date
right-closed border of a region
Returns Array<Candlestick>
License
MIT
5.2.2
6 years ago
5.2.1
6 years ago
5.2.0
6 years ago
5.1.0
6 years ago
5.0.2
6 years ago
5.0.1
6 years ago
5.0.0
6 years ago
4.1.1
6 years ago
4.1.0
6 years ago
4.0.0
6 years ago
3.3.3
7 years ago
3.3.2
7 years ago
3.3.1
7 years ago
3.0.0
7 years ago
2.0.0
7 years ago
1.2.0
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.0
7 years ago