Scenario:
When dxMakePartialOrder or dxMakeOrder are called, there is currently no way to control where funds come from in the order and there is no way to prevent XBridge from autosplitting UTXOs on calls to dxMakePartialOrder.
The use_all_funds param is being added to allow for proper segregation and accounting of funds within a wallet, which in turn allows a trading bot to trade multiple pairs more conveniently.
To do:
[x] Add optional use_all_funds parameter to dxMakePartialOrder
true (default) - dxMakePartialOrder uses funds from all available addresses
false - dxMakePartialOrder will try to use funds only from the address specified by the maker_address parameter.
[x] Add optional use_all_funds parameter to dxMakeOrder
true (default) - dxMakeOrder uses funds from all available addresses
false - dxMakeOrder will try to use funds only from the address specified by the maker_address parameter.
[x] When a partial or exact order is created and use_all_funds = false, XBridge needs to check if there are sufficient funds in the address as follows:
if use_all_funds option = false, when an order is created by calling dxMakePartialOrder or dxMakeOrderand XBridge verifies there are not enough funds available in maker_address to make the order, then return the error insufficient_funds
[x] add optional auto_split parameter to dxMakePartialOrder
true (default) - funds are split into multiple UTXOs if needed before a partial order is placed
false - funds are not split into multiple UTXOs before a partial order is placed.
Important: no error log is needed when this parameter is set to false, and setting this parameter to false should not affect whether or not the order is successfully placed.
Goal: Prevent paying extra fees and incurring delays due to autosplitting UTXOs when using trade bots.
Scenario: When
dxMakePartialOrder
ordxMakeOrder
are called, there is currently no way to control where funds come from in the order and there is no way to prevent XBridge from autosplitting UTXOs on calls todxMakePartialOrder
.The
use_all_funds
param is being added to allow for proper segregation and accounting of funds within a wallet, which in turn allows a trading bot to trade multiple pairs more conveniently.To do:
use_all_funds
parameter todxMakePartialOrder
true
(default) - dxMakePartialOrder uses funds from all available addressesfalse
- dxMakePartialOrder will try to use funds only from the address specified by the maker_address parameter.dxMakeOrder
true
(default) -dxMakeOrder
uses funds from all available addressesfalse
-dxMakeOrder
will try to use funds only from the address specified by themaker_address
parameter.use_all_funds = false
, XBridge needs to check if there are sufficient funds in the address as follows:if
use_all_funds
option = false, when an order is created by callingdxMakePartialOrder
ordxMakeOrderand
XBridge verifies there are not enough funds available inmaker_address
to make the order, then return the errorinsufficient_funds
auto_split
parameter todxMakePartialOrder
false - funds are not split into multiple UTXOs before a partial order is placed.
Important: no error log is needed when this parameter is set to false, and setting this parameter to false should not affect whether or not the order is successfully placed.
Goal: Prevent paying extra fees and incurring delays due to autosplitting UTXOs when using trade bots.
Ref: https://api.blocknet.co/#dxmakepartialorder