Finance-CoinbasePro-Lite

 view release on metacpan or  search on metacpan

lib/Finance/CoinbasePro/Lite.pm  view on Meta::CPAN

            ("CB-ACCESS-TIMESTAMP" => $time  ) x !!$is_private,
            ("CB-ACCESS-PASSPHRASE" => $self->{passphrase}) x !!$is_private,,
            "Content-Type"   => "application/json",
            "Accept"         => "application/json",
        },
        (content => $body) x !!defined($body),
    };

    my $res = $self->{_http}->request($method, $url, $options);

    if ($res->{headers}{'content-type'} =~ m!application/json!) {
        $res->{content} = $self->{_json}->decode($res->{content});
    }

    log_trace("API response [%s]: %s", $time, $res->{content});

    my $reason = $res->{reason};
    if ($res->{status} != 200 &&
            ref($res->{content}) eq 'HASH' && $res->{content}{message}) {
        $reason .= ": $res->{content}{message}";
    }



( run in 1.396 second using v1.01-cache-2.11-cpan-d7f47b0818f )