@request-sdk/fund

0.0.11 • Public • Published

fund

fund request sdk.

Usage

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

const logger = console

const fund = new Api({
  logger
})

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

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

methods

  • get
fund.get('http://t.com/api/xxx', {
  a: 'b'
})
  • post
fund.post('http://t.com/api/xxx', {
  a: 'b'
})
  • loadDataFromPrevNDays
fund.loadDataFromPrevNDays('004744', 11)
  • loadDataFromPrevNDaysV2
fund.loadDataFromPrevNDaysV2({
  code: '004744',
  days: 11,
  dateInfo: {
    date: 1669132800000
  }
})
  • loadMaData
fund.loadMaData({
  code: '004744',
  limit: 11,
  deflate: x => x.unitNetWorth,
  dateInfo: {
    date: 1669132800000
  }
})
  • loadCurrentMaData
fund.loadCurrentMaData({
  code: '004744',
  limit: 11,
  deflate: x => x.unitNetWorth
})
  • getCurrentData
fund.getCurrentData('004744')

Readme

Keywords

Package Sidebar

Install

npm i @request-sdk/fund

Weekly Downloads

1

Version

0.0.11

License

MIT

Unpacked Size

9.07 kB

Total Files

5

Last publish

Collaborators

  • alfieri