{{- $from := .Get "from" -}} {{- $to := default "CNY" (.Get "to") -}} {{- $value := float (.Get "value") -}} {{- with getJSON (printf "https://api.exchangerate-api.com/v4/latest/%s" $from) -}} {{- lang.FormatCurrency 2 $from $value -}} ( ≈ {{ lang.FormatCurrency 2 $to (mul $value (index .rates $to)) }}) {{- end -}}