Giter Club home page Giter Club logo

poloniex-api's Introduction

Poloniex-API

Poloniex API wrapper for perl

API DOCUMENTATION https://poloniex.com/support/api/

perl

SYNOPSIS

use Poloniex::API; 

my $api = Poloniex::API->new(
	APIKey => 'your-api-key',
	Secret => 'your-secret-key'
);

new

my $iterator = Poloniex::API->new(%hash);

Creates a new Poloniex::API instance.

api_trading

my $returnCompleteBalances = $api->api_trading('returnCompleteBalances');
$api->api_trading('returnTradeHistory', {
    currencyPair => 'BTC_ZEC'
});

This method performs a query on a private API. The request uses the api key and the secret key here's a list

api_public

my $Ticker = $api->api_public('returnTicker');

my $ChartData    = $api->api_public('returnChartData', {
    currencyPair => 'BTC_XMR',
    start        => 1405699200,
    end          => 9999999999,
    period       => 14400
});

This method performs an API request. The first argument must be the method name here's a list

parse_error

handle_api_error($api, $api->api_public('fake'))

sub handle_api_error {
    my ( $api, $retval ) = @_;
    unless ( $retval ) {
        die sprintf("Error: %s; type: %s", $api->{msg}, $mapi->{type});
    }
}

AUTHOR

vlad mirkos, [email protected]

COPYRIGHT AND LICENSE

Copyright (C) 2017 by vlad mirkos
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.18.2 or,
at your option, any later version of Perl 5 you may have available.

poloniex-api's People

Contributors

mirkos-vf avatar robin13 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

robin13

poloniex-api's Issues

Requires perl 5.22?

The Makefile.PL says it requires perl 5.22, but I don't see anything in the code which would ... works fine for me if I force install it on perl 5.18.

Bareword found where operator expected

http://www.cpantesters.org/cpan/report/2d95b308-e6c4-11e8-afbf-aec3b07506ca

Bareword found where operator expected at /mnt/nas/home/pi2c/njh/.cpan/build/Poloniex-API-0.04-4/blib/lib/Poloniex/API.pm line 51, near "s/.//r"
syntax error at /mnt/nas/home/pi2c/njh/.cpan/build/Poloniex-API-0.04-4/blib/lib/Poloniex/API.pm line 51, near "s/.//r"
Compilation failed in require at t/Poloniex-API.t line 11.
BEGIN failed--compilation aborted at t/Poloniex-API.t line 11.
t/Poloniex-API.t .. skipped: (no reason given)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.