New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

current-price

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

current-price

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

CurrentPrice

A gem for crawling public endpoints for current stock price & current option chain details

Goals
  • Obtain the 'instantaneous' price of a stock
  • Obtain all available option contracts for a given stock

Installation

Add this line to your application's Gemfile:

gem 'current-price'

And then execute:

$ bundler

Or install it yourself:

$ gem install current-price

Usage

Google
require 'current-price'

client = CurrentPrice::Google.client(:requesting_handle => "my_handle")

client.option_chain("CSCO") #=> {"9-16-2016"=>{:puts=>[{:price=>"0.03", :bid=>"-", :ask=>"0.02", :close=>"0.00", :oi=>"290", :volume=>"-", :strike=>"19.00"}, ..
Yahoo
require 'current-price'

client = CurrentPrice::Yahoo.client(:requesting_handle => "my_handle")

client.quote("CSCO") #=> {:symbol=>"CSCO", :ask=>"30.79", :average_daily_volume=>"23197400", :bid=>"30.60", ..

Contributing

  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Submit a pull request

FAQs

Package last updated on 11 Sep 2016

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