Payzum.Rates (Payzum v0.1.0)

Copy Markdown View Source

The public estimate and minimum-amount endpoints.

Summary

Functions

Convert an amount between two currencies.

The minimum amount for a currency pair.

Functions

estimate(client, amount, from, to)

@spec estimate(Payzum.Client.t(), String.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}

Convert an amount between two currencies.

min_amount(client, from, to)

@spec min_amount(Payzum.Client.t(), String.t(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}

The minimum amount for a currency pair.

The endpoint ignores the network — eth reports the mainnet minimum even when the cheapest chain is 20x lower — so treat it as a floor.