def buy(rate, amount=BigDecimal.new(0))
      have_key?
      address = @url_private + "/trade_add/"
      params = {
        "amount" => amount.to_f.round(4),
        "price"  => rate.to_i,
        "type"   => "buy",
      }
      h = post_ssl_with_sign(address, params)
      {
        "success"    => h["result"].to_s,
        "id"         => h["id"].to_s,
        "rate"       => BigDecimal.new(rate.to_s),
        "amount"     => BigDecimal.new(amount.to_s),
        "order_type" => "sell",
        "ltimestamp" => Time.now.to_i,
      }
    end
def buy(rate, amount=BigDecimal.new(0))
      have_key?
      address = @url_private + "/trade_add/"
      params = {
        "amount" => amount.to_f.round(4),
        "price"  => rate.to_i,
        "type"   => "buy",
      }
      h = post_ssl_with_sign(address, params)
      {
        "success"    => h["result"].to_s,
        "id"         => h["id"].to_s,
        "rate"       => BigDecimal.new(rate.to_s),
        "amount"     => BigDecimal.new(amount.to_s),
        "order_type" => "sell",
        "ltimestamp" => Time.now.to_i,
      }
    end
Bought the amount of Bitcoin at the rate.
 指数注文 買い.
 Abstract Method.
 @param [BigDecimal] rate
 @param [BigDecimal] amount # minimal trade amount is 0.01 BTC
 @return [hash] history_order_hash
   success: [String] "true" or "false"
   id: [String] order id at the market
   rate: [BigDecimal]
   amount: [BigDecimal] minimal amount is 0.01 BTC
   order_type: [String] "sell" or "buy"
   ltimestamp: [int] ローカルタイムスタンプ