diff --git a/docs/Changelog.md b/docs/Changelog.md index d0076073..9f08b682 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -3,7 +3,7 @@ ## JS SDK Version ChangeLog #### v3.6.0 1) dual Invest autoReinvest - 2) guardina singature typeData + 2) guardina signature typeData 3) remove signature 02/03 ended #### v3.2.1 diff --git a/docs/js_sdk/Deposit.md b/docs/js_sdk/Deposit.md index 54f06533..36ba01b0 100644 --- a/docs/js_sdk/Deposit.md +++ b/docs/js_sdk/Deposit.md @@ -47,7 +47,7 @@ Choose deposit amount from UI ```ts const { ethBalance } = await LoopringAPI.exchangeAPI.getEthBalances({owner: accAddress}); -//tokenArr is Loopring supprot ERC20 TokenId Array.jion(',') +//tokenArr is Loopring support ERC20 TokenId Array.jion(',') const { tokenBalances } = await LoopringAPI.exchangeAPI.getTokenBalances({owner: accAddress, token: tokenArr.join()}) ``` API: [/api/v3/eth/tokenBalances](https://uat2.loopring.io/api/v3/eth/tokenBalances?owner=0xfF7d59D9316EBA168837E3eF924BCDFd64b237D8&token=0xfc28028d9b1f6966fe74710653232972f50673be%2C0x0000000000000000000000000000000000000000%2C0xd4e71c4bb48850f5971ce40aa428b09f242d3e8a%2C0xcd2c81b322a5b530b5fa3432e57da6803b0317f7%2C0x47525e6a5def04c9a56706e93f54cc70c2e8f165) @@ -249,7 +249,7 @@ web3.eth.sendTransaction({ const tokenSymbol = "LRC"; const fee = 0; /* tokenSymbol is ETH, sendTransaction value should be `amount + fee` (current fee is 0) - * other tokenSymbol as LRC addresss valueC is fee (current fee is 0) + * other tokenSymbol as LRC address valueC is fee (current fee is 0) */ const value = tokenSymbol === "ETH"? amount + fee : fee; const data = genExchangeData(ERC20Method.Deposit, { diff --git a/docs/js_sdk/erc20Trade/orderERC20.md b/docs/js_sdk/erc20Trade/orderERC20.md index bcc9583f..7899e6a7 100644 --- a/docs/js_sdk/erc20Trade/orderERC20.md +++ b/docs/js_sdk/erc20Trade/orderERC20.md @@ -20,29 +20,29 @@ The parameters to call this interface are "accountId" and "market=LRC-ETH". In t **4) Set slippage as the slippage value user configured in UI (for example 0.1%)** -**5)Caculate minCostLRC and minCostETH as below** +**5)Calculate minCostLRC and minCostETH as below** minCostLRC = max(minTokenLRC, tradeCostLRC/maxAllowBips) minCostETH = max(minTokenETH, tradeCostETH/maxAllowBips) -**6) Caculate the cost by considering slippage** +**6) Calculate the cost by considering slippage** minCostLRCSlip = minCostLRC/(1-slippage) minCostETHSlip = minCostETH/(1-slippage) -**7) Cacluate the minimum quantity user has to set** +**7) Calculate the minimum quantity user has to set** tradeCostSellLRC = max(tradeCostSellLRC, minTokenLRC) * 1.1 tradeCostSellETH = max(tradeCostSellETH, minTokenETH) * 1.1 -Here we add additonally 10% tolerance. +Here we add additionally 10% tolerance. -**8) Caculate the previous minimum token amount per calling api/v3/user/orderUserRateAmount (existing logic)** +**8) Calculate the previous minimum token amount per calling api/v3/user/orderUserRateAmount (existing logic)** This is the threshold to distinguish small quantity trading and normal trading -We will get two values (configSellLRC and configSellETH) which are used for previous trading quantity limit (Per USD 100) caculation +We will get two values (configSellLRC and configSellETH) which are used for previous trading quantity limit (Per USD 100) calculation -**9)Caculate the new maxFeeBips and start trading** +**9)Calculate the new maxFeeBips and start trading** Let's take LRC->ETH as the example User inputs the amount of LRC to convert, amount = sellLRC @@ -728,7 +728,7 @@ const [{depth}, {ammPoolSnapshot}] = await Promise.all([ ]); ``` -### Step 5. check MinAmt see log and calc mini receive and ouput value & maxfeeBips & priceImpact +### Step 5. check MinAmt see log and calc mini receive and output value & maxfeeBips & priceImpact ```ts const { calcTradeParams, maxFeeBips, minimumReceived } = calculateSwap(