0.0
No release in over 3 years
Low commit activity in last 3 years
JpStockRule is a utility for stock markets in Japan.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

JpStockRule

JpStockRule is a utility for stock markets in Japan.

You can get price limits and tick size of stocks.

Installation

Add this line to your application's Gemfile:

gem 'jp_stock_rule'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jp_stock_rule

Usage

Getting price limits:

JpStockRule.price_limit(300) # => 80

Getting tick size:

JpStockRule.tick_size(7000) # => 10

For TOPIX100 stocks:

JpStockRule.tick_size(7000, topix100: true) # => 1

Is the market open today?:

Date.today.jpx_business_day?

Getting the next market-open day:

Date.today.next_jpx_business_day

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kyanagi/jp_stock_rule.

License

The gem is available as open source under the terms of the MIT License.