
Security News
Rspack Introduces Rslint, a TypeScript-First Linter Written in Go
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Financial information scraper gem. Uses Yahoo Finance API. Current functionality demo of this gem, working in synergy with gem ta: http://strangemuseum.heroku.com
Add this line to your application's Gemfile:
gem 'securities'
And then execute:
$ bundle
Or install it yourself as:
$ gem install securities
You can get stock information with commands:
my_stocks = Securities::Stock.new(:symbol => 'AAPL', :start_date => '2012-01-01', :end_date => '2012-02-01', :type => :weekly)
Optional parameter :type accepts :daily, :weekly, :monthly, :dividend. If not specified, it defaults to :daily.
:end_date defaults to Date.today if not specified.
You can access hash for a single stock with:
my_stocks.output
my_stocks.symbol
my_stocks.start_date
my_stocks.end_date
my_stocks.type
Output is returned in a hash:
[{:date=>"2012-01-03",
:open=>"409.40",
:high=>"412.50",
:low=>"409.00",
:close=>"411.23",
:volume=>"10793600",
:adj_close=>"409.47"},
{:date=>"2012-01-04",
:open=>"410.00",
:high=>"414.68",
:low=>"409.28",
:close=>"413.44",
:volume=>"9286500",
:adj_close=>"411.67"}]
Stock symbol lookup:
my_lookup = Securities::Lookup.new('Google')
Returns a hash with matched symbol, name, last trade, type, industry/category, exchange.
my_lookup.output
[{:symbol=>"GOOG",
:name=>"Google Inc.",
:last_trade=>"726.31",
:type=>"Stock",
:industry_category=>"Internet Information Providers",
:exchange=>"NMS"},
{:symbol=>"GOOG.MX",
:name=>"Google Inc.",
:last_trade=>"9,306.00",
:type=>"Stock",
:industry_category=>"Internet Information Providers",
:exchange=>"MEX"},
...]
my_lookup.input returns 'Google'
Adds support for stock symbol lookup.
Removes support for multiple stock input cause it complects the gem code and its implementation without adding much to it.
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that securities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.
Security News
Hacker Demonstrates How Easy It Is To Steal Data From Popular Password Managers
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.