Socket
Book a DemoInstallSign in
Socket

big-a-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

big-a-api

A股node.js调用接口

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

big-a-api

A股node.js调用接口, 目前信息源来源于腾讯证券。

  • 建议
    • 最好用于腾讯相关的服务比如微信小程序等等,否则可能容易出现调用异常。
    • 同时服务存在限流,请注意缓存数据。
    • 此SDK为仅做封装,API是否可用最终由腾讯证券提供,本SDK不保证可用性。

install

npm install big-a-api

use

根据股票名字进行搜索获取股票代码

    import { getStockSearch } from 'big-a-api'
    const query = "中国平安";
    // @param 
    // string query 查询股票关键词
    const data = await getStockSearch({ query }); // output [{name:"中国平安",code:"sz000001"},...]

获取实时价格

    import { getRealTimeData } from 'big-a-api'
    // @param 
    // string code 股票代码 
    // number limit 最近N条
    const data = await getRealTimeData({ code: "sz000001", limit: 5 });
    /**
     * output:
        {
            date: '20250303',
            data: [
                { time: '13:13:24', price: '11.55', volume: '188', direction: 'S' },...
            ]
        }
     */

获取K线

    import { getSeriesData } from 'big-a-api'
    // @param 
    // string code 股票代码 
    // string interval 周期 day为日线 week为周线 month为月线  
    // number limit 最近N条
    const data = await getSeriesData({ code: "sz000001", interval: "day", limit: 10 });
    /**
     * output:
        [
            {
                date: '2025-02-17',
                open: '11.60',
                close: '11.78',
                high: '11.80',
                low: '11.55',
                volume: '2061965.00'
            },...
        ]
     */

Keywords

stock

FAQs

Package last updated on 03 Apr 2025

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.