NbpReq.Rate (NbpReq v0.1.0)

Copy Markdown View Source

A single exchange rate entry.

Rates coming from tables A and B carry a :mid (average) value, while table C rates carry :bid/:ask values. Fields that are absent in the API response are nil.

When the rate is part of a currency time series (NbpReq.rates/3), the :no (table number) and :effective_date fields are set instead of :currency/:code, which then live on the parent NbpReq.CurrencyRates.

Summary

Types

t()

@type t() :: %NbpReq.Rate{
  ask: number() | nil,
  bid: number() | nil,
  code: String.t() | nil,
  currency: String.t() | nil,
  effective_date: Date.t() | nil,
  mid: number() | nil,
  no: String.t() | nil,
  trading_date: Date.t() | nil
}