andu::Iterable> for all inherited methods.
=head1 SEE ALSO
L<Catmandu::Iterable> , L<Catmandu::Fix> ,
L<Catmandu::Importer::CSV>, L<Catmandu::Importer::JSON> , L<Catmandu::Importer::YAML>
=cut
1;
="cexio-perl-module";
my $modver="0.2.3";
use vars qw($VERSION);
$cexio::VERSION = '0.2.3';
use JSON;
use Digest::SHA qw(hmac_sha256_hex);
use Hash::Flatten qw(:all);
use LWP::UserAgent;
my $ua = L
lic functions
sub ticker
{
my ($self, $primary, $secondary) = @_;
return $o->unflatten( $self->_json_get($cexio{urls}{api}{ticker}.$primary."/".$secondary) );
}
sub order_book
{
my ($self, $primar
@_;
if ( defined($depth) ) { $secondary .= "/?depth=${depth}"; }
return $o->unflatten( $self->_json_get($cexio{urls}{api}{order_book}.$primary."/".$secondary) );
}
sub trade_history
{
my ($self,
d_serializer',
handles => [qw(serialize deserialize)]
);
sub default_serialization_format { 'json' }
sub _build_serializer {
my ($self) = @_;
my $pkg = require_package($self->serializati
lude_filename => [qw/META.json cpanfile/] }
] # (core)
: [
'Git::GatherDir' =>
{ exclude_filename => [qw/META.json cpanfile/] }
: ()
),
'MetaYAML', # Generate META.yml (v1.4) (core)
'MetaJSON', # Generate META.json (vw) (core)
'CPANFile',
# Build system
'ExecDir', # Include
e files to include
[Git::GatherDir] ; Everything from git ls-files
exclude_filename = META.json ; Skip this generated file
[PruneCruft] ; Default stuff to skip
[ManifestSkip] ;
tion based on ketama consistent hashing
use Algorithm::ConsistentHash::Ketama;
use JSON::XS qw(encode_json decode_json);
with 'ShardedKV::Continuum';
has '_orig_continuum_spec' => (
is => 'ro',
);
lose the logger!") if $logger;
encode_json( $self->_orig_continuum_spec )
}
sub deserialize {
my $class = shift;
return $class->new(from => decode_json( $_[1] ));
}
sub clone {
my $self = s
tex::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/order.json';
use constant ATTRIBUTES => qw(currencypair mode amount price);
use constant DATA_KEY => 'orde
PI::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/orderbook.json';
use constant ATTRIBUTES => qw(currencypair);
use constant DATA_KEY => 'orderboo
::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/withdraw.json';
use constant ATTRIBUTES => qw(amount currency address);
sub amount { my $self = shift; $self
you are responsible for SSL cert verification code...
use LWP::UserAgent 6;
use URI;
use CGI;
use JSON;
use MIME::Base64;
use Time::HiRes qw(gettimeofday);
use Digest::SHA qw(hmac_sha256_hex);
use Dat
->uri . '?' . $uri->query);
}
$request->header(Accept => 'application/json');
# create a new user_agent each time...
$self->user_agent(LWP::UserAge
warn Data::Dumper->Dump([$self->http_response],['Response']) if DEBUG;
$content = $self->json->decode($self->http_response->content);
1;
} or do {
$content = {};
w
I::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/transactions.json';
use constant ATTRIBUTES => qw(currencypair days startdate enddate);
use constant DATA_KEY =>
ex::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/orders.json';
use constant ATTRIBUTES => qw(currencypair days startdate enddate);
use constant DATA_KEY =>
I::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/order_cancel.json';
use constant ATTRIBUTES => qw(id);
use constant DATA_KEY => undef;
sub url { U
;
# ABSTRACT: Perl client for the Sensu API
$Sensu::API::Client::VERSION = '0.02';
use 5.010;
use JSON;
use Carp;
use Try::Tiny;
use Moo;
use namespace::clean;
with 'Sensu::API::Client::APICaller';
irtex::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/trades.json';
use constant ATTRIBUTES => qw(currencypair days startdate enddate);
use constant DATA_KEY
irtex::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/ticker.json';
use constant ATTRIBUTES => qw(currencypair);
use constant REQUEST_TYPE => 'GET';
use constant
x::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/balance.json';
use constant ATTRIBUTES => qw();
use constant DATA_KEY => 'balance';
use constant READY
nyEvent::Handle;
use Protocol::WebSocket::Handshake::Client;
use Protocol::WebSocket::Frame;
use JSON;
use URI;
use Data::Dumper;
use constant VERBOSE => 1;
use constant DEBUG => 0;
use constant
to move and rewrite into your own module.
# within these subroutines you will have access to the json response in a hash format.
sub trade {
my $self = shift;
my $data = shift;
warn Data
my $msg = $self->frame->next) {
my $d;
eval {
$d = $self->json->decode($msg);
} or do {
my $e = $@;
warn $self->now
nyEvent::Handle;
use Protocol::WebSocket::Handshake::Client;
use Protocol::WebSocket::Frame;
use JSON;
use URI;
use Data::Dumper;
use constant VERBOSE => 1;
use constant DEBUG => 0;
use constant
to move and rewrite into your own module.
# within these subroutines you will have access to the json response in a hash format.
sub trade {
my $self = shift;
my $data = shift;
warn Data
my $msg = $self->frame->next) {
my $d;
eval {
$d = $self->json->decode($msg);
} or do {
my $e = $@;
warn $self->now
ex::API::Request);
use strict;
use constant URL => 'https://cavirtex.com/api2/user/trades.json';
use constant ATTRIBUTES => qw(currencypair days startdate enddate);
use constant DATA_KEY =>
you are responsible for SSL cert verification code...
use LWP::UserAgent 6;
use URI;
use CGI;
use JSON;
use MIME::Base64;
use Time::HiRes qw(gettimeofday);
use Digest::SHA qw(hmac_sha256_hex);
use Mat
i . '?' . $uri->query);
}
$request->header('Accept' => 'application/json');
#warn Data::Dumper->Dump([$request, $self->http_request]);
#warn sprin
DEBUG;
# apparently, the bitcoin address request returns the new addr as a string!!! (not json compatible)
if ($self->request->isa('Finance::BitStamp::API::Request::BitcoinAddress')) {