@watsonserve/stock-base 0.1.4 → 0.1.5
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/package.json +1 -4
- package/price-loader.js +1 -1
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@watsonserve/stock-base",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "rm -rf ./dist && tsc && node ./build.mjs"
|
|
10
|
-
},
|
|
11
8
|
"keywords": [],
|
|
12
9
|
"author": "",
|
|
13
10
|
"license": "ISC",
|
package/price-loader.js
CHANGED
|
@@ -7,7 +7,7 @@ export default class PriceLoader extends HistoryLoader {
|
|
|
7
7
|
try {
|
|
8
8
|
const data = new Map();
|
|
9
9
|
for (const nc of ncs) {
|
|
10
|
-
const body = await this.get('https://finance.pae.baidu.com/
|
|
10
|
+
const body = await this.get('https://finance.pae.baidu.com/vapi/v1/sug', { wd: `USD${nc}`, skip_login: 1, finClientType: 'pc' });
|
|
11
11
|
const fx = body.Result.stock[0];
|
|
12
12
|
data.set(nc, +fx.price);
|
|
13
13
|
}
|