Finance-CoinbasePro-API-CLI

 view release on metacpan or  search on metacpan

bin/coinbasepro.pl  view on Meta::CPAN


    my $config_filename = get_config_filename();
    my $config          = $config_filename ? get_config($config_filename) : {};
    my @creds           = (
        key    => $config->{coinbasepro}{api_key}    || $ENV{GDAX_API_KEY} || "",
        secret => $config->{coinbasepro}{api_secret} || $ENV{GDAX_API_SECRET} || "",
        passphrase => $config->{coinbasepro}{api_passphrase} || $ENV{GDAX_API_PASSPHRASE} || "",
        debug => 0
    );
    if ( !$creds[0]  || !$creds[1] || !$creds[2] ) {
        warn "$prog: no credentials in " . join(", ", get_possible_config_filenames()) . " or env vars GDAX_API_(KEY|SECRET|PASSPHRASE)\n";
    }

    $SIG{__DIE__}  = \&Carp::confess;
    $SIG{__WARN__} = \&Carp::confess;

    my @products    = $product ? ($product) : (@all_products);

    ## ACCOUNTS
    if ( $action eq "accounts" ) {
        my $gaccount     = Finance::GDAX::API::Account->new(@creds);



( run in 0.229 second using v1.01-cache-2.11-cpan-4d50c553e7e )