ITradingCallbacks

Contains the types for the GNSTradingCallbacks facet

TradingCallbacksStorage

struct TradingCallbacksStorage {
  uint8 vaultClosingFeeP;
  uint248 __placeholder;
  mapping(uint8 => uint256) pendingGovFees;
  uint256[48] __gap;
}

CancelReason

enum CancelReason {
  NONE,
  PAUSED,
  MARKET_CLOSED,
  SLIPPAGE,
  TP_REACHED,
  SL_REACHED,
  EXPOSURE_LIMITS,
  PRICE_IMPACT,
  MAX_LEVERAGE,
  NO_TRADE,
  WRONG_TRADE,
  NOT_HIT,
  LIQ_REACHED
}

AggregatorAnswer

struct AggregatorAnswer {
  struct ITradingStorage.Id orderId;
  uint256 spreadP;
  uint64 price;
  uint64 open;
  uint64 high;
  uint64 low;
}

Values

struct Values {
  uint256 positionSizeCollateral;
  uint256 gnsPriceCollateral;
  int256 profitP;
  uint256 executionPrice;
  uint256 liqPrice;
  uint256 amountSentToTrader;
  uint256 reward1;
  uint256 reward2;
  uint256 reward3;
  uint128 collateralPrecisionDelta;
  uint256 collateralPriceUsd;
  bool exactExecution;
  uint256 closingFeeCollateral;
  uint256 triggerFeeCollateral;
  uint256 collateralLeftInStorage;
}