App-coinbasepro-lite

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     private(%args) -> [status, msg, payload, meta]

    Perform a public API request.

    This function is not exported.

    Arguments ('*' denotes required arguments):

    *   args => *hash*

    *   endpoint* => *str*

    *   key* => *str*

    *   method => *str* (default: "GET")

    *   passphrase* => *str*

    *   secret* => *str*

    Returns an enveloped result (an array).

README  view on Meta::CPAN

     public(%args) -> [status, msg, payload, meta]

    Perform a public API request.

    This function is not exported.

    Arguments ('*' denotes required arguments):

    *   args => *hash*

    *   endpoint* => *str*

    *   method => *str* (default: "GET")

    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 (payload) is optional, the actual result. Fourth element (meta)
    is called result metadata and is optional, a hash that contains extra

lib/App/coinbasepro/lite.pm  view on Meta::CPAN

our $VERSION = '0.003'; # VERSION

use 5.010001;
use strict;
use warnings;
use Log::ger;

our %SPEC;

my %args_common = (
    endpoint => {
        schema => 'str*', # XXX uri
        req => 1,
        pos => 0,
    },
    args => {
        'x.name.is_plural' => 1,
        'x.name.singular' => 'arg',
        schema => ['hash*', of=>'str'],
        pos => 1,
        greedy => 1,

lib/App/coinbasepro/lite.pm  view on Meta::CPAN

    summary => 'Perform a public API request',
    args => {
        %args_common,
    },
};
sub public {
    my %args = @_;
    _init(\%args);
    $clipub->public_request(
        $args{method},
        $args{endpoint},
        $args{args},
    );
}

$SPEC{private} = {
    v => 1.1,
    summary => 'Perform a public API request',
    args => {
        %args_credentials,
        %args_common,
    },
};
sub private {
    my %args = @_;
    _init(\%args);
    $clipriv->private_request(
        $args{method},
        $args{endpoint},
        $args{args},
    );
}

1;
# ABSTRACT: Thin CLI for Coinbase Pro API

__END__

=pod

lib/App/coinbasepro/lite.pm  view on Meta::CPAN

Perform a public API request.

This function is not exported.

Arguments ('*' denotes required arguments):

=over 4

=item * B<args> => I<hash>

=item * B<endpoint>* => I<str>

=item * B<key>* => I<str>

=item * B<method> => I<str> (default: "GET")

=item * B<passphrase>* => I<str>

=item * B<secret>* => I<str>

=back

lib/App/coinbasepro/lite.pm  view on Meta::CPAN

Perform a public API request.

This function is not exported.

Arguments ('*' denotes required arguments):

=over 4

=item * B<args> => I<hash>

=item * B<endpoint>* => I<str>

=item * B<method> => I<str> (default: "GET")

=back

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

script/coinbasepro-lite  view on Meta::CPAN

=over

=item B<--arg>=I<s>%

Each value is a name-value pair, use I<key=value> syntax. Can be specified multiple times.

=item B<--args-json>=I<s>

See C<--arg>.

=item B<--endpoint>=I<s>*

=item B<--key>=I<s>*

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

Default value:

 "GET"

=item B<--passphrase>=I<s>*

script/coinbasepro-lite  view on Meta::CPAN

=over

=item B<--arg>=I<s>%

Each value is a name-value pair, use I<key=value> syntax. Can be specified multiple times.

=item B<--args-json>=I<s>

See C<--arg>.

=item B<--endpoint>=I<s>*

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

Default value:

 "GET"

=back

=head1 COMPLETION

script/coinbasepro-lite  view on Meta::CPAN


=head2 Common for all subcommands

 format (see --format)
 log_level (see --log-level)
 naked_res (see --naked-res)

=head2 Configuration for subcommand private

 args (see --arg)
 endpoint (see --endpoint)
 key (see --key)
 method (see --method)
 passphrase (see --passphrase)
 secret (see --secret)

=head2 Configuration for subcommand public

 args (see --arg)
 endpoint (see --endpoint)
 method (see --method)

=head1 ENVIRONMENT

=head2 COINBASEPRO_LITE_OPT => str

Specify additional command-line options.

=head1 FILES



( run in 0.266 second using v1.01-cache-2.11-cpan-27979f6cc8f )