# ConstantsUtils

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

## P\_10

```solidity
uint256 P_10
```

## MAX\_PNL\_P

```solidity
uint256 MAX_PNL_P
```

## SL\_LIQ\_BUFFER\_P

```solidity
uint256 SL_LIQ_BUFFER_P
```

## LEGACY\_LIQ\_THRESHOLD\_P

```solidity
uint256 LEGACY_LIQ_THRESHOLD_P
```

## MIN\_LIQ\_THRESHOLD\_P

```solidity
uint256 MIN_LIQ_THRESHOLD_P
```

## MAX\_OPEN\_NEGATIVE\_PNL\_P

```solidity
uint256 MAX_OPEN_NEGATIVE_PNL_P
```

## MAX\_LIQ\_SPREAD\_P

```solidity
uint256 MAX_LIQ_SPREAD_P
```

## DEFAULT\_MAX\_CLOSING\_SLIPPAGE\_P

```solidity
uint16 DEFAULT_MAX_CLOSING_SLIPPAGE_P
```

## getMarketOrderTypes

```solidity
function getMarketOrderTypes() internal pure returns (enum ITradingStorage.PendingOrderType[5])
```

## getPendingOpenOrderType

```solidity
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
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  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer/technical-reference/contracts/libraries/constantsutils.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
