code wiki / (root) / nx_fin_marketdata_fetch.nx

nx_fin_marketdata_fetch.nx

buildroot/runtime/nx_fin_marketdata_fetch.nx

9008 B172 linesdepth 21pulls 150 transitivereach 0 importersview sourcekind tooltopic fin
docsdependenciesstructsconstsfunctions

about

nx_fin_marketdata_fetch.nx -- MAKE IT REAL: the live ingestion adapter + end-to-end demo. Fetches a symbol's daily OHLCV from Alpha Vantage (CSV) over the SOVEREIGN TLS fetcher (no curl), parses via md_parse_csv, reverses to chronological order (Alpha Vantage returns newest-first), then runs the ENTIRE pipeline on REAL data: ADV/capacity (R1) -> SMA signals (R3) -> backtest with slippage + ADV cap (R2) -> honest metrics. This proves the whole stack on real market data -- SIM ONLY, no live capital. The API key is DATA (Cardinal 11/17: env/config > default "demo"); the demo key serves IBM. Composes the proven fetch + the fin_* organs. license_tier: ORIGINAL

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_fin_marketdata.nx nx_fin_strategy.nx nx_fin_backtest.nx nx_fin_paper.nx nx_fin_marketdata_fetch.nx

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nxnx_fin_marketdata.nxnx_fin_strategy.nxnx_fin_backtest.nxnx_fin_paper.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻

structs

none

consts

16const K_MAGIC_10000: i64 = 10000
17const K_MAGIC_4194304: i64 = 4194304
18const K_MAGIC_4096: i64 = 4096
19const K_MAGIC_8388608: i64 = 8388608
20const K_MAGIC_1000000: i64 = 1000000
21const K_MAGIC_7000: i64 = 7000

functions

23func pp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: tour_printmain calls 1: sys_write
24func pn(v: i64) -> i64
called by 1: tour_print calls 2: sys_writesys_mmap
32func mf_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i }
called by 1: main
35func mf_reverse(bars: *i64, n: i64) -> i64
52func tour_print(name: *u8, out: *i64) -> i64
calls 2: pppn
64func mf_strlen(s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){i=i+1} return i }
called by 2: cfg_getmain
67func cfg_get(buf: *u8, n: i64, key: *u8, out: *u8, out_cap: i64) -> i64
called by 1: main calls 1: mf_strlen
93func main() -> i64