# Futures Contract

On [DMEX](https://dmex.app/?utm_source=medium\&utm_medium=story\&utm_campaign=part1), users trade futures contracts. Futures contracts are defined by the following parameters:

| Parameter         | Type    | Description                                                                                                                                                                |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| asset             | bytes32 | the hash of the underlying [asset object](/definitions/asset-definitions.md)                                                                                               |
| expirationBlock   | uint256 | futures contract expiration block                                                                                                                                          |
| closingPrice      | uint256 | the closing price for the futures contract                                                                                                                                 |
| closed            | bool    | is the futures contract closed? (0 - false, 1 - true)                                                                                                                      |
| broken            | bool    | if someone has forced release of funds after no settlement for two hours, the contract is marked as broken and can no longer close positions, all collaterals are released |
| multiplier        | uint256 | the multiplier price (usually 1/ETHUSD x 1e8)                                                                                                                              |
| fundingRate       | uint256 | funding rate expressed per block \* 1e18                                                                                                                                   |
| closingBlock      | uint256 | the block in which the contract was closed (0 while contract open)                                                                                                         |
| perpetual         | bool    | true if the contract is perpetual                                                                                                                                          |
| maintenanceMargin | uint256 | the maintenance margin coefficient                                                                                                                                         |

The Futures Contract has a unique hash derived from its parameters. There can be no two futures contracts with the same hash and different parameters as all parameters are included in the hash. A change in any parameter will result in a new futures contract hash.

```javascript
bytes32 futuresContractHash = keccak256(
    this, 
    asset, 
    expirationBlock, 
    multiplier, 
    fundingRate, 
    perpetual, 
    maintenanceMargin
);
```

When a user places an order, the order is placed to trade a specific futures contract and the futures contract hash is embedded in the user’s signature. This way the user can be sure that he/she is trading the correct asset/futures contract.


---

# 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.dmex.app/definitions/futures-contracts.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.
