Holdings

Holding is a simple gem to keep track of your holdings in a given currency/stock and convert back and forward between the quote currency and base currency at a given exchange rate.

Installation

Add this line to your application's Gemfile:

gem 'holdings'

And then execute:

$ bundle

Or install it yourself as:

$ gem install holdings

Usage

acc = Holdings::Simple.new(['aud_usd'], { usd: 100.0 })
acc.usd_to_aud(100.0, 1.0)
acc.aud_bal # 99.8 because of built in fee calculation

Contributing

  1. Fork it ( http://github.com//holdings/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request