Liking cljdoc? Tell your friends :D

midas.client

MIDAS API client.

Spec-driven HTTP client built on Martian. The OpenAPI spec bundled in resources/midas-spec/openapi.yaml is the single source of truth for endpoint definitions and parameter validation.

Authentication flow:

  1. Call (get-token username password) to obtain a 10-minute bearer token
  2. Call (create-client token) to create an authenticated Martian client
  3. Use the client with API functions (rin-list, rate-values, etc.)
MIDAS API client.

Spec-driven HTTP client built on Martian. The OpenAPI spec bundled in
resources/midas-spec/openapi.yaml is the single source of truth for
endpoint definitions and parameter validation.

Authentication flow:
  1. Call (get-token username password) to obtain a 10-minute bearer token
  2. Call (create-client token) to create an authenticated Martian client
  3. Use the client with API functions (rin-list, rate-values, etc.)
raw docstring

midas.entities

MIDAS entity coercion: raw API responses → idiomatic Clojure maps.

Two-layer data model: Raw layer — direct JSON→EDN, PascalCase keys, string values Coerced layer — namespaced keywords, native types (java.time, BigDecimal)

Time handling: every coerced timestamp is a ZonedDateTime in the zone configured on the client (per-instance via :zone, default America/Los_Angeles). MIDAS mixes Z-suffixed UTC fields with bare wall-clock fields on the wire; both are normalised to ZonedDateTime in the configured zone — the instant is preserved for Z-suffixed values and assumed-zone-local for bare values. See https://github.com/grid-coordination/midas-api-specs/blob/main/doc/datetime-and-timezone.md

All coerced entities carry the original raw data as :midas/raw metadata.

MIDAS entity coercion: raw API responses → idiomatic Clojure maps.

Two-layer data model:
  Raw layer   — direct JSON→EDN, PascalCase keys, string values
  Coerced layer — namespaced keywords, native types (java.time, BigDecimal)

Time handling: every coerced timestamp is a `ZonedDateTime` in the zone
configured on the client (per-instance via `:zone`, default
`America/Los_Angeles`). MIDAS mixes Z-suffixed UTC fields with bare
wall-clock fields on the wire; both are normalised to ZonedDateTime in
the configured zone — the instant is preserved for Z-suffixed values
and assumed-zone-local for bare values. See
https://github.com/grid-coordination/midas-api-specs/blob/main/doc/datetime-and-timezone.md

All coerced entities carry the original raw data as :midas/raw metadata.
raw docstring

midas.entities.schema

Malli schemas for coerced MIDAS entities (the public contract).

Malli schemas for coerced MIDAS entities (the public contract).
raw 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