Skip to main content
Facet #4: Price impact OI windows

constructor

initializePriceImpact

Initializes price impact facet

Parameters

initializeNegPnlCumulVolMultiplier

Initializes negative pnl cumulative volume multiplier

Parameters

initializePairFactors

Initializes pair factors

Parameters

setPriceImpactWindowsCount

Updates price impact windows count

Parameters

setPriceImpactWindowsDuration

Updates price impact windows duration

Parameters

setNegPnlCumulVolMultiplier

Updates negative pnl cumulative volume multiplier

Parameters

setProtectionCloseFactorWhitelist

Whitelists/unwhitelists traders from protection close factor

Parameters

setPairDepths

Updates pairs 1% depths above and below

Parameters

setProtectionCloseFactors

Sets protection close factors for pairs

Parameters

setProtectionCloseFactorBlocks

Sets protection close factor blocks duration for pairs

Parameters

setCumulativeFactors

Sets cumulative factors for pairs

Parameters

setExemptOnOpen

Sets whether pairs are exempt from price impact on open

Parameters

setExemptAfterProtectionCloseFactor

Sets whether pairs are exempt from price impact on close once protection close factor has expired

Parameters

addPriceImpactOpenInterest

Adds open interest to current window

Parameters

getPriceImpactOi

Returns active open interest used in price impact calculation for a pair and side (long/short)

Parameters

getTradePriceImpact

Returns price impact % (1e10 precision) and price after impact (1e10 precision) for a trade

Parameters

getPairDepth

Returns a pair’s depths above and below the price

Parameters

getOiWindowsSettings

Returns current price impact windows settings

getOiWindow

Returns OI window details (long/short OI)

Parameters

getOiWindows

Returns multiple OI windows details (long/short OI)

Parameters

getPairDepths

Returns depths above and below the price for multiple pairs

Parameters

getPairFactors

Returns factors for a set of pairs (1e10)

Parameters

getNegPnlCumulVolMultiplier

Returns negative pnl cumulative volume multiplier

getProtectionCloseFactorWhitelist

Returns whether a trader is whitelisted from protection close factor