https://github.com/fython/tushare-api
A third-party Tushare API client for Node.js with TypeScript support
https://github.com/fython/tushare-api
Last synced: 5 months ago
JSON representation
A third-party Tushare API client for Node.js with TypeScript support
- Host: GitHub
- URL: https://github.com/fython/tushare-api
- Owner: fython
- License: mit
- Created: 2025-07-12T04:46:38.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-07-13T15:56:45.000Z (6 months ago)
- Last Synced: 2025-08-10T01:54:59.258Z (5 months ago)
- Language: TypeScript
- Size: 44.9 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# tushare-api
> [!WARNING]
> This is an experimental project and may not be suitable for production use.
>
> 这是一个实验性项目,可能不适合生产环境使用。我正在慢慢完善和测试
A third-party [Tushare](https://tushare.pro/) API client for Node.js with TypeScript support.
Based on the official Tushare API ([通过HTTP获取数据](https://tushare.pro/document/1?doc_id=130))
If you have any questions or issues, please feel free to open an issue or discuss in the [Discussions](https://github.com/fython/tushare-api/discussions).
## Installation
```bash
npm install @siubeng/tushare-api
```
## Usage
Creates a Tushare Client instance with your token and use it to call API methods.
```typescript
import { TushareClient } from '@siubeng/tushare-api';
const client = new TushareClient('');
```
Functions declared as a `TushareApi` type in type declartion files are API methods that can be called with the client instance. The first parameter is the client instance, and the second parameter is an object containing query parameters.
```typescript
import { getStockBasic } from '@siubeng/tushare-api';
getStockBasic(client, { ts_code: '000001.SH' })
.then((res) => console.log('data': res))
.then((err) => console.error(err));
```
More examples can be found in the [examples](./examples) directory.
## Contributing
Learn more about how to contribute to this project in the [CONTRIBUTING](CONTRIBUTING.md) file.
## References
- [Tushare 数据获取方式](https://tushare.pro/document/1?doc_id=129)
- [Tushare 数据接口](https://tushare.pro/document/2)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Copyright (c) 2025 Siubeng