StockMarkit brings all the great stock information from Markit on Demand (http://dev.markitondemand.com/) to your ruby project.
Add it to your gemfile
gem 'stock-markit'
Install using bundler
bundle install
or install manually
gem install stock-markit
require 'stock-markit'
StockMarkit.lookup(:twtr) #> [ StockMarkit::Stock ]
require 'stock-markit'
StockMarkit.quote(:twtr) #> StockMarkit::Quote
You can put multiple elements on to a chart. Each element must be defined as a StockMarket::Element
object
price = StockMarkit::Element.new(:twtr, :price)
simple_moving_average = StockMarkit::Element.new(:twtr, :sma)
chart_options = {
normalized: false,
number_of_days: 365,
data_period: :day,
elements: [price, simple_moving_average]
}
chart = StockMarkit::Chart.new(options)
chart.fetch #> StockMarkit::ChartResult
The code is fully documented using yard.
yard server
Or you can view the generated docs here: http://www.rubydoc.info/github/parabuzzle/stock-markit/master
- fork the repository
- create a feature branch
- add your awesome code
- send a pull request
- have a beer
The MIT License (MIT)
Copyright (c) 2016 Michael Heijmans
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.