module Juhe::FinaceStock

Constants

URL

Public Instance Methods

hk(key, gid) click to toggle source

香港单独某一个股票 www.juhe.cn/docs/api/id/21/aid/62

# File lib/juhe/finace_stock.rb, line 19
def hk(key, gid)
  res = RestClient.get("#{URL}/hk", params: {key: key, num: gid})
  JSON.parse res.body
end
hkall(key, options = {}) click to toggle source

香港股票市场列表 www.juhe.cn/docs/api/id/21/aid/632

# File lib/juhe/finace_stock.rb, line 25
def hkall(key, options = {})
  options[:page] ||= 1
  options[:type] ||= 1
  options[:key] = key
  res = RestClient.get("#{URL}/hkall", params: options)
  JSON.parse res.body
end
hs(key, gid) click to toggle source

沪深单独某一个股票 www.juhe.cn/docs/api/id/21

# File lib/juhe/finace_stock.rb, line 13
def hs(key, gid)
  res = RestClient.get("#{URL}/hs", params: {key: key, gid: gid})
  JSON.parse res.body
end
shall(key, options = {}) click to toggle source

上海股票市场列表 www.juhe.cn/docs/api/id/21/aid/635

# File lib/juhe/finace_stock.rb, line 52
def shall(key, options = {})
  options[:page] ||= 1
  options[:type] ||= 1
  options[:key] = key
  res = RestClient.get("#{URL}/shall", params: options)
  JSON.parse res.body
end
szall(key, options = {}) click to toggle source

深圳股票市场列表 www.juhe.cn/docs/api/id/21/aid/634

# File lib/juhe/finace_stock.rb, line 43
def szall(key, options = {})
  options[:page] ||= 1
  options[:type] ||= 1
  options[:key] = key
  res = RestClient.get("#{URL}/szall", params: options)
  JSON.parse res.body
end
usa(key, gid) click to toggle source

美股单独某一个股票 www.juhe.cn/docs/api/id/21/aid/75

# File lib/juhe/finace_stock.rb, line 7
def usa(key, gid)
  res = RestClient.get("#{URL}/usa", params: {key: key, gid: gid})
  JSON.parse res.body
end
usaall(key, options = {}) click to toggle source

美国股票市场列表 www.juhe.cn/docs/api/id/21/aid/633

# File lib/juhe/finace_stock.rb, line 34
def usaall(key, options = {})
  options[:page] ||= 1
  options[:type] ||= 1
  options[:key] = key
  res = RestClient.get("#{URL}/usaall", params: options)
  JSON.parse res.body
end