Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
一款聚焦在 股票实时数据
和 周边相关服务
的接口小助手。
名称 | 接口名 | 搜索股票代码 | 获取股票实时数据 | 获取股票组实时数据 | 官网 |
---|---|---|---|---|---|
网易财经 | netease | ✅已实现 | ✅已实现 | ✅已实现 | 传送门 |
腾讯股票 | tencent | ✅已实现 | ✅已实现 | ✅已实现 | 传送门 |
雪球 | xueqiu | ✅已实现 | ❌待实现 | ❌待实现 | 传送门 |
新浪股票 | sina | ✅已实现 | ❌待实现 | ❌待实现 | 传送门 |
npm install stock-api
由于每个交易所数据规则不一样,为了能统一规范对代码定义了规则 交易所+股票代码
。
交易所 | 代号 | 实例 |
---|---|---|
上海交易所 | SH | SH000001 |
深圳交易所 | SZ | SZ399001 |
香港交易所 | HK | HKHSI |
美国交易所 | US | USDJI |
import { stocks } from "stock-api";
// 数据源
const netease = stocks.netease;
const tencent = stocks.tencent;
import { stocks } from "stock-api";
// 获取股票组实时数据
stocks.netease.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.netease.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.netease.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
The npm package stock-api receives a total of 38 weekly downloads. As such, stock-api popularity was classified as not popular.
We found that stock-api demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.