App-coinbasepro-lite

 view release on metacpan or  search on metacpan

script/coinbasepro-lite  view on Meta::CPAN

#!perl

our $DATE = '2018-11-29'; # DATE
our $VERSION = '0.003'; # VERSION

use 5.010001;
use strict;
use warnings;

use Perinci::CmdLine::Any;

my $prefix = '/App/coinbasepro/lite/';

Perinci::CmdLine::Any->new(
    url => $prefix,
    subcommands => {
        public  => { url => "${prefix}public", },
        private => { url => "${prefix}private", },
    },
    log => 1,
)->run;

# ABSTRACT: Thin CLI for Coinbase Pro API
# PODNAME: coinbasepro-lite

__END__

=pod

=encoding UTF-8

=head1 NAME

coinbasepro-lite - Thin CLI for Coinbase Pro API

=head1 VERSION

This document describes version 0.003 of coinbasepro-lite (from Perl distribution App-coinbasepro-lite), released on 2018-11-29.

=head1 SYNOPSIS

First, create an account at Coinbase Pro. Create an API then insert the API information
in F<~/.config/coinbasepro-lite.conf>. Since the configuration file contains sensitive
information, please make sure that the permission of the file is set so that
unauthorized users cannot read it (e.g. chmod it to 0600).

 # In ~/.config/coinbasepro-lite.conf
 key = ...
 secret = ...
 passphrase = ...

To perform a public request:

 # list all products (currency pairs or markets)
 % coinbasepro-lite public /products

 # get order book for a product
 % coinbasepro-lite public /products/BTC-USD/book?level=2

To perform a private request:

 % coinbasepro-lite private /coinbase-accounts
 % coinbasepro-lite private /reports --arg type=fills --arg start_date=2018-02-01T00:00:00.000Z --arg end_date=2018-02-10T00:00:00.000Z

=head1 DESCRIPTION

This package offers a thin CLI for accessing Coinbase Pro API (public or
private), mainly for debugging/testing.

=head1 SUBCOMMANDS

=head2 B<private>

Perform a public API request.

=head2 B<public>

Perform a public API request.

=head1 OPTIONS

C<*> marks required options.

=head2 Common options

=over

=item B<--config-path>=I<filename>, B<-c>

Set path to configuration file.

=item B<--config-profile>=I<s>, B<-P>

Set configuration profile to use.

=item B<--debug>

Shortcut for --log-level=debug.

=item B<--format>=I<s>

Choose output format, e.g. json, text.

Default value:



( run in 0.685 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )