2.3.2 • Published 9 years ago

sedata v2.3.2

Weekly downloads
18
License
MIT
Repository
github
Last release
9 years ago

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

2.3.4

9 years ago

2.3.3

9 years ago

2.3.2

9 years ago

2.3.1

9 years ago

2.3.0

9 years ago

2.2.22

9 years ago

2.2.21

9 years ago

2.2.20

9 years ago

2.2.19

9 years ago

2.2.18

9 years ago

2.2.17

9 years ago

2.2.16

9 years ago

2.2.15

9 years ago

2.2.14

9 years ago

2.2.13

9 years ago

2.2.12

9 years ago

2.2.11

9 years ago

2.2.10

9 years ago

2.2.9

9 years ago

2.2.8

9 years ago

2.2.7

9 years ago

2.2.6

9 years ago

2.2.5

9 years ago

2.2.4

9 years ago

2.2.3

9 years ago

2.2.2

9 years ago

2.2.1

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.9.11

9 years ago

0.9.10

9 years ago

0.9.9

9 years ago

0.9.8

9 years ago

0.9.7

9 years ago

0.9.6

9 years ago

0.9.5

9 years ago

0.9.4

9 years ago

0.9.3

9 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.1

9 years ago

0.6.0

9 years ago

0.5.3

10 years ago

0.5.2

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.4

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.6

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.1.1

10 years ago

0.1.0-a

10 years ago

0.1.0

10 years ago