# Market Data (Coin-M)

## Contract Information

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract+Information>
{% endhint %}

#### Function Name:

```javascript
getContractInfoCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await getContractInfoCM(myBingxExchange);
```

## Price & Current Funding Rate

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price+&+Current+Funding+Rate>
{% endhint %}

#### Function Name:

```javascript
getPriceAndCurrentFundingRateCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await getPriceAndCurrentFundingRateCM(myBingxExchange);
```

## Get Swap Open Positions

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+Swap+Open+Positions>
{% endhint %}

#### Function Name:

```javascript
getSwapOpenPositionsCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await getSwapOpenPositionsCM(myBingxExchange);
```

## Get K-line Data

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get+K-line+Data>
{% endhint %}

#### Function Name:

```javascript
getKlineCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await getKlineCM(myBingxExchange, {
	symbol: "<string>",
	interval: "<string>"
});
```

## Query Depth Data

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+Depth+Data>
{% endhint %}

#### Function Name:

```javascript
getDepthCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await getDepthCM(myBingxExchange, {
	symbol: "<string>"
});
```

## Query 24-Hour Price Change

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

<https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query+24-Hour+Price+Change>
{% endhint %}

#### Function Name:

```javascript
get24HrPriceChangeCM()
```

#### Usage:

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

   let myBingxExchange  = createExchange({
      exchange: "bingx",
      authenticate: "false",
      label: "bingx"
  });

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

let result = await get24HrPriceChangeCM(myBingxExchange);
```


---

# 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/bingx-functions/market-data-coin-m.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.
