New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tushare-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tushare-api

[tushare.pro](https://tushare.pro/) 的 HTTP API 封装。

latest
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

tushare-api

tushare.pro 的 HTTP API 封装。

安装

npm install tushare-api

使用说明

首先,设置环境变量 TUSHARE_TOKEN

API = require('tushare-api')

也可以这样

API = require('tushare-api/api')("你的令牌xxx")

使用方式,比如读取沪深日线的成交量、成交额,调用如下 :

const API = require('tushare-api');

(async ()=>{
  var data = await API.index_daily(
    {
      ts_code:'399300.SZ',
      start_date:20180101,
      end_date:20181010,
    },
    "vol,amount"
  );
  console.log(data);
})()

开发说明

进入 src 目录

运行一次测试 npm run test

持续运行测试 npm run dev

代码库地址 github.com/TqLj/tushare-api

FAQs

Package last updated on 20 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts