params.tokenAddress
granted to withdraw by params.spenderAddress
from params.ownerAddress
.params.tokenAddress
ERC20 contract address of the tokenparams.ownerAddress
address of the owner of the tokens - wallet who grants right to withdraw tokensparams.spenderAddress
address of the spender of the tokens - wallet who gets right to withdraw tokensBigNumber
value indicating tokens amount allowed to withdrawparams.spenderAddress
to withdraw tokens at params.tokenAddress
from params.ownerAddress
, multiple times, up to the params.amountInBaseUnits
amount.params.tokenAddress
ERC20 contract address of the tokenparams.ownerAddress
address of the owner of the tokens - wallet who grants right to use tokensparams.spenderAddress
address of the spender of the tokens - wallet who gets right to use tokensparams.amountInBaseUnits
amount of tokens that are allowed to useparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.spenderAddress
to withdraw tokens from params.ownerAddress
, multiple times, without the limit.params.tokenAddress
ERC20 contract address of the tokenparams.ownerAddress
address of the owner of the tokens - wallet who grants right to use tokensparams.spenderAddress
address of the spender of the tokens - wallet who gets right to use tokensparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.spenderAddress
to withdraw tokens from params.ownerAddress
.params.tokenAddress
ERC20 contract address of the tokenparams.ownerAddress
address of the owner of the tokens - wallet who grants right to use tokensparams.spenderAddress
address of the spender of the tokens - wallet who gets right to use tokensparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
order
loan orderstring
order
loan orderPromise
for hash value string
string
.orderHash
loan order hashsignerAddress
address of a wallet signing the loan order hashshouldAddPersonalMessagePrefix
indicates whether or not personal message prefix should be addedPromise
for string
containing order hash signatureparams.account
account who signed the loan order hashparams.orderHash
loan order hashparams.signature
loan order signatureboolean
value indicating if the signature is validparams.account
account who signed the loan order hashparams.orderHash
loan order hashparams.signature
loan order signaturePromise
for boolean
value indicating if the signature is validPromise
for an array of ITokenDescription
Promise
for an array of IOracleDescription
params.oracleAddress
supports exchange operation of provided tokens.sourceTokenAddress
address of source token's ERC20 contractsourceTokenAmount
amount of source tokens to exchangedestTokenAddress
address of destination token's ERC20 contractoracleAddress
address of the oracle to check tokens pair supportPromise
for boolean
value indicating if oracle is able to make exchange operation between tokenssourceTokenAddress
address of source token's ERC20 contractsourceTokenAmount
amount of source tokens to exchangedestTokenAddress
address of destination token's ERC20 contractoracleAddress
address of oracle to check tokens pair supportPromise
for IConversionData
value containing exchange rate and available amount of tokens for exchangeparams.loanOrderHash
.params.loanOrderHash
a unique hash representing the loan orderPromise
for ILoanOrderFillable
which represents the current fill state of specified loan orderparams.start
starting number of the loan order in the list of orders that are available for takingparams.count
maximum number of loan orders to returnparams.oracleFilter
oracleAddress to filter list of loan ordersPromise
for an array of ILoanOrderFillable
every item of which represents the current fill state of specified loan orderparams.loanPartyAddress
.params.loanPartyAddress
the address of the lender/trader in the loan orderparams.start
starting number of the loan order in the list of ordersparams.count
maximum number of loan orders to returnparams.oracleFilter
oracleAddress to filter list of loan ordersPromise
for an array of ILoanOrderFillable
every item of which represents the current fill state of specified loan orderparams.order
signed loan order ILoanOrderFillRequest
params.oracleData
information specific for selected oracle. for bZxOracle it should be empty string, for augur oracle this should be augur oracle market.params.collateralTokenAddress
desired address of the collateral the trader wants to useparams.loanTokenAmountFilled
desired amount of loanToken the trader wants to borrowparams.tradeTokenToFillAddress
if "0"
then nothing happens, if non-zero, than a trade is made with the oracle once the loan is openedparams.withdrawOnOpen
if true
, then over-collateralize (initial margin + 100% of loan value), and withdraw the loan token to the trader's wallet
if false
, that normal margin loan (initial margin collateral only) NOTE: if true, than params.tradeTokenToFillAddress
is ignored and assumed to be equal to "0
params.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.order
signed loan order ILoanOrderFillRequest
params.oracleData
information specific for selected oracle. for bZxOracle it should be empty string, for augur oracle this should be augur oracle market.params.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.order
signed loan order ILoanOrderFillRequest
params.oracleData
information specific for selected oracle. for bZxOracle it should be empty string, for augur oracle this should be augur oracle market.params.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.collateralTokenAddress
desired address of the collateral the trader wants to useparams.loanTokenAmountFilled
desired amount of loanToken the trader wants to borrowparams.tradeTokenToFillAddress
if "0"
then nothing happens, if non-zero, than a trade is made with the oracle once the loan is openedparams.withdrawOnOpen
if true
, then over-collateralize (initial margin + 100% of loan value), and withdraw the loan token to the trader's wallet
if false
, that normal margin loan (initial margin collateral only) NOTE: if true, than params.tradeTokenToFillAddress
is ignored and assumed to be equal to "0
params.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.trader
the address of the lender/trader in the loan orderPromise
for ILoanPositionState
which represents the current state of specified loan orderparams.address
.params.address
the address of the lender in the loan orderparams.count
maximum number of loan orders to returnparams.activeOnly
should this function return loan orders in active only (true
) or in any state (false
)Promise
for an array of ILoanPositionState
every item of which represents the current state of related loan orderparams.address
.params.address
the address of the trader in the loan orderparams.count
maximum number of loan orders to returnparams.activeOnly
should this function return loan orders in active only (true
) or in any state (false
)Promise
for an array of ILoanPositionState
every item of which represents the current state of related loan orderparams.start
starting number of the loan order in the list of active ordersparams.count
maximum number of loan orders to returnPromise
for an array of ILoanOrderActive
every item of which contains a unique hash representing the loan order, trader and expiration timestamp of the loan orderparams.loanOrderHash
a unique hash representing the loan orderparams.trader
the address of the trader in the loan orderPromise
for IMarginLevel
which represents current state of margin of the loan orderparams.loanOrderHash
a unique hash representing the loan orderparams.trader
the address of the trader in the loan orderPromise
for IProfitStatus
which represents current state of profits/losses of the loan orderparams.loanOrderHash
a unique hash representing the loan orderparams.withdrawAmount
amount of the token to withdrawparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.depositTokenAddress
the address of the token being returnedparams.depositAmount
amount of the token to depositparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.trader
the address of the trader in the loan orderPromise
for IInterestStatus
which represents current state of interests of the loan orderparams.loanOrderHash
a unique hash representing the loan orderparams.trader
the address of the trader in the loan orderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.order
signed loan order ILoanOrderFillRequest
params.oracleData
information specific for selected oracle. for bZxOracle it should be empty string, for augur oracle this should be augur oracle market.params.cancelLoanTokenAmount
the amount of remaining unloaned token to cancelparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.cancelLoanTokenAmount
the amount of remaining unloaned token to cancelparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
loanOrderHash
the collateral token used by the traderPromise
for string
containing the cancelled amountloanOrderHash
the collateral token used by the traderPromise
for string
containing the cancelled amountparams.loanOrderHash
a unique hash representing the loan orderparams.closeAmount
the amount of the loan token to return to the lenderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.trader
himself, calls closeLoan
.params.loanOrderHash
a unique hash representing the loan orderparams.trader
the trader of the positionparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
loanTokenAddress
the collateral token used by the tradercollateralTokenAddress
desired address of the collateral the trader wants to useoracleAddress
the oracle address specified in the loan orderloanTokenAmountFilled
the amount of loan token borrowedinitialMarginAmount
the initial margin percentage amount (i.e. 50 == 50%)Promise
for string
containing the minimum collateral requirement to open the loanparams.loanOrderHash
a unique hash representing the loan orderparams.collateralTokenFilled
the address of the collateral token usedparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.depositTokenAddress
the address of the collateral token usedparams.depositAmount
the amount of additional collateral token to deposit.params.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.loanOrderHash
a unique hash representing the loan orderparams.collateralTokenFilled
the address of the collateral token usedparams.withdrawAmount
the amount of excess collateral token to withdrawparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.order0x
ZeroEx (c) trade order descriptionparams.orderHashBZx
a unique hash representing the loan orderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.order0x
ZeroEx (c) trade order descriptionparams.orderHashBZx
a unique hash representing the loan orderparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.orderHash
.params.orderHash
a unique hash representing the loan orderparams.tradeTokenAddress
ERC20 contract address of the token to buy in the tradeparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.amount
amount of ETH to convert to WETHparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
params.amount
amount of WETH to convert to ETHparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
BigNumber
instanceparams.ownerAddress
tokenAddress
address of token ERC20 contract ownerAddress
address tokens' ownerPromise
for BigNumber
instanceparams.receiverAddress
.params.tokenAddress
an address of token ERC20 contractparams.receiverAddress
recipient wallet addressparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>
address
an address stringstring
to
address.params.tokenAddress
an address of token ERC20 contractparams.to
recipient wallet addressparams.amount
amount of tokens to transferparams.getObject
should this function return Promise<TransactionReceipt>
(false
) or TransactionObject<TransactionReceipt>
(true
)params.txOpts
web3 transaction options object (from
, gasPrice
, gas
etc.)Promise<TransactionReceipt>
or TransactionObject<TransactionReceipt>