Skip to content
Currencies

Price in the visitor currency.

Convert a price off the published rate, and carry the moment it was observed beside the amount you charge.

The direction

Four keys say which way.

Three pairs touch four currencies. Every couple that includes the base is one published rate and one operation; every couple that does not is two rates and a step of your own.

  • 6published, direct
  • 6yours to compute
  • 4the same currency
How many published rates each conversion reads: none down the diagonal, one wherever LIAW publishes the pair, two for a couple it does not.
From ↓ / IntoUSDEURGBPJPY
USDUSD into itself needs no rate
EUREUR into itself needs no rate
GBPGBP into itself needs no rate
JPYJPY into itself needs no rate

EUR into GBP

yours to compute
Route
EUR → USD → GBP
Rate
1 EUR = 0.860317 GBP
EUR/USD
1.1385asset EUR · quote USD
GBP/USD
1.32335asset GBP · quote USD
What it costs to ask
GET /v1/prices/latest?assets=EUR,GBP

LIAW publishes neither this pair nor a settlement rate for it. The figure below is computed here, from the two rates above, and it is yours.

assetstring
The base of the pair — the side the rate is pricing.
quotestring
The side it is priced in, echoed per row, so a lookup cannot mismatch.
pricestring
The rate as a decimal string, so a converted total stays exact.
updated_atstring
The observation time to store beside any amount you charge.
How a converted price is made

Two calls, one operation.

  • One call carries a shared quote.

    Both pairs quoted in the base ride one request, so a one in the grid costs one line.

    GET /v1/prices/latest?assets=EUR,GBP

  • The other quote is its own call.

    One pair is quoted in yen, and quote is a request-level parameter, so it needs its own call.

    GET /v1/prices/latest?assets=USD&quote=JPY

  • The direction costs nothing.

    The row already says which side is priced, so it already says which way to go.

    shown = amount ÷ rate · no request

  • The pair itself is refused.

    The parameter refuses the pair itself, so a two in the grid is two rates and your step.

    assets=EUR&quote=GBP · 400 INVALID_QUOTE