@huamu/stockjs v0.0.1
Modules
api
api module
- api
- ~getHistory(code, startDate, endDate) ⇒ Promise.<Array>
- ~isOpen(date) ⇒ Promise.<Boolean>
- ~getAll() ⇒ Promise.<Array>
- ~getTodayAll() ⇒ Promise.<Array>
- ~getDaDan(code) ⇒ Promise.<Object>
- ~getUpDown(code) ⇒ Object
api~getHistory(code, startDate, endDate) ⇒ Promise.<Array>
获取股票历史行情数据
Kind: inner method of api
Returns: Promise.<Array> - {
"date": "2021-08-17",
"symbol": "sz301046",
"code": "301046",
"name": "N能辉",
"trade": 52.05,
"pricechange": 43.71,
"changepercent": 524.101,
"buy": 52.04,
"sell": 52.05,
"settlement": 8.34,
"open": 48,
"high": 55.55,
"low": 45.2,
"volume": 26654748,
"amount": 1351235060,
"ticktime": "15:35:00",
"per": 0,
"pb": 12.815,
"mktcap": 778043.4,
"nmc": 184454.6859,
"turnoverratio": 75.2152
}
Param | Type | Description |
---|---|---|
code | String | 股票代码,如'600001' |
startDate | String | 开始日期,如'2021-08-17' |
endDate | String | 结束日期,如'2021-08-17' |
api~isOpen(date) ⇒ Promise.<Boolean>
查看指定日期是否开盘
Kind: inner method of api
Returns: Promise.<Boolean> - true or false
Param | Type | Description |
---|---|---|
date | String | 日期,如'2021-08-08' |
api~getAll() ⇒ Promise.<Array>
获取今日全部股票行情
Kind: inner method of api
Returns: Promise.<Array> - 数组,某一个item,如下:
api~getTodayAll() ⇒ Promise.<Array>
获取今日全部股票行情
Kind: inner method of api
Returns: Promise.<Array> - 数组,某一个item
api~getDaDan(code) ⇒ Promise.<Object>
获取大单信息
Kind: inner method of api
Returns: Promise.<Object> - {
superFlow,
bigFlow,
middleFlow,
smallFlow
}
Param | Type | Description |
---|---|---|
code | String | 股票代码 |
api~getUpDown(code) ⇒ Object
获取看涨和看跌的人数
Kind: inner method of api
Returns: Object - {
up: 1,
down: 2
}
Param | Type | Description |
---|---|---|
code | String | 代码 |
filter
filter module
- filter
- ~removeST(list) ⇒ Array
- ~removeKechuang(list) ⇒ Array
- ~byPrice(list, lowPrice, highPrice) ⇒ Array
- ~byRatio(list, lowRatio, highRatio) ⇒ Array
- ~byChangePercent(list, lowPercent, highPercent) ⇒ Array
- ~byAmount(list, lowAmount, lowAmount) ⇒ Array
- ~getRedT(list) ⇒ Array
- ~getRealRedT(list) ⇒ Array
- ~getChuangye(list) ⇒ Array
- ~macd(ticks) ⇒ object
filter~removeST(list) ⇒ Array
移除ST
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
filter~removeKechuang(list) ⇒ Array
移除科创股(因为我穷,还没法买😢)
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
filter~byPrice(list, lowPrice, highPrice) ⇒ Array
根据价格,筛选
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Default | Description |
---|---|---|---|
list | Array | 行情数组 | |
lowPrice | Number | 0 | 最低价,默认0 |
highPrice | Number | 3000 | 最高价,默认3000 |
filter~byRatio(list, lowRatio, highRatio) ⇒ Array
根据换手率,筛选
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Default | Description |
---|---|---|---|
list | Array | 行情数组 | |
lowRatio | Number | 0 | 最低换手率,默认0 |
highRatio | Number | 100 | 最高换手率,默认100 |
filter~byChangePercent(list, lowPercent, highPercent) ⇒ Array
根据涨跌幅度,筛选
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Default | Description |
---|---|---|---|
list | Array | 行情数组 | |
lowPercent | Number | 最低涨跌幅度,默认-20 | |
highPercent | Number | 20 | 最高涨跌幅度,默认20 |
filter~byAmount(list, lowAmount, lowAmount) ⇒ Array
根据成交额,筛选
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Default | Description |
---|---|---|---|
list | Aarray | 行情数组 | |
lowAmount | Number | 10000000 | 最低成交额,默认10000000(一千万) |
lowAmount | Number | 最高成交额 |
filter~getRedT(list) ⇒ Array
获取redT,但不是平头
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
filter~getRealRedT(list) ⇒ Array
获取平头redT,
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
filter~getChuangye(list) ⇒ Array
获取创业股
Kind: inner method of filter
Returns: Array - 数组
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
filter~macd(ticks) ⇒ object
获取macd
Kind: inner method of filter
Returns: object - ,如下:{
macds,
diffs,
deas
}
Param | Type | Description |
---|---|---|
ticks | array | 价格数组,最近一日的价格在数组第一个 |
getter
getter module
- getter
- ~withRedT(list) ⇒ Array
- ~withMacd(list) ⇒ Promise.<Array>
- ~withDadan(list) ⇒ Promise.<Array>
getter~withRedT(list) ⇒ Array
分析,红T
Kind: inner method of getter
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
getter~withMacd(list) ⇒ Promise.<Array>
分析,macd
Kind: inner method of getter
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
getter~withDadan(list) ⇒ Promise.<Array>
返回大单入的股
Kind: inner method of getter
Param | Type | Description |
---|---|---|
list | Array | 行情数组 |
2 years ago