ConstantsUtils
Internal library for important constants commonly used in many places
P_10
uint256 P_10MAX_PNL_P
uint256 MAX_PNL_PSL_LIQ_BUFFER_P
uint256 SL_LIQ_BUFFER_PLEGACY_LIQ_THRESHOLD_P
uint256 LEGACY_LIQ_THRESHOLD_PMIN_LIQ_THRESHOLD_P
uint256 MIN_LIQ_THRESHOLD_PMAX_OPEN_NEGATIVE_PNL_P
uint256 MAX_OPEN_NEGATIVE_PNL_PMAX_LIQ_SPREAD_P
uint256 MAX_LIQ_SPREAD_PDEFAULT_MAX_CLOSING_SLIPPAGE_P
uint16 DEFAULT_MAX_CLOSING_SLIPPAGE_PgetMarketOrderTypes
function getMarketOrderTypes() internal pure returns (enum ITradingStorage.PendingOrderType[5])getPendingOpenOrderType
function getPendingOpenOrderType(enum ITradingStorage.TradeType _tradeType) internal pure returns (enum ITradingStorage.PendingOrderType)Returns pending order type (market open/limit open/stop open) for a trade type (trade/limit/stop)
Parameters
Name
Type
Description
_tradeType
enum ITradingStorage.TradeType
the trade type
isOrderTypeMarket
function isOrderTypeMarket(enum ITradingStorage.PendingOrderType _orderType) internal pure returns (bool)Returns true if order type is market
Parameters
Name
Type
Description
_orderType
enum ITradingStorage.PendingOrderType
order type
Was this helpful?