Access the eodhd.com API with Ruby.
Add this line to your application's Gemfile:
gem 'eodhd.rb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install eodhd.rb
api_token = 'api_token'
eodhd_api ||= Eodhd.new(api_token: api_token)
eodhd_api.exchanges
exchange = eodhd_api.exchanges.first
eod_api.exchange_symbols(exchange: exchange)
# OR
eod_api.exchange_symbols(exchange_code: exchange.code)
exchange = eodhd_api.exchanges.first
exchange_symbol = eod_api.exchange_symbols(exchange: exchange).first
eod_api.eod_data(exchange: exchange, exchange_symbol: exchange_symbol)
# OR
eod_api.eod_data(exchange_code: exchange.code, exchange_symbol: exchange_symbol)
# OR
eod_api.eod_data(exchange: exchange, symbol: exchange_symbol.code)
# OR
eod_api.eod_data(exchange_code: exchange.code, symbol: exchange_symbol.code)
exchange = eodhd_api.exchanges.first
eod_api.eod_bulk_last_day(exchange: exchange, date: Date.today)
# OR
eod_api.eod_bulk_last_day(exchange_code: exchange.code, date: Date.today)
- Fork it ( https://github.com/thoran/eodhd.rb/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new pull request