mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
Add KSEI archive fallback import
This commit is contained in:
parent
8404b27628
commit
1f5c4b2798
11 changed files with 622 additions and 59 deletions
|
|
@ -61,6 +61,7 @@ Unlike the `stocks` module (live-fetch), ownership is **import-then-query**:
|
|||
|
||||
### Data Sources
|
||||
- **KSEI** — official ≥1% shareholder registry (monthly PDF from IDX)
|
||||
- **KSEI archive** — monthly ZIP/TXT balance-position matrix, used as a local fallback/backstop import path
|
||||
- **Bing Finance** — global institutional ownership (REST API, quarterly)
|
||||
|
||||
### Parser Pipeline
|
||||
|
|
@ -68,6 +69,10 @@ Unlike the `stocks` module (live-fetch), ownership is **import-then-query**:
|
|||
KSEI PDF → mutool stext (XML with coordinates) → quick-xml parse → KseiRawRow
|
||||
→ normalize (ID locale numbers, dates, entity names) → KseiHolding
|
||||
→ SQLite INSERT (within transaction)
|
||||
|
||||
KSEI archive ZIP/TXT → pipe-delimited balance-position rows
|
||||
→ map investor-type/locality buckets into synthetic aggregate holders
|
||||
→ SQLite INSERT (within transaction)
|
||||
```
|
||||
|
||||
## Data Flow Patterns
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue