YahooFinance

码农软件 · 软件分类 · WEB服务/SOAP/SOA · 2019-04-10 09:28:48

软件介绍

YahooFinance是一个从finance.yahoo.com获得股市信息的Ruby模块。它可以获取股票数据和历史数据。它能作为一个类库使用,也可以通过命令行调用。

安装方法:gem install yahoofinance

使用方法:

require 'yahoofinance'

# Set the type of quote we want to retrieve.
# Available type are:
# - YahooFinanace::StandardQuote
# - YahooFinanace::ExtendedQuote
# - YahooFinanace::RealTimeQuote
quote_type = YahooFinance::StandardQuote

# Set the symbols for which we want to retrieve quotes.
# You can include more than one symbol by separating
# them with a ',' (comma).
quote_symbols = "yhoo,goog"

# Get the quotes from Yahoo! Finance. The get_quotes method call
# returns a Hash containing one quote object of type "quote_type" for
# each symbol in "quote_symbols". If a block is given, it will be
# called with the quote object (as in the example below).
YahooFinance::get_quotes( quote_type, quote_symbols ) do |qt|
puts "QUOTING: #{qt.symbol}"
puts qt.to_s
end


# You can get the same effect using the quote specific method.
quotes = YahooFinance::get_standard_quotes( quote_symbols )
quotes.each do |symbol, qt|
puts "QUOTING: #{symbol}"
puts qt.to_s
end

本文地址:https://codercto.com/soft/d/3258.html

硅谷热

硅谷热

埃弗雷特.M.罗杰斯 / 范国鹰 等 / 1985.8 / 经济科学出版社 / 1.9

《硅谷热》总共分三部分。第一部分为“硅谷的崛起”,以苹果电脑的传奇故事为主线,讲述了硅谷的发展历史。第二部分为“高技术文明”,从风险投资、创业故事、人物传奇等各个方面描绘了硅谷的生态状况。第三部分为“硅谷的明天”,讲述了硅谷模式在全球的扩散、硅谷面临的全球竞争和深远影响。 书中,硅谷这场传奇的主要角色:人物、公司、技术、产品等都综合在其中,一锅子端给了嗷嗷待哺的人们:PC革命、半导体传奇、软......一起来看看 《硅谷热》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具