App-indodax
view release on metacpan or search on metacpan
script/indodax view on Meta::CPAN
my $prefix = '/App/indodax/';
Perinci::CmdLine::Any->new(
url => $prefix,
subcommands => {
public => { url => "${prefix}public" },
private => { url => "${prefix}private" },
# public
ticker => { url => "${prefix}ticker", },
trades => { url => "${prefix}trades", },
depth => { url => "${prefix}depth", },
"price-history" => { url => "${prefix}price_history", },
pairs => { url => "${prefix}pairs", },
info => { url => "${prefix}info", },
balance => { url => "${prefix}balance", },
"tx-history" => { url => "${prefix}tx_history", },
"trade-history" => { url => "${prefix}trade_history", },
"open-orders" => { url => "${prefix}open_orders", },
"create-order" => { url => "${prefix}create_order", },
"cancel-order" => { url => "${prefix}cancel_order", },
"cancel-orders" => { url => "${prefix}cancel_orders", },
"cancel-all-orders" => { url => "${prefix}cancel_all_orders", },
"hold-details" => { url => "${prefix}hold_details", },
# aliases
"trade" => { url => "${prefix}create_order", },
# not yet
"profit" => { url => "${prefix}profit", show_in_help => 0, },
"trade-history-total" => { url => "${prefix}trade_history_total", show_in_help => 0 },
},
log => 1,
)->run;
# ABSTRACT: CLI for Indodax.com
# PODNAME: indodax
__END__
=pod
=encoding UTF-8
=head1 NAME
indodax - CLI for Indodax.com
=head1 VERSION
This document describes version 0.024 of indodax (from Perl distribution App-indodax), released on 2018-06-12.
=head1 SYNOPSIS
First, create an account at L<https://bitcoin.co.id>, create the trade API key
then insert the API key and secret key in F<~/.config/indodax.conf>. Since the
configuration file contains the API secret key, please make sure that the
permission of the file is set so that unauthorized users cannot read it (e.g.
chmod it to 0600).
# In ~/.config/indodax.conf
key = ...
secret = ...
To list available pairs:
% indodax pairs
To show ticker:
% indodax ticker ;# default pair: btc_idr
% indodax ticker --pair eth_idr
To show latest trades:
% indodax trades
To show your balance:
% indodax balance
To show transaction history (Rupiah deposits & withdrawals):
% indodax tx-history
To show your trade history:
% indodax trade-history
% indodax trade-history --time-from 2017-05-31
% indodax trade-history --trade-id-from 1200000 --trade-id-to 1200100
To show your open/pending orders:
% indodax open-orders
To create a new order:
# buy Rp 1.500.000-worth of bitcoin at Rp 34.000.000/BTC
% indodax trade buy 34000000 --idr 1500000
# sell 0.01 bitcoin at Rp 38.000.000/BTC (create-order is alias for trade)
% indodax create-order sell 38000000 --btc 0.01
Cancel an existing order:
% indodax cancel-order sell 2345678 ;# btc_idr
% indodax cancel-order sell 345678 --pair bch_idr
Cancelling multiple orders in one go:
% indodax cancel-all-orders
% indodax cancel-orders --type buy
% indodax cancel-orders --type buy --pair btc_idr
% indodax cancel-orders --currency idr
For other available commands, see the help message or documentation:
% indodax -h
( run in 0.462 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )