> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gains.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# ConstantsUtils

*Internal library for important constants commonly used in many places*

## P\_10

```solidity theme={null}
uint256 P_10
```

## MAX\_PNL\_P

```solidity theme={null}
uint256 MAX_PNL_P
```

## SL\_LIQ\_BUFFER\_P

```solidity theme={null}
uint256 SL_LIQ_BUFFER_P
```

## LEGACY\_LIQ\_THRESHOLD\_P

```solidity theme={null}
uint256 LEGACY_LIQ_THRESHOLD_P
```

## MIN\_LIQ\_THRESHOLD\_P

```solidity theme={null}
uint256 MIN_LIQ_THRESHOLD_P
```

## MAX\_OPEN\_NEGATIVE\_PNL\_P

```solidity theme={null}
uint256 MAX_OPEN_NEGATIVE_PNL_P
```

## MAX\_LIQ\_SPREAD\_P

```solidity theme={null}
uint256 MAX_LIQ_SPREAD_P
```

## DEFAULT\_MAX\_CLOSING\_SLIPPAGE\_P

```solidity theme={null}
uint16 DEFAULT_MAX_CLOSING_SLIPPAGE_P
```

## getMarketOrderTypes

```solidity theme={null}
function getMarketOrderTypes() internal pure returns (enum ITradingStorage.PendingOrderType[5])
```

## getPendingOpenOrderType

```solidity theme={null}
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

```solidity theme={null}
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  |
