Liking cljdoc? Tell your friends :D

monero-store.collect.rates

Public price tickers behind one port, described as data.

Adding an exchange — or a whole new pair — is a map entry in sources; nothing here branches on which exchange it is. A source that fails is simply absent from the round, and the quote layer above decides whether what came back is enough to price a sale.

Public price tickers behind one port, described as data.

Adding an exchange — or a whole new pair — is a map entry in `sources`;
nothing here branches on which exchange it is. A source that fails is simply
absent from the round, and the quote layer above decides whether what came
back is enough to price a sale.
raw docstring

->numberclj

(->number x)

x as a positive number, or nil. Tickers quote prices as strings as often as they quote them as numbers.

`x` as a positive number, or nil. Tickers quote prices as strings as often
as they quote them as numbers.
sourceraw docstring

->sourceclj

(->source profile client now-fn)

IRateSource over the ticker profile describes.

now-fn stamps the reading, because a ticker rarely says when it last traded — and a reading with no time cannot be aged out.

IRateSource over the ticker `profile` describes.

`now-fn` stamps the reading, because a ticker rarely says when it last
traded — and a reading with no time cannot be aged out.
sourceraw docstring

extractclj

(extract payload path)

The positive number at path in payload, or nil.

The positive number at `path` in `payload`, or nil.
sourceraw docstring

feedclj

(feed {:keys [rate-sources ttl-ms now-fn]
       :or {ttl-ms 60000 now-fn (fn* [] (Date.))}})

A cached round over rate-sources, as a 0-arity function.

At most one round of network per :ttl-ms; a round that yields nothing is not cached, so a total outage retries instead of pinning an empty result.

A cached round over `rate-sources`, as a 0-arity function.

At most one round of network per `:ttl-ms`; a round that yields nothing is
not cached, so a total outage retries instead of pinning an empty result.
sourceraw docstring

fixed-sourceclj

(fixed-source {:keys [id pair price now-fn] :or {now-fn (fn* [] (Date.))}})

IRateSource that always reports price. Development and tests.

IRateSource that always reports `price`. Development and tests.
sourceraw docstring

IRateSourcecljprotocol

spotclj

(spot this)

This source's current price for its pair, as a Rate, or nil.

This source's current price for its pair, as a Rate, or nil.
source

registryclj

(registry {:keys [client now-fn source-profiles]
           :or {now-fn (fn* [] (Date.)) source-profiles sources}})

An IRateSource per profile in source-profiles.

An IRateSource per profile in `source-profiles`.
sourceraw docstring

roundclj

(round rate-sources)

Every rate the sources can supply now. Sources that fail are absent.

Every rate the sources can supply now. Sources that fail are absent.
sourceraw docstring

sourcesclj

Independent public tickers, none of which needs an account or a key.

:source/path is where the price sits in the parsed body, and :source/pair is [base quote] — the price is how many quote units one whole base unit costs.

Independent public tickers, none of which needs an account or a key.

`:source/path` is where the price sits in the parsed body, and
`:source/pair` is [base quote] — the price is how many `quote` units one
whole `base` unit costs.
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