# hkstock-holdings

> Scrape HKExnews share holdings page and output JSON data

Latest version **0.2.1** (published 2014-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install hkstock-holdings
pnpm add hkstock-holdings
yarn add hkstock-holdings
bun add hkstock-holdings
```

Provides the command `hkstock-holdings`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2014-03-23 |
| First published | 2014-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | KY LEE |
| Maintainers | leesei |
| Keywords | scrape, stock, hkex, json |

## Links

- npm: https://www.npmjs.com/package/hkstock-holdings
- Repository: http://github.com/leesei/node-hkstock-holdings
- Homepage: https://github.com/leesei/node-hkstock-holdings
- Issues: http://github.com/leesei/node-hkstock-holdings/issues
- npm.io page: https://npm.io/package/hkstock-holdings

## Dependencies (4)

- [async](https://npm.io/package/async.md) *
- [lodash](https://npm.io/package/lodash.md) *
- [nomnom](https://npm.io/package/nomnom.md) *
- [scrapebp](https://npm.io/package/scrapebp.md) *

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.2.1 (latest) — 2014-03-23

## README

# node-hkstock-holdings

Scrape [HKExnews](hkexnews.hk/sdw/search/search_sdw_c.asp) share holdings page and output JSON data.

HKExnews will return data for the previous day if the day requested is a public holiday.

If the period is greater than `30` calender days, weekly data for each Friday within the period will be used.

> Note: `Date` object prototype will be extended by this package

## Installation

```bash
npm install hkstock-holdings
```

## Usage

See [bin/hkstock-holdings](bin/hkstock-holdings).

## Data Returned

```javascript
var _result = {
    code,  // code of the stock
    name,  // name of the stock
    // period specified by user
    startDate,
    endDate,
    // actual dates where data is retrieved
    // this is a subset of the input peroid (minus public holidays)
    period,
    series  // array with each element corresponding to data of one
            // parti over the period, filling missing records and have
            // some statistics computed, suitable for plotting
};
```

## Performance

> `user` field can be taken as the time spent by this (and under-lying) modules

### 20140211

```
time ./bin/hkstock-holdings 1 -t 1m -e 2014-01-31 -j

real    0m8.275s
user    0m2.512s
sys     0m0.288s
```

```
time ./bin/hkstock-holdings 700 -t 1m -e 2014-01-31 -j

real    0m8.108s
user    0m2.360s
sys     0m0.196s
```

### 20140223

```
time ./bin/hkstock-holdings 1 -t 1m -e 2014-01-31 -j

real    0m7.342s
user    0m2.188s
sys     0m0.164s
```

```
time ./bin/hkstock-holdings 700 -t 1m -e 2014-01-31 -j

real    0m5.460s
user    0m2.124s
sys    0m0.184s
```

---
_Source: https://npm.io/package/hkstock-holdings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
