The project is in a healthy, maintained state
A simple and easy-to-use Ruby wrapper library for Yahoo Finance API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 0.4.0
~> 0.3.8
~> 3.0

Runtime

~> 1.5.2
 Project Readme

YfinanceWrapper

YfinanceWrapper is a Ruby wrapper library for the Python yfinance library, which provides access to Yahoo Finance's API.

This library has the following features:

  • Uses PyCall to make the Python yfinance library accessible from Ruby
  • Simple and intuitive API
  • Compatible with Ruby 3.0 and above

Main features:

  • Stock information retrieval
  • Stock price data retrieval
  • Company information retrieval

This library supports the development of financial data applications and analysis tools by providing easy access to Yahoo Finance's data through Ruby.

Installation

  1. Install python3.
  2. Install yfinance
pip3 install yfinance

Example

ticker = YfinanceWrapper::Ticker.new('APPL')
ticker.info
# {"quoteType"=>"MUTUALFUND",
#  "symbol"=>"APPL",
#  "language"=>"en-US"
# ...
# }

ticker.history(period: "max", interval: "1d")
# {1980-12-12 00:00:00 -0500=>
# ...
# }