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

initializeCallbacks

Parameters

initializeTreasuryAddress

Initialize the treasury address

Parameters

updateVaultClosingFeeP

Update the % of closing fee going to vault

Parameters

updateTreasuryAddress

Updates the treasury address

Parameters

claimPendingGovFees

Claim the pending gov fees for all collaterals

openTradeMarketCallback

Executes a pending open trade market order

Parameters

closeTradeMarketCallback

Executes a pending close trade market order

Parameters

executeTriggerOpenOrderCallback

Executes a pending open trigger order (for limit/stop orders)

Parameters

executeTriggerCloseOrderCallback

Executes a pending close trigger order (for tp/sl/liq orders)

Parameters

updateLeverageCallback

Executes a pending update leverage order

Parameters

increasePositionSizeMarketCallback

Executes a pending increase position size market order

Parameters

decreasePositionSizeMarketCallback

Executes a pending decrease position size market order

Parameters

getVaultClosingFeeP

Returns the current vaultClosingFeeP value (%)

getPendingGovFeesCollateral

Returns the current pending gov fees for a collateral index (collateral precision)

validateTriggerOpenOrderCallback

Makes open trigger (STOP/LIMIT) checks like slippage, price impact, missed targets and returns cancellation reason if any

Parameters

validateTriggerCloseOrderCallback

Makes close trigger (SL/TP/LIQ) checks like slippage and price impact and returns cancellation reason if any

Parameters

VaultClosingFeePUpdated

Emitted when vaultClosingFeeP is updated

Parameters

PendingGovFeesClaimed

Emitted when gov fees are claimed for a collateral

Parameters

MarketExecuted

Emitted when a market order is executed (open/close)

Parameters

LimitExecuted

Emitted when a limit/stop order is executed

Parameters

MarketOpenCanceled

Emitted when a pending market open order is canceled

Parameters

MarketCloseCanceled

Emitted when a pending market close order is canceled

Parameters

TriggerOrderCanceled

Emitted when a pending trigger order is canceled

Parameters

BorrowingFeeCharged

Parameters