# Futures Market

## Get the server time

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time>
{% endhint %}

#### Function Name:

```javascript
getServerTimeFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getServerTimeFutures(exchange, options) {
    try {
        let result = await exchange.getServerTimeFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getServerTimeFutures(myMexcExchanges);
```

## Get the contract information

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information>
{% endhint %}

#### Function Name:

```javascript
getContractDetailFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractDetailFutures(exchange, options) {
    try {
        let result = await exchange.getContractDetailFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractDetailFutures(myMexcExchanges);
```

## Get the transferable currencies

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-the-transferable-currencies>
{% endhint %}

#### Function Name:

```javascript
getTransferableCurrenciesFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getTransferableCurrenciesFutures(exchange, options) {
    try {
        let result = await exchange.getTransferableCurrenciesFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getTransferableCurrenciesFutures(myMexcExchanges);
```

## Get a snapshot of the latest N depth information of the contract

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-a-snapshot-of-the-latest-n-depth-information-of-the-contract>
{% endhint %}

#### Function Name:

```javascript
getContractNDepthInfoFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractNDepthInfoFutures(exchange, options) {
    try {
        let result = await exchange.getContractNDepthInfoFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractNDepthInfoFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT",
             limit: "20"
         });
```

## Get contract fair price

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-fair-price>
{% endhint %}

#### Function Name:

```javascript
getContractFairPriceFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractFairPriceFutures(exchange, options) {
    try {
        let result = await exchange.getContractFairPriceFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractFairPriceFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get contract funding rate

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate>
{% endhint %}

#### Function Name:

```javascript
getContractFundingRateFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractFundingRateFutures(exchange, options) {
    try {
        let result = await exchange.getContractFundingRateFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractFundingRateFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## K-line data

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#k-line-data>
{% endhint %}

#### Function Name:

```javascript
getContractKlineFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractKlineFutures(exchange, options) {
    try {
        let result = await exchange.getContractKlineFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractKlineFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get K-line data of the index price

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-k-line-data-of-the-index-price>
{% endhint %}

#### Function Name:

```javascript
getContractIndexPriceKlineFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractIndexPriceKlineFutures(exchange, options) {
    try {
        let result = await exchange.getContractIndexPriceKlineFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractIndexPriceKlineFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get K-line data of the fair price

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-k-line-data-of-the-fair-price>
{% endhint %}

#### Function Name:

```javascript
getContractFairPriceKlineFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractFairPriceKlineFutures(exchange, options) {
    try {
        let result = await exchange.getContractFairPriceKlineFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractFairPriceKlineFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get contract transaction data

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-transaction-data>
{% endhint %}

#### Function Name:

```javascript
getContractTransactionDataFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractTransactionDataFutures(exchange, options) {
    try {
        let result = await exchange.getContractTransactionDataFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractTransactionDataFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get contract trend data

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-trend-data>
{% endhint %}

#### Function Name:

```javascript
getContractTrendDataFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractTrendDataFutures(exchange, options) {
    try {
        let result = await exchange.getContractTrendDataFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractTrendDataFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT"
         });
```

## Get all contract risk fund balance

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-all-contract-risk-fund-balance>
{% endhint %}

#### Function Name:

```javascript
getAllContractRiskFundBalanceFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getAllContractRiskFundBalanceFutures(exchange, options) {
    try {
        let result = await exchange.getAllContractRiskFundBalanceFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getAllContractRiskFundBalanceFutures(myMexcExchanges);
```

## Get contract risk fund balance history

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-risk-fund-balance-history>
{% endhint %}

#### Function Name:

```javascript
getContractRiskFundBalanceHistoryFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractRiskFundBalanceHistoryFutures(exchange, options) {
    try {
        let result = await exchange.getContractRiskFundBalanceHistoryFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractRiskFundBalanceHistoryFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT",
             page_num: "1",
             page_size: "20"
         });
```

## Get contract funding rate history

{% hint style="info" %}
Please refer to the official Mexc API Docs for the Required parameters.

<https://mxcdevelop.github.io/apidocs/contract_v1_en/#get-contract-funding-rate-history>
{% endhint %}

#### Function Name:

```javascript
getContractFundingRateHistoryFutures()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myMexcExchanges  = createExchange({
      exchange: "mexc",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      label: "mexc"
  });

async function getContractFundingRateHistoryFutures(exchange, options) {
    try {
        let result = await exchange.getContractFundingRateHistoryFutures(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getContractFundingRateHistoryFutures(myMexcExchanges, 
         {
             symbol: "MX_USDT",
             page_num: "1",
             page_size: "20"
         });
```


---

# 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.compendium.finance/pendax/using-pendax-sdk/mexc-functions/futures-market.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.
