perlancar

NAME

App::CryptoCurrencyUtils - CLI utilities related to cryptocurrencies

VERSION

This document describes version 0.011 of App::CryptoCurrencyUtils (from Perl distribution App-CryptoCurrencyUtils), released on 2018-03-08.

DESCRIPTION

This distribution contains the following CLI utilities:

FUNCTIONS

coin_cmc_summary

Usage:

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

Get coin's CMC (coinmarketcap.com) summary.

Currently retrieves https://api.coinmarketcap.com/v1/ticker/<coin-id>/ and return the data in a table.

If no coins are specified, will return global data.

This function is not exported.

Arguments ('*' denotes required arguments):

  • coins => array[cryptocurrency::code_or_name]

  • convert => str

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)

global_cmc_summary

Usage:

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

Get global CMC (coinmarketcap.com) summary.

Currently retrieves https://api.coinmarketcap.com/v1/ticker/<coin-id>/ and

This function is not exported.

Arguments ('*' denotes required arguments):

  • convert => str

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)

list_cmc_coins

Usage:

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

List of all coins listed on coinmarketcap.com (CMC) along with their marketcaps, ranks, etc.

This utility basically parses https://coinmarketcap.com/all/views/all/ into table data.

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)

list_coins

Usage:

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

List cryptocurrency coins.

This utility lists coins from CryptoCurrency::Catalog, which in turn gets its list from https://coinmarketcap.com/.

This function is not exported.

Arguments ('*' denotes required arguments):

  • codes => true

    Only list codes.

  • names => true

    Only list names.

  • safenames => true

    Only list safenames.

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)

list_exchanges

Usage:

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

List cryptocurrency exchanges.

This utility lists cryptocurrency exchanges from CryptoExchange::Catalog, which in turn gets its list from https://coinmarketcap.com/.

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)

open_coin_cmc

Usage:

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

Open coin's CMC (coinmarketcap.com) currency page in the browser.

This function is not exported.

Arguments ('*' denotes required arguments):

  • coins* => array[cryptocurrency::code_or_name]

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)

open_coin_mno

Usage:

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

Open coin's MNO (masternodes.online) currency page in the browser.

Currently does not perform any translation between CMC -> MNO currency code if there is a difference.

This function is not exported.

Arguments ('*' denotes required arguments):

  • coins* => array[cryptocurrency::code_or_name]

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)

open_exchange_cmc

Usage:

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

Open exchange's CMC (coinmarketcap.com) exchange page in the browser.

This function is not exported.

Arguments ('*' denotes required arguments):

  • exchanges* => array[cryptoexchange::name]

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-CryptoCurrencyUtils.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-CryptoCurrencyUtils.

BUGS

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

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

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.