SEC-required User-Agent string. Set via set-identity! before making requests.
SEC-required User-Agent string. Set via set-identity! before making requests.
(clear-cache!)Clear the in-memory HTTP response caches (JSON and raw) and reset the eviction counter. After calling this, the next cache-put! will perform a full eviction sweep.
Clear the in-memory HTTP response caches (JSON and raw) and reset the eviction counter. After calling this, the next cache-put! will perform a full eviction sweep.
(clear-disk-cache! & {:keys [dir]})Delete every entry in the on-disk cache directory (whether or not the disk cache is currently enabled). Returns the number of entries removed.
Delete every entry in the on-disk cache directory (whether or not the disk cache is currently enabled). Returns the number of entries removed.
(disable-disk-cache!)Disable the on-disk HTTP cache (files are kept; delete with clear-disk-cache! first if desired).
Disable the on-disk HTTP cache (files are kept; delete with clear-disk-cache! first if desired).
(disk-cache-stats)Return {:dir path :entries n :bytes total} for the on-disk cache, or nil when disabled.
Return {:dir path :entries n :bytes total} for the on-disk cache, or nil
when disabled.(edgar-get url & {:keys [raw?] :or {raw? false}})Rate-limited GET against any SEC URL. Returns parsed JSON as a Clojure map, or raw body string if :raw? true. JSON responses are cached in memory (5 min for metadata, 1 hr for XBRL facts). Raw responses are cached in a bounded cache (64 entries, 1 hr TTL) so that repeated content access on the same filing does not re-download it. When the opt-in disk cache is enabled (enable-disk-cache!), responses are also persisted across sessions and consulted between the memory caches and the network. Retries on 429/5xx with exponential backoff (up to 3 attempts). Options: :raw? - return body as string instead of parsing JSON (default false)
Rate-limited GET against any SEC URL. Returns parsed JSON as a Clojure map, or raw body string if :raw? true. JSON responses are cached in memory (5 min for metadata, 1 hr for XBRL facts). Raw responses are cached in a bounded cache (64 entries, 1 hr TTL) so that repeated content access on the same filing does not re-download it. When the opt-in disk cache is enabled (enable-disk-cache!), responses are also persisted across sessions and consulted between the memory caches and the network. Retries on 429/5xx with exponential backoff (up to 3 attempts). Options: :raw? - return body as string instead of parsing JSON (default false)
(edgar-get-bytes url)Rate-limited GET returning raw bytes — for binary/archive downloads. Retries on 429/5xx with exponential backoff.
Rate-limited GET returning raw bytes — for binary/archive downloads. Retries on 429/5xx with exponential backoff.
(enable-disk-cache! &
{:keys [dir ttl-json-ms ttl-raw-ms]
:or {ttl-json-ms (* 24 60 60 1000)
ttl-raw-ms (* 30 24 60 60 1000)}})Enable the persistent on-disk HTTP cache (off by default). Options: :dir - cache directory (default ~/.edgarjure/http-cache) :ttl-json-ms - TTL for JSON endpoints: submissions, companyfacts, tickers, search (default 24 h) :ttl-raw-ms - TTL for raw documents: filing HTML/XML, indexes (default 30 days; published filings are immutable) Returns the config map in effect.
Enable the persistent on-disk HTTP cache (off by default).
Options:
:dir - cache directory (default ~/.edgarjure/http-cache)
:ttl-json-ms - TTL for JSON endpoints: submissions, companyfacts,
tickers, search (default 24 h)
:ttl-raw-ms - TTL for raw documents: filing HTML/XML, indexes
(default 30 days; published filings are immutable)
Returns the config map in effect.(set-identity! name-and-email)Set the SEC Edgar identity used in all HTTP requests. Required by SEC fair-use policy. Example: (set-identity! "Your Name your@email.com")
Set the SEC Edgar identity used in all HTTP requests. Required by SEC fair-use policy. Example: (set-identity! "Your Name your@email.com")
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |