Facets
GNSTradingInteractions
Facet #7: Trading (user interactions)
Initializes the trading facet
Updates marketOrdersTimeoutBlocks
Updates the users that can bypass the link cost of triggerOrder
_Sets delegate as the new delegate of caller (can call delegatedAction)
Removes the delegate of caller (can’t call delegatedAction)
_Caller executes a trading action on behalf of trader using delegatecall
Opens a new trade/limit order/stop order
Wraps native token and opens a new trade/limit order/stop order
Updates existing trade’s max closing slippage % for caller
Closes an open trade (market order) for caller
Updates an existing limit/stop order for caller
Cancels an open limit/stop order for caller
Updates the tp of an open trade for caller
Updates the sl of an open trade for caller
Update trade leverage
Increase trade position size
Decrease trade position size
Initiates a new trigger order (for tp/sl/liq/limit/stop orders)
Safety function in case oracles don’t answer in time, allows caller to cancel a pending order and if relevant claim back any stuck collateral Only allowed for MARKET_OPEN, MARKET_CLOSE, UPDATE_LEVERAGE, MARKET_PARTIAL_OPEN, and MARKET_PARTIAL_CLOSE orders
Returns the wrapped native token or address(0) if the current chain, or the wrapped token, is not supported.
Returns true if the token is the wrapped native token for the current chain, where supported.
Returns the address a trader delegates his trading actions to
Returns the current marketOrdersTimeoutBlocks value
Returns whether a user bypasses trigger link costs
