The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

This document describes version 0.010 of App::cryp::Role::ArbitStrategy (from Perl distribution App-cryp-arbit), released on 2021-05-26.

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

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-cryp-arbit.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-cryp-arbit.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/perlancar/perl-App-cryp-arbit/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

App::cryp::arbit

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

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021, 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.