NAME
    App::fiatx - Fiat currency exchange rate tool

VERSION
    This document describes version 0.007 of App::fiatx (from Perl
    distribution App-fiatx), released on 2018-06-27.

SYNOPSIS
    See the included script fiatx.

FUNCTIONS
  sources
    Usage:

     sources() -> [status, msg, result, meta]

    List available sources.

    This function is not exported.

    No arguments.

    Returns an enveloped result (an array).

    First element (status) is an integer containing HTTP status code (200
    means OK, 4xx caller error, 5xx function error). Second element (msg) is
    a string containing error message, or 'OK' if status is 200. Third
    element (result) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra
    information.

    Return value: (any)

  spot_rates
    Usage:

     spot_rates(%args) -> [status, msg, result, meta]

    Get spot (latest) rate(s) from a source.

    This function is not exported.

    Arguments ('*' denotes required arguments):

    *   db_name* => *str*

    *   db_password => *str*

    *   db_username => *str*

    *   max_age_cache => *nonnegint* (default: 14400)

        Above this age (in seconds), we retrieve rate from remote source
        again.

    *   pair => *currency::pair*

    *   per_type => *bool*

        Return one row of result per rate type.

        This allow seeing notes and different mtime per rate type, which can
        be different between different types of the same source.

    *   source => *str* (default: ":all")

        Ask for a specific remote source.

        If you want a specific remote source, you can specify it here. The
        default is ':any' which is to pick the first source that returns a
        recent enough current rate.

        Other special values: ":highest" to return highest rate of all
        sources, ":lowest" to return lowest rate of all sources, ':newest'
        to return rate from source with the newest last update time,
        ':oldest' to return rate from source with the oldest last update
        time, ':average' to return arithmetic average of all sources.

    *   type => *str*

        Which rate is wanted? e.g. sell, buy.

    Returns an enveloped result (an array).

    First element (status) is an integer containing HTTP status code (200
    means OK, 4xx caller error, 5xx function error). Second element (msg) is
    a string containing error message, or 'OK' if status is 200. Third
    element (result) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra
    information.

    Return value: (any)

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/App-fiatx>.

SOURCE
    Source repository is at <https://github.com/perlancar/perl-App-fiatx>.

BUGS
    Please report any bugs or feature requests on the bugtracker website
    <https://rt.cpan.org/Public/Dist/Display.html?Name=App-fiatx>

    When submitting a bug or request, please include a test-file or a patch
    to an existing test-file that illustrates the bug or desired feature.

SEE ALSO
    Finance::Currency::FiatX

AUTHOR
    perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE
    This software is copyright (c) 2018 by perlancar@cpan.org.

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.