0.0.3 • Published 2 years ago

mastrade-unofficial-api v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Mastrade/MasVN Unofficial API

This package is an unofficial API for Mastrade/MasVN

Installation

You can use NPM to install this package

npm install mastrade-unofficial-api

Or using PNPM:

pnpm add mastrade-unofficial-api

Usage

const { stockAPI } = require("mastrade-unofficial-api");

(async () => {
    let result = await stockAPI.get(["ACB"])
    console.log(result)
})()

Indexes will be rejected automatically

Result:

[
  {
    symbol: 'ACB',
    averagePrice: 21445,
    openPrice: 21500,
    closedPrice: 21400,
    matchVolume: 3000,
    highestPrice: 21500,
    lowestPrice: 21300,
    volume: 1366000,
    averageVolume10D: 4295030,
    averageVolume20D: 4537825,
    buyVolume: 891100,
    value: 29294000000,
    bid: [ [Object], [Object], [Object] ],
    ask: [ [Object], [Object], [Object] ],
    change: { value: 400, rate: 0.019 },
    foreign: { bought: 0, sold: 0, room: 0 },
    odd: {
      closed: 21200,
      change: [Object],
      volume: 888,
      value: 18910000,
      matchVolume: undefined
    },
    status: 'LO'
  }
]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

0.0.3

2 years ago

0.0.1

2 years ago

0.0.2

2 years ago