0.3.1 • Published 6 days ago

marcal v0.3.1

Weekly downloads
10
License
MIT
Repository
github
Last release
6 days ago

Stock Market Calendar

MarCal is a TypeScript library that provides a stock market calendar for stock trading applications. For now, it provides the calendar for the years 2023, 2024 and 2025.

Note that all the U.S. stock exchanges open at the same time. The three major stock exchanges NYSE, NASDAQ, and the American Stock Exchange synchronize opening times.

Install

npm i marcal

Usage

import { MarCal, MarCalType } from 'marcal';

const marCal: MarCalType = new MarCal();

const open: boolean = marCal.isMarketOpen();
if (open) {
  console.log('US market is open')
} else {
  console.log('US market is closed')
}

Methods

// Returns true if US market is open. Otherwise, false.
isMarketOpen(): boolean

// Returns the number of remaining minutes before the market closes.
minutesToClose(): number

Contributions

Contributions are welcome and can be made by submitting GitHub pull requests to this repository. In general, the MarCal source code follows Airbnb JavaScript Style Guide and the rules specified in .eslintrc.json file.

License

This source code is available to everyone under the standard MIT LICENSE.

0.3.1

6 days ago

0.3.0

8 months ago

0.1.2

9 months ago

0.2.0

8 months ago

0.1.0

10 months ago

0.1.1

10 months ago

0.0.7

2 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

4 years ago