@request-sdk/fund
v0.0.11
Published
request sdk fund.
Downloads
2
Readme
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')