npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sedata

v2.3.2

Published

Get security data(China market only for now)

Downloads

431

Readme

sedata

NPM version npm download

For China market only for now.

Install

$ npm install sedata

Usage

ticks 從網上取得實時數據,速度取決於網絡狀況和數據源服務器.

去掉了js轉譯.

{forex, ticks,hists,histd,histdwm} = require 'sedata'

# from sina:

symbols = "900901,000002sz,600603sh,200429,159915"

#實時
ticks symbols, (obj)->
  {買,名稱,賣5} = obj.sz159915
  console.log('here:',買,名稱,賣5)

# 5,15,30,60,day,week
hists {symbol:'900951',type:'week'},(err,json)->
  console.log json

# forex
forex 'usdcnh', (data)->
  console.log data

# from 163.com:

# daily
date = new Date()
end = date.year * 1000 + date.hour * 100 + date.day
histd {symbol: '000001', start:20080801, end:end}, (data)->
  console.log data

# daily, week, month, 分年度取
histdwm {market:'hs',symbol:'159915',year:'2016',type:'week'}, (err,json)->
  console.log json unless err?

See also example

Data Sources

新浪數據值得研究 重點在chrome中看network/XHR http://vip.stock.finance.sina.com.cn/mkt/#stock_hs_amount http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodes

https://github.com/HarrisonXi/AStock/blob/master/%E5%8E%86%E5%8F%B2%E6%95%B0%E6%8D%AEAPI.md

http://blog.sina.com.cn/s/blog_7ed3ed3d0101gphj.html http://www.wstock.net/wstock/5min.htm

todos

other markets

美股實時行情 可通過 http://finance.sina.com.cn/stock/usstock/sector.shtml 分析其數據來源 例如,etf行情來自: http://stock.finance.sina.com.cn/usstock/api/jsonp.php/IO.XSRV2.CallbackList['xBc3GjMw7U61Mn1c']/US_DataCenterService.getInstrType?page=1&num=20&sort=pe&asc=0&market=&id=&instr_type=3 然後再去查找歷史行情數據源

other resources

https://computeraidedfinance.com/2012/05/02/comprehensive-list-of-free-historical-market-data-sources/

~~Redo request~~

when request for data failed after hitting a time out. Well, npm has some packages for this: SOLVED using requestretry.

https://github.com/geoffreak/request-enhanced https://github.com/FGRibreau/node-request-retry https://www.npmjs.com/package/retry-request https://www.npmjs.com/package/then-request

License

MIT