Liking cljdoc? Tell your friends :D

clj-yfinance.parse

JSON parsing and data transformation utilities.

JSON parsing and data transformation utilities.
raw docstring

->epochclj

(->epoch x)

Convert Instant or long to epoch seconds. Returns nil for nil input.

Convert Instant or long to epoch seconds. Returns nil for nil input.
sourceraw docstring

build-queryclj

(build-query m)

Build URL query string from a map, removing nil values and encoding keys/values.

Build URL query string from a map, removing nil values and encoding keys/values.
sourceraw docstring

camel->kebabclj

(camel->kebab k)

Convert camelCase key to kebab-case. Handles special cases via key-exceptions map.

Convert camelCase key to kebab-case. Handles special cases via key-exceptions map.
sourceraw docstring

chart->rowsclj

(chart->rows {:keys [timestamp indicators]} {:keys [auto-adjust]})

Build OHLCV row maps from a chart result's :timestamp and :indicators. Pure function for testing.

When auto-adjust is true, :open/:high/:low/:close are scaled by the adjclose/close ratio of each row, so the whole OHLC series is adjusted for dividends as well as splits (python-yfinance's auto_adjust=True). Rows whose adjclose is missing, or whose close is not positive, are left unadjusted. :adj-close is included whenever the row has an adjclose value (so under auto-adjust it equals :close).

Build OHLCV row maps from a chart result's :timestamp and :indicators.
Pure function for testing.

When `auto-adjust` is true, :open/:high/:low/:close are scaled by the
adjclose/close ratio of each row, so the whole OHLC series is adjusted for
dividends as well as splits (python-yfinance's auto_adjust=True). Rows whose
adjclose is missing, or whose close is not positive, are left unadjusted.
:adj-close is included whenever the row has an adjclose value (so under
auto-adjust it equals :close).
sourceraw docstring

encode-path-segmentclj

(encode-path-segment s)

URL-encode a path segment (e.g., ticker symbol).

URL-encode a path segment (e.g., ticker symbol).
sourceraw docstring

errclj

(err error-map)

Construct an error result.

Construct an error result.
sourceraw docstring

kebabize-keysclj

(kebabize-keys m)

Convert all keys in map from camelCase to kebab-case.

Convert all keys in map from camelCase to kebab-case.
sourceraw docstring

okclj

(ok data)

Construct a success result.

Construct a success result.
sourceraw docstring

parse-chart-bodyclj

(parse-chart-body json-string)

Parse JSON response body into chart data or error. Pure function for testing.

Parse JSON response body into chart data or error. Pure function for testing.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close