JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q25998F
  • License MIT

data-source loader for gu.qq.com

Package Exports

  • data-source-loader-qq

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (data-source-loader-qq) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

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').get({
  time: + new Date,
  span: 'DAY'
})
.then(({
  open,
  close,
  high,
  low,
  volume
}) => {

  // do something ...
})

get({span, time})

Gets a candlestick data by time

  • span Enum.<MONTH|WEEK|DAY|MINUTE60|MINUTE30|MINITE15|MINITE5> time span
  • time Date the specified time.

Returns Candlestick

struct Candlestick

  • open
  • high
  • low
  • close
  • volume
  • time

get({span, limit})

Gets the latest limit pieces of data

  • limit Number= if limit is not a number, then it will no limit.

Returns Array.<Candlestick>

License

MIT