# barchart Ruby client library for querying some of [Barchart OnDemand's](http://www.barchartondemand.com/) APIs. They have excellent documentation of their APIs [here](http://www.barchartondemand.com/api.php). # Configuration ```ruby Barchart.configure do |config| config.api_key = 'your_api_key' config.api_base_url = 'http://ondemand.websol.barchart.com' end ``` # Usage ## Barchart::Quote ```ruby Barchart::Quote.get!('AAPL') ``` and the output... ```ruby => # ``` You can also provide an array of symbols if you like: ```ruby Barchart::Quote.get!(['AAPL', 'FB', 'GOOG']) ``` and you'll get an array of `Barchart::Quote` ```ruby => [#, #, #] ``` ## Barchart::History Returns historical quotes for equities, indices, and forex. Specifying `endDate` is optional, defaults to `nil`. ```ruby Barchart::History.get!('AAPL', 1.week.ago) ``` and you'll get the daily history, an array of `Barchart::History` objects ```ruby => [#, #, #, #] ``` # Interactive Console This is useful if you just want to try out the package, you'll stil need to initialize Barchart with some valid configuration ```bash bin/console ```