
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
linxiaowu-stock-api
Advanced tools
在原有的功能上加上支持基金查询,目前测试了一下只有腾讯的接口支持,所以暂时加在腾讯的接口上 使用 FUND100032 即可查到对应的基金
一款聚焦在 股票实时数据
和 周边相关服务
的接口小助手。
名称 | 接口名 | 搜索股票代码 | 获取股票实时数据 | 获取股票组实时数据 | 官网 |
---|---|---|---|---|---|
网易财经 | netease | 已实现 | 已实现 | 已实现 | 传送门 |
雪球 | xueqiu | 已实现 | 已实现 | 已实现 | 传送门 |
新浪股票 | sina | 已实现 | 已实现 | 已实现 | 传送门 |
腾讯股票 | tencent | 已实现 | 已实现 | 已实现 | 传送门 |
npm install stock-api
yarn add stock-api
由于每个交易所数据规则不一样,为了能统一规范对代码定义了规则 交易所+股票代码
。
交易所 | 代号 | 实例 |
---|---|---|
上海交易所 | SH | SH000001 |
深圳交易所 | SZ | SZ399001 |
香港交易所 | HK | HKHSI |
美国交易所 | US | USDJI |
import { stocks } from "stock-api";
// 数据源
const sina = stocks.sina;
const xueqiu = stocks.xueqiu;
const netease = stocks.netease;
const tencent = stocks.tencent;
import { stocks } from "stock-api";
// 获取股票组实时数据
stocks.sina.searchStocks(["510500"]).then(console.log);
[{
code: 'SH510500',
name: '500ETF',
percent: 0.028383,
now: 7.174,
low: 6.93,
high: 7.184,
yesterday: 6.976
}]
import { stocks } from "stock-api";
// 获取股票实时数据
stocks.sina.getStock("SH510500").then(console.log);
{
code: 'SH510500',
name: '500ETF',
percent: 0.028383,
now: 7.174,
low: 6.93,
high: 7.184,
yesterday: 6.976
}
import { stocks } from "stock-api";
// 获取股票组实时数据
stocks.sina.getStocks(["SH510500"]).then(console.log);
[{
code: 'SH510500',
name: '500ETF',
percent: 0.028383,
now: 7.174,
low: 6.93,
high: 7.184,
yesterday: 6.976
}]
韭菜小猪也有暴富梦~
FAQs
We found that linxiaowu-stock-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.