# tusharepro

> tushare pro sdk

Latest version **1.0.2** (published 2020-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install tusharepro
pnpm add tusharepro
yarn add tusharepro
bun add tusharepro
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-03-06 |
| First published | 2019-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 35.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | zuweie |
| Maintainers | zuweie |
| Keywords | tushare, stock |

## Links

- npm: https://www.npmjs.com/package/tusharepro
- Repository: https://github.com/zuweie/tusharepro
- Issues: https://github.com/zuweie/tusharepro/issues
- npm.io page: https://npm.io/package/tusharepro

## Recent versions

- 1.0.2 (latest) — 2020-03-06
- 1.0.1 — 2019-04-12
- 1.0.0 — 2019-04-08

## README

# Tushare Pro JS
### 项目介绍
* [Tushare Pro](https://tushare.pro/document/2) 是啥？自行百度，不啰嗦了！
* 此项目是对Tushare Pro 的 Http 接口的封装，使用的Javascript。

### 安装
npm i tusharepro

### 使用
```
const Tushare = require('tusharepro');
var ts = new Tushare('you-tusharepro-token');

/* 在获得数据后，可以设置数据加工函数，方便把数据加工入库。如果没有设置，则返回原始数据
  ts.set_datafunc ( function (data) {
    // doing reformat data ....
    return data;
  } );
*/

// Promise
ts.daily('000001.SZ')
.then( data => {
  console.log( data );
})
.catch (err => {
  console.log( err );
});

// async

! async function () {
  
  let data = await ts.daily('000001.SZ');
  
  console.log (data);
  
} ();
``` 
### 接口说明
* [Tushare Pro](https://tushare.pro/document/2)
* pro_bar 接口不支持 Http，无法封装，[详情](https://tushare.pro/document/2?doc_id=109)
* 接口只做到指数，那一部分，往后的接口，例如基金将来补上。

---
_Source: https://npm.io/package/tusharepro · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
