Finance-CoinbasePro-Lite
view release on metacpan or search on metacpan
lib/Finance/CoinbasePro/Lite.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Finance::CoinbasePro::Lite - Client API library for Coinbase Pro (lite edition)
=head1 VERSION
This document describes version 0.004 of Finance::CoinbasePro::Lite (from Perl distribution Finance-CoinbasePro-Lite), released on 2018-11-29.
=head1 SYNOPSIS
use Finance::CoinbasePro::Lite;
my $cbp = Finance::CoinbasePro::Lite->new(
key => 'Your API key',
secret => 'Your API secret',
passphrase => 'Your API passphrase',
);
my $res = $cbp->public_request(GET => "/products");
# [
# 200,
# "OK",
# [
# {
# base_currency => "BCH",
# base_max_size => 200,
# ...
# },
# ...
# ]
# ]
my $res = $cbp->private_request(GET => "/coinbase-accounts");
# [
# 200,
# "OK",
# [
# {
# active => 1,
# balance => "0.00",
# currency => "USD",
# name => "USD wallet",
# ...
# },
# ...
# ]
# ]
my $res = $cbp->private_request(POST => "/reports", {
type => "fills",
start_date => "2018-02-01T00:00:00.000Z",
end_date => "2018-02-01T00:00:00.000Z",
});
=head1 DESCRIPTION
Coinbase Pro, L<https://pro.coinbase.com>, is a US cryptocurrency exchange. This
module provides a Perl wrapper for Coinbase Pro's API. Please peruse the
Coinbase Pro API reference to see which API endpoints are available.
=head1 METHODS
=head2 new
Usage: new(%args)
Constructor. Known arguments:
=over
=item * key
=item * secret
=item * passphrase
=back
=head2 public_request
Usage: public_request($method, $request_path [, \%params ]) => [$status_code, $message, $content]
Will send HTTP request and decode the JSON body for you.
=head2 private_request
Usage: public_request($method, $request_path [, \%params ]) => [$status_code, $message, $content]
Will send and sign HTTP request and decode the JSON body for you.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/Finance-CoinbasePro-Lite>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-Finance-CoinbasePro-Lite>.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Finance-CoinbasePro-Lite>
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.
=head1 SEE ALSO
Coinbase Pro API Reference, L<https://docs.pro.coinbase.com/>
L<Finance::GDAX::API>
CLI's: L<Finance::CoinbasePro::API::CLI>, L<coinbasepro-lite> from
L<App::coinbase::lite>
=head1 AUTHOR
perlancar <perlancar@cpan.org>
( run in 2.136 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )