# Market Data (Spot)

## Spot trading symbols

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Spot+trading+symbols>
{% endhint %}

#### Function Name:

```javascript
getTradingSymbolsSpot()
```

#### Usage:

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

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

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

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

## Recent Trades List

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Recent+Trades+List>
{% endhint %}

#### Function Name:

```javascript
getRecentTradesListSpot()
```

#### Usage:

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

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

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

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

## Order Book

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Order+Book>
{% endhint %}

#### Function Name:

```javascript
getOrderBookSpot()
```

#### Usage:

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

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

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

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

## Kline/Candlestick Data

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Kline/Candlestick+Data>
{% endhint %}

#### Function Name:

```javascript
getKlineCandlestickInfoSpot()
```

#### Usage:

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

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

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

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

## 24hr Ticker Price Change Statistics

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24hr+Ticker+Price+Change+Statistics>
{% endhint %}

#### Function Name:

```javascript
get24HrPriceChangeInfoSpot()
```

#### Usage:

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

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

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

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

## Order Book aggregation

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Order+Book+aggregation>
{% endhint %}

#### Function Name:

```javascript
getOrderBookAggregationSpot()
```

#### Usage:

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

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

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

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

## Symbol Price Ticker

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Symbol+Price+Ticker>
{% endhint %}

#### Function Name:

```javascript
getSymbolPriceTickerSpot()
```

#### Usage:

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

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

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

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

## Symbol Order Book Ticker

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Symbol+Order+Book+Ticker>
{% endhint %}

#### Function Name:

```javascript
getSymbolOrderBookTickerSpot()
```

#### Usage:

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

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

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

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

## Historical K-line

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

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

#### Function Name:

```javascript
getHistoricalKlineSpot()
```

#### Usage:

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

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

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

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

## Old Trade Lookup

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

<https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#Old+Trade+Lookup>
{% endhint %}

#### Function Name:

```javascript
getOldTradeSpot()
```

#### Usage:

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

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

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

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


---

# 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-spot.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.
