@@ -0,0 +1,17 @@
|
||||
# `openstock universe chunks`
|
||||
|
||||
Purpose: divide the stock universe into scan chunks.
|
||||
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
openstock universe chunks --market KOSDAQ --kind common_stock --size 100
|
||||
```
|
||||
|
||||
Inputs: optional `--market`, `--kind`, `--size`.
|
||||
|
||||
Reads: universe cache.
|
||||
|
||||
Output fields: `source`, `cache_date`, `filtered_count`, `chunk_size`, `chunk_count`, `chunks`.
|
||||
|
||||
Agent rule: preferred for full-market scan planning.
|
||||
@@ -0,0 +1,46 @@
|
||||
# `openstock universe`
|
||||
|
||||
## Purpose
|
||||
|
||||
Build and query a local universe of listed Korean stocks from KIND.
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Command | Purpose |
|
||||
| --- | --- |
|
||||
| `openstock universe sync [--force]` | Refresh KIND universe cache. |
|
||||
| `openstock universe status` | Show local universe cache status. |
|
||||
| `openstock universe list [--market MARKET] [--kind KIND] [--offset N] [--limit N]` | Page through stocks. |
|
||||
| `openstock universe chunks [--market MARKET] [--kind KIND] [--size N]` | Build scan chunks. |
|
||||
| `openstock universe validate` | Validate expected size and representative symbols. |
|
||||
|
||||
## IO
|
||||
|
||||
| Direction | Data |
|
||||
| --- | --- |
|
||||
| External IO | KIND listed company download on sync/cache miss. |
|
||||
| File read/write | `~/.config/openstock/cache/universe/kind`. |
|
||||
| Side effect | `sync` writes cache and prunes old snapshots. Read commands can sync on cache miss. |
|
||||
|
||||
## Output Fields
|
||||
|
||||
| Field | Meaning |
|
||||
| --- | --- |
|
||||
| `source` | Data source. |
|
||||
| `cache_date` | Cache date. |
|
||||
| `refreshed_at` | Refresh timestamp. |
|
||||
| `refreshed` | Whether command refreshed data. |
|
||||
| `stock_count` | Number of stocks in snapshot. |
|
||||
| `counts_by_market` | Count by market. |
|
||||
| `total_count` | Total stocks before filtering. |
|
||||
| `filtered_count` | Stocks after filter. |
|
||||
| `offset` | Pagination offset. |
|
||||
| `limit` | Pagination limit. |
|
||||
| `stocks` | Normalized stock records. |
|
||||
| `chunk_size` | Requested chunk size. |
|
||||
| `chunk_count` | Number of chunks. |
|
||||
| `chunks` | Scan chunk list. |
|
||||
|
||||
## Agent Notes
|
||||
|
||||
Use `chunks` when scanning many stocks. Do not request the whole universe if a paged or chunked workflow is enough.
|
||||
@@ -0,0 +1,17 @@
|
||||
# `openstock universe list`
|
||||
|
||||
Purpose: page through normalized stock universe records.
|
||||
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
openstock universe list --market KOSPI --kind common_stock --offset 0 --limit 100
|
||||
```
|
||||
|
||||
Inputs: optional `--market`, `--kind`, `--offset`, `--limit`.
|
||||
|
||||
Reads: universe cache; may refresh on cache miss.
|
||||
|
||||
Output fields: `source`, `cache_date`, `total_count`, `filtered_count`, `offset`, `limit`, `stocks`.
|
||||
|
||||
Agent rule: use pagination instead of loading the full universe when possible.
|
||||
@@ -0,0 +1,15 @@
|
||||
# `openstock universe status`
|
||||
|
||||
Purpose: inspect local KIND universe cache status.
|
||||
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
openstock universe status
|
||||
```
|
||||
|
||||
Reads: universe cache.
|
||||
|
||||
Output fields: `source`, `cache_date`, `refreshed_at`, `refreshed`, `stock_count`, `counts_by_market`.
|
||||
|
||||
Agent rule: if cache is missing, run `openstock universe sync`.
|
||||
@@ -0,0 +1,18 @@
|
||||
# `openstock universe sync`
|
||||
|
||||
Purpose: refresh KIND listed stock universe cache.
|
||||
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
openstock universe sync
|
||||
openstock universe sync --force
|
||||
```
|
||||
|
||||
External IO: KIND listed company download.
|
||||
|
||||
Writes: `~/.config/openstock/cache/universe/kind`.
|
||||
|
||||
Output fields: `source`, `cache_date`, `refreshed_at`, `refreshed`, `stock_count`, `counts_by_market`.
|
||||
|
||||
Agent rule: run before broad scans if the cache date matters.
|
||||
@@ -0,0 +1,18 @@
|
||||
# `openstock universe validate`
|
||||
|
||||
Purpose: validate universe size and representative stock expectations.
|
||||
|
||||
Usage:
|
||||
|
||||
```bash
|
||||
openstock universe validate
|
||||
openstock universe validate --expect 005930=삼성전자
|
||||
```
|
||||
|
||||
Inputs: minimum count options and repeated `--expect SYMBOL=NAME`.
|
||||
|
||||
Reads: universe cache.
|
||||
|
||||
Output fields: validation checks and status.
|
||||
|
||||
Agent rule: run after sync when verifying that the cached universe is usable.
|
||||
Reference in New Issue
Block a user