Skip to content

Commit 8db95ac

Browse files
committed
Merge pull request #19 from erubboli-bfx/master
add use_remaining to replace_order
2 parents f075c03 + 2598d8e commit 8db95ac

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/bitfinex/orders.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ def cancel_orders(ids=nil)
7979
# @param side [string] Either “buy” or “sell”
8080
# @param price [decimal] Price to buy or sell at. May omit if a market order
8181
# @param is_hidden [bool] (optional) true if the order should be hidden. Default is false
82+
# @param use_remaining [bool] (optional) will use the amount remaining of the canceled order as the amount of the new order. Default is false
8283
# @return [Hash] the order
8384
# @example:
8485
# client.replace_order(100,"usdbtc", 10, "market", "buy", 0)
85-
def replace_order(id, symbol, amount, type, side, price, is_hidden=false)
86+
def replace_order(id, symbol, amount, type, side, price, is_hidden=false, use_remaining=false)
8687
params = {
8788
order_id: id.to_i,
8889
symbol: symbol,
@@ -91,6 +92,7 @@ def replace_order(id, symbol, amount, type, side, price, is_hidden=false)
9192
side: side,
9293
exchange: 'bitfinex',
9394
is_hidden: is_hidden,
95+
use_remaining: use_remaining,
9496
price: price.to_s
9597
}
9698
authenticated_post("order/cancel/replace", params: params).body

lib/bitfinex/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Bitfinex
2-
VERSION = "0.0.6"
2+
VERSION = "0.0.7"
33
end

0 commit comments

Comments
 (0)