0.0.11 • Published 1 year ago

@request-sdk/stock v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

stock

stock request sdk.

Usage

const Api = require('@request-sdk/stock')

const logger = console

const api = new Api({
  logger
})

const ret = await api.get('http://t.com/api/xxx', {
  a: 'b'
}, {
  responseType: 'json'
})

const ret2 = await api.post('http://t.com/api/xxx', {
  a: 'b'
}, {
  responseType: 'json'
})

methods

  • get
api.get('http://t.com/api/xxx', {
  a: 'b'
}, {
  responseType: 'json'
})
  • post
api.post('http://t.com/api/xxx', {
  a: 'b'
}, {
  responseType: 'json'
})
  • getCurrentInfo
api.getCurrentInfo('600900')
  • loadHistoryData
api.loadHistoryData({
  code: '600900', dataLen: 11, scale: 240
})
  • loadDataFromPrevNDays
api.loadDataFromPrevNDays('600900', 11)
  • loadMaData
api.loadMaData({
  code: '600900', limit: 11, deflate: x => x.close
})
  • loadMdData
api.loadMdData({
  code: '600900', limit: 11, deflate: x => x.close
})
  • loadCciData
api.loadCciData({
  code: '600900', limit: 14, coefficient: 0.015
})
  • loadRsiData
api.loadRsiData({
  code: '600900', limit: 12, deflate: x => x.close
})
0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

2 years ago

0.0.2

2 years ago