Calculates avg/max slippage (price impact) for candidate trade
use calculateEstimatedPerpEntryPrice instead
[pctAvgSlippage, pctMaxSlippage, entryPrice, newPrice]
'pctAvgSlippage' => the percentage change to entryPrice (average est slippage in execution) : Precision PRICE_PRECISION
'pctMaxSlippage' => the percentage change to maxPrice (highest est slippage in execution) : Precision PRICE_PRECISION
'entryPrice' => the average price of the trade : Precision PRICE_PRECISION
'newPrice' => the price of the asset after the trade : Precision PRICE_PRECISION
which asset is being traded
whether to consider spread with calculating slippage
Generated using TypeDoc
Calculates avg/max slippage (price impact) for candidate trade
Deprecated
use calculateEstimatedPerpEntryPrice instead
Returns
[pctAvgSlippage, pctMaxSlippage, entryPrice, newPrice]
'pctAvgSlippage' => the percentage change to entryPrice (average est slippage in execution) : Precision PRICE_PRECISION
'pctMaxSlippage' => the percentage change to maxPrice (highest est slippage in execution) : Precision PRICE_PRECISION
'entryPrice' => the average price of the trade : Precision PRICE_PRECISION
'newPrice' => the price of the asset after the trade : Precision PRICE_PRECISION