@investoday/investoday-api 1.0.0 → 1.8.0
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/README.md +19 -3
- package/bin/investoday-api.js +0 -0
- package/data/openapi.json +62996 -0
- package/data/tree.json +5904 -0
- package/lib/call-api.js +648 -7
- package/lib/config.js +175 -0
- package/lib/metadata.js +412 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -10,10 +10,10 @@ npm install -g @investoday/investoday-api
|
|
|
10
10
|
|
|
11
11
|
## API key
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Configure the API key once:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
investoday-api init
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Get an API key from:
|
|
@@ -23,6 +23,14 @@ Get an API key from:
|
|
|
23
23
|
## Usage
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
+
investoday-api --help
|
|
27
|
+
investoday-api init
|
|
28
|
+
investoday-api config status
|
|
29
|
+
investoday-api list
|
|
30
|
+
investoday-api list 沪深京数据
|
|
31
|
+
investoday-api search-api query=违规处罚 tool_ids=list_stock_violation_penalt
|
|
32
|
+
investoday-api search-api query=股票,基本面分析
|
|
33
|
+
investoday-api search-api query=股票 --text
|
|
26
34
|
investoday-api <endpoint> [key=value ...]
|
|
27
35
|
investoday-api <endpoint> --method POST [key=value ...]
|
|
28
36
|
```
|
|
@@ -30,6 +38,11 @@ investoday-api <endpoint> --method POST [key=value ...]
|
|
|
30
38
|
Examples:
|
|
31
39
|
|
|
32
40
|
```bash
|
|
41
|
+
investoday-api list 沪深京数据/股票行情
|
|
42
|
+
investoday-api search-api query=stockCodes
|
|
43
|
+
investoday-api search-api query=股票,基本面分析
|
|
44
|
+
investoday-api search-api tool_ids=list_stock_violation_penalt,list_stock_report_schema
|
|
45
|
+
investoday-api search-api query=股票 --text
|
|
33
46
|
investoday-api stock/basic-info stockCode=600519
|
|
34
47
|
investoday-api search key=贵州茅台 type=11
|
|
35
48
|
investoday-api fund/daily-quotes --method POST fundCode=000001 beginDate=2024-01-01 endDate=2024-12-31
|
|
@@ -37,6 +50,9 @@ investoday-api fund/daily-quotes --method POST fundCode=000001 beginDate=2024-01
|
|
|
37
50
|
|
|
38
51
|
## Notes
|
|
39
52
|
|
|
40
|
-
-
|
|
53
|
+
- Uses the local encrypted config created by `investoday-api init`
|
|
41
54
|
- Only calls `https://data-api.investoday.net/data`
|
|
55
|
+
- Bundles endpoint metadata for `list` and `search-api`
|
|
56
|
+
- `search-api` defaults to JSON output and includes params, response fields, and `exampleCommand`; use `--text` for a human-readable summary
|
|
57
|
+
- `search-api` only accepts structured inputs such as `query=` and `tool_ids=`; `query=` accepts one value and supports comma-separated keywords
|
|
42
58
|
- Prints the API response `data` field as formatted JSON
|
package/bin/investoday-api.js
CHANGED
|
File without changes
|