Skip to content

Commit

Permalink
Merge pull request #19 from erubboli-bfx/master
Browse files Browse the repository at this point in the history
add use_remaining to replace_order
  • Loading branch information
prdn committed Apr 25, 2016
2 parents f075c03 + 2598d8e commit 8db95ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/bitfinex/orders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ def cancel_orders(ids=nil)
# @param side [string] Either “buy” or “sell”
# @param price [decimal] Price to buy or sell at. May omit if a market order
# @param is_hidden [bool] (optional) true if the order should be hidden. Default is false
# @param use_remaining [bool] (optional) will use the amount remaining of the canceled order as the amount of the new order. Default is false
# @return [Hash] the order
# @example:
# client.replace_order(100,"usdbtc", 10, "market", "buy", 0)
def replace_order(id, symbol, amount, type, side, price, is_hidden=false)
def replace_order(id, symbol, amount, type, side, price, is_hidden=false, use_remaining=false)
params = {
order_id: id.to_i,
symbol: symbol,
Expand All @@ -91,6 +92,7 @@ def replace_order(id, symbol, amount, type, side, price, is_hidden=false)
side: side,
exchange: 'bitfinex',
is_hidden: is_hidden,
use_remaining: use_remaining,
price: price.to_s
}
authenticated_post("order/cancel/replace", params: params).body
Expand Down
2 changes: 1 addition & 1 deletion lib/bitfinex/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bitfinex
VERSION = "0.0.6"
VERSION = "0.0.7"
end

0 comments on commit 8db95ac

Please sign in to comment.