The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::cryp::Role::ArbitStrategy - Role for arbitration strategy module

VERSION

This document describes version 0.001 of App::cryp::Role::ArbitStrategy (from Perl distribution App-cryp-arbit), released on 2018-06-25.

DESCRIPTION

An arbitration strategy module is picked by the main arbit module (App::cryp::arbit). It must supply a calculate_order_pairs class method. This class method is given some arguments (see "calculate_order_pairs" for more details), and then must return order pairs. The order pairs will be created on the exchanges by the main arbit module.

REQUIRED METHODS

calculate_order_pairs

Usage:

 __PACKAGE__->calculate_order_pairs(%args) => [$status, $reason, $payload, \%resmeta]

Will be fed these arguments:

  • r

    Hash. The Perinci::CmdLine request hash/stash, which contains many information inside it, for example:

     $r->{_cryp}     # information from the configuration, e.g. exchanges, wallets, masternodes
     $r->{_stash}
       {dbh}
       ...

    See App::cryp::arbit for more details.

INTERNAL NOTES

BUGS

Please report all bug reports or feature requests to mailto:stevenharyanto@gmail.com.

SEE ALSO

App::cryp::arbit

App::cryp::arbit::Strategy::* modules.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.