Liking cljdoc? Tell your friends :D

clojure-finance.ecbjure.fx


convertclj

(convert converter amount from)
(convert converter amount from to)
(convert converter amount from to date)

Convert amount from currency from to currency to on date. If date is omitted, uses the last available date for from. If to is omitted, uses ref-currency (EUR).

Convert amount from currency `from` to currency `to` on `date`.
If date is omitted, uses the last available date for `from`.
If `to` is omitted, uses ref-currency (EUR).
sourceraw docstring

cross-rateclj

(cross-rate converter currency-a currency-b date)

Return the cross rate from currency-a to currency-b on date. Handles ref-currency (EUR) as either argument, returning 1/rate or rate directly.

Return the cross rate from currency-a to currency-b on date.
Handles ref-currency (EUR) as either argument, returning 1/rate or rate directly.
sourceraw docstring

ecb-daily-urlclj

ECB latest-day FX rates ZIP (single business day, updated daily).

ECB latest-day FX rates ZIP (single business day, updated daily).
sourceraw docstring

ecb-urlclj

ECB historical FX rates ZIP (daily reference rates since 1999, ~42 currencies).

ECB historical FX rates ZIP (daily reference rates since 1999, ~42 currencies).
sourceraw docstring

get-rateclj

(get-rate converter currency date)

Return the EUR-referenced rate for currency on date. For the ref-currency itself (EUR), always returns 1.0.

Return the EUR-referenced rate for currency on date.
For the ref-currency itself (EUR), always returns 1.0.
sourceraw docstring

make-converterclj

(make-converter)
(make-converter source)
(make-converter source opts)

Build a converter map from a source. source: nil (default) fetches latest data from ECB URL, or pass a URL string or file path. opts: map with keys :fallback, :ref-currency, :cast-fn, :na-values. :fallback - false (default, throw on out-of-bounds), :before, :after, :nearest, or true (alias for :nearest).

Build a converter map from a source.
source: nil (default) fetches latest data from ECB URL, or pass a URL string or file path.
opts: map with keys :fallback, :ref-currency, :cast-fn, :na-values.
:fallback - false (default, throw on out-of-bounds), :before, :after, :nearest, or true (alias for :nearest).
sourceraw docstring

make-converter-from-linesclj

(make-converter-from-lines lines)
(make-converter-from-lines lines opts)

Build a converter from an already-loaded seq of CSV lines.

Build a converter from an already-loaded seq of CSV lines.
sourceraw docstring

rate-historyclj

(rate-history {:keys [rates]} currency)

Return the full sorted-map of {date rate} for a currency.

Return the full sorted-map of {date rate} for a currency.
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