stock-sdk 1.0.4 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 chengzuopeng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # Stock SDK
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/stock-sdk.svg)](https://www.npmjs.com/package/stock-sdk)
4
+ [![npm downloads](https://img.shields.io/npm/dm/stock-sdk.svg)](https://www.npmjs.com/package/stock-sdk)
5
+ [![GitHub](https://img.shields.io/github/license/chengzuopeng/stock-sdk)](https://github.com/chengzuopeng/stock-sdk)
6
+
3
7
  基于腾讯财经 `qt.gtimg.cn` 非官方接口封装的 TypeScript SDK,支持 A 股、港股、美股、公募基金实时行情查询。
4
8
 
5
9
  **同时支持浏览器端和 Node.js 端使用。**
6
10
 
11
+ 📦 [NPM](https://www.npmjs.com/package/stock-sdk) | 📖 [GitHub](https://github.com/chengzuopeng/stock-sdk)
12
+
7
13
  ## 特性
8
14
 
9
15
  - ✅ 零依赖,轻量级(使用原生 fetch 和 TextDecoder)
@@ -114,8 +120,8 @@ console.log(quotes[0].price); // 111.70
114
120
  **参数**
115
121
 
116
122
  - `options` — 可选配置对象
117
- - `batchSize` — 单次请求的股票数量,默认 `800`
118
- - `concurrency` — 最大并发请求数,默认 `5`
123
+ - `batchSize` — 单次请求的股票数量,默认 `700`
124
+ - `concurrency` — 最大并发请求数,默认 `7`
119
125
  - `onProgress` — 进度回调函数 `(completed: number, total: number) => void`
120
126
 
121
127
  **示例**
@@ -419,8 +425,6 @@ console.log(codeList[0]); // 'bj920000'
419
425
  </script>
420
426
  ```
421
427
 
422
- > **注意**:由于 `qt.gtimg.cn` 接口不支持 CORS,在浏览器端使用时需要配置代理服务器。
423
-
424
428
  ## 开发
425
429
 
426
430
  ```bash
@@ -436,4 +440,4 @@ yarn build
436
440
 
437
441
  ## 许可证
438
442
 
439
- ISC
443
+ MIT