Skip to main content
Interface for GNSPriceImpact facet (inherits types and also contains functions, events, and custom errors)

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

OiWindowsSettingsInitialized

Triggered when OiWindowsSettings is initialized (once)

Parameters

PriceImpactWindowsCountUpdated

Triggered when OiWindowsSettings.windowsCount is updated

Parameters

PriceImpactWindowsDurationUpdated

Triggered when OiWindowsSettings.windowsDuration is updated

Parameters

NegPnlCumulVolMultiplierUpdated

Triggered when negPnlCumulVolMultiplier is updated

Parameters

ProtectionCloseFactorWhitelistUpdated

Triggered when a trader is whitelisted/unwhitelisted from protection close factor

Parameters

ProtectionCloseFactorUpdated

Triggered when a pair’s protection close factor is updated

Parameters

ProtectionCloseFactorBlocksUpdated

Triggered when a pair’s protection close factor duration is updated

Parameters

CumulativeFactorUpdated

Triggered when a pair’s cumulative factor is updated

Parameters

ExemptOnOpenUpdated

Triggered when a pair’s exemptOnOpen value is updated

Parameters

ExemptAfterProtectionCloseFactorUpdated

Triggered when a pair’s exemptAfterProtectionCloseFactor value is updated

Parameters

PriceImpactOpenInterestAdded

Triggered when OI is added to a window.

Parameters

PriceImpactOiTransferredPairs

Triggered when multiple pairs’ OI are transferred to a new window (when updating windows duration).

Parameters

PriceImpactOiTransferredPair

Triggered when a pair’s OI is transferred to a new window.

Parameters

OnePercentDepthUpdated

Triggered when a pair’s depth is updated.

Parameters

WrongWindowsDuration

WrongWindowsCount