0.0.1 • Published 9 years ago

world-exchanges v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

world-exchanges

Get opening and closing times of world exchanges.

Data from List of stock exchange opening times Wikipedia page.

NPM

Install

npm install world-exchanges

Usage

var worldExchanges = require('world-exchanges');

console.log(new Date()); // "Thu May 28 2015 13:43:31 GMT-0700 (PDT)"
console.log(worldExchanges('NYSE').isOpen(/* optional Date */)); // false
console.log(worldExchanges('NYSE').isClosed(/* optional Date */)); // true
console.log(worldExchanges('NYSE').getOpenTime()); // "2015-05-28T14:30:00.000Z" (always in GMT)
console.log(worldExchanges('NYSE').getCloseTime()); // "2015-05-28T21:00:00.000Z" (always in GMT)
console.log(worldExchanges('NYSE').getTimezone()); // "EST"
console.log(worldExchanges('NYSE').getTimezoneDelta()); // "-5"
console.log(worldExchanges('NYSE').getName()); // "New York Stock Exchange (NYSE)"
console.log(worldExchanges.getList()); // ['AMS', 'ASE', 'ASX', 'BCBA', ...]

Test

npm test

Crawl Wikipedia page and save data to JSON file.

npm run-script crawl

License

MIT