<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">SYNOPSIS

     use Finance::BTCIndo;
    
     # API key and secret are required unless you only want to access the public
     # API. They can be retrieved by logging into your VIP account and
    
     my $btcindo = Finance::BTCIndo-&gt;new(
         key    =&gt; 'Your API key',
         secret =&gt; 'Your API secret',
     );
    
     ## public API methods, these do not require API key &amp; secret
    
     my $ticker = $btcindo-&gt;get_ticker();
     # sample result:
     {
       ticker =&gt; {
         buy =&gt; 34381600,
         high =&gt; 34890000,
         last =&gt; 34381600,
         low =&gt; 34200000,
         sell =&gt; 34431800,
         server_time =&gt; 1496219814,
         vol_btc =&gt; 506.37837851,
         vol_idr =&gt; 17409110187,
       },
     }
    
     my $trades = $btcindo-&gt;get_trades();
     # sample result:
     [
       {
         date =&gt; 1496220665,
         price =&gt; 34395100,
         amount =&gt; 0.00090000,
         tid =&gt; 2222043,
         type =&gt; "sell",
       },
       {
         date =&gt; 1496220574,
         price =&gt; 34422400,
         amount =&gt; 0.00879473,
         tid =&gt; 2222042,
         type =&gt; "buy",
       },
       ... # about 148 more
     ]
    
     my $depths = $btcindo-&gt;get_depth();
     # sample result:
     {
       buy =&gt; [
         [34397100,"0.07656322"],
         [34397000,"0.21483687"],
         # ... about 148 more
       ],
       sell =&gt; [
         [034499900, "0.00150273"],
         [034500000, "0.94493067"],
         # ... about 148 more
       ],
     }
    
     ## all the methods below requires API key &amp; secret
    
     $btcinfo-&gt;get_info();
    
     $btcinfo-&gt;get_tx_history();
    
     $btcinfo-&gt;get_trade_history(pair =&gt; "btc_idr");
    
     # create buy order of Rp 2,000,000 worth of bitcoins at price Rp 38,400,000/BTC
     $btcinfo-&gt;create_order(pair =&gt; "btc_idr", type =&gt; "buy" , price =&gt; "38400000", idr =&gt; "2000000");
    
     # create sell order of 0.01 BTC at price Rp 38,700,000/BTC
     $btcinfo-&gt;create_order(pair =&gt; "btc_idr", type =&gt; "sell", price =&gt; "38700000", btc =&gt; 0.01);
    
     $btcinfo-&gt;cancel_order(type =&gt; "sell", order_id =&gt; 9038293);

DESCRIPTION

    https://bitcoin.co.id is an Indonesian Bitcoin exchange. This module
    provides a Perl wrapper for bitcoin.co.id's Trade API.

METHODS

 new

    Constructor.

 get_ticker

    Public API.

    Arguments:

      * pair =&gt; str

      Optional, e.g. eth_btc. Default: btc_idr.

 get_trades

    Public API.

    Arguments:

      * pair =&gt; str

      Optional, e.g. eth_btc. Default: btc_idr.

 get_depth

    Public API.

    Arguments:

      * pair =&gt; str

      Optional, e.g. eth_btc. Default: btc_idr.

 tapi

    General method to call API methods. Syntax:

     $btcinfo-&gt;tapi($method, %args)

    For example:

     $btcinfo-&gt;tapi("getInfo")

    is equivalent to:

     $btcinfo-&gt;get_info()

 get_info

    This method give information about balance and server's timestamp. The
    API method name is getInfo.

    Arguments:

 get_tx_history

    This method give information about history of deposit and withdraw. The
    API method name is transHistory.

    Arguments:

 get_trade_history

    This method give information about bitcoin transaction in buying and
    selling history. The API method name is tradeHistory.

    Arguments:

      * count =&gt; int

      * from_id =&gt; int

      * to_id =&gt; int

      * order =&gt; "asc" | "desc"

      * since =&gt; epoch

      * end =&gt; epoch

      * pair =&gt; str (required)

      Currently only "btc_idr".

 get_open_orders

    This method give information about existing open order. The API method
    name is openOrders.

    Arguments:

      * pair =&gt; str (required)

      Currently only "btc_idr".

 create_order

    This method use to make a new order. The API method name is trade.

    Arguments:

      * pair =&gt; str (required)

      Currently only "btc_idr".

      * type =&gt; str (required)

      Either "buy" or "sell".

      * price =&gt; num (required)

      Price (in Rp) per bitcoin.

      * idr =&gt; num (required when type=buy)

      Amount of IDR you want to buy.

      * btc =&gt; num (required when type=sell)

      Amount of BTC you want to sell.

 cancel_order

    This method cancel existing open order. The API method name is
    cancelOrder.

    Arguments:

      * type =&gt; str (required)

      Either "buy" or "sell".

      * order_id =&gt; num (required)

SEE ALSO

    API documentation,
    https://blog.bitcoin.co.id/wp-content/uploads/2014/03/API-Documentation-Bitcoin.co_.id_.pdf

</pre></body></html>