Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yahoo_quote

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yahoo_quote

  • 0.0.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

yahoo_quote

Easy interaction with Yahoo Finance API

Installation

gem install yahoo_quote

Usage

require 'yahoo_quote'
quote = YahooQuote::Quote.new('AAPL', ['Name', 'Last Trade (Price Only)', 'P/E Ratio'])
quote.valid?
# => true
quote.data['Name']
# => "Apple Inc."
quote.data['Last Trade (Price Only)']
# => 502.12
quote.data['P/E Ratio']
# => 14.29
quote = YahooQuote::Quote.new('ECOMMERCE', ['Name', 'Last Trade (Price Only)', 'P/E Ratio'])
quote.valid?
# => false

To get list of supported fields:

puts quote.field_mappings.keys

Configuration

Specify a directory to keep a simple file-based cache:

YahooQuote::Configuration.cache_dir = "/tmp"

FAQs

Package last updated on 03 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc