> For the complete documentation index, see [llms.txt](https://weex-1.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://weex-1.gitbook.io/en/restapi/spot-market-data-endpoints.md).

# Spot Market Data Endpoints

### Get Ticker By Symbol <a href="#ticker" id="ticker"></a>

Rate limit rule: 20 request/1s

**HTTP Request**&#x20;

* GET /api/spot/v1/market/ticker

**Request parameter**

| Parameters | Type   | Required | Description   |
| ---------- | ------ | -------- | ------------- |
| symbol     | String | Yes      | Currency pair |

> **Response**:

```
{
    "code":"00000",
    "data":{
        "symbol":"BTCUSDT",
        "high24h":"34413.1",
        "low24h":"34413.1",
        "close":"34413.1",
        "quoteVol":"0",
        "baseVol":"0",
        "usdtVol":"0",
        "ts":"1625125755277"
    },
    "msg":"success",
    "requestTime":1625125756372
}
```

**Response Field**

| Field    | Description              |
| -------- | ------------------------ |
| symbol   | Currency pair            |
| high24h  | 24h highest price        |
| close    | Latest transaction price |
| low24h   | 24h lowest price         |
| quoteVol | Quote Currency volume    |
| baseVol  | Base Currency volume     |
| usdtVol  | USDT volume              |
| ts       | System timestamp         |

### Get The Latest Ticker For All Symbols

Rate limit rule: 20 request/1s

**HTTP Request**  Get the latest ticker for all coin pairs

* GET /api/spot/v1/market/tickers

> **Response:**

```
{
    "code":"00000",
    "data":[
      {
        "symbol":"BTCUSDT",
        "high24h":"34413.1",
        "low24h":"34413.1",
        "close":"34413.1",
        "quoteVol":"0",
        "baseVol":"0",
        "usdtVol":"0",
        "ts":"1625125755277"
    }
    ]
    "msg":"success",
    "requestTime":1625125756372
}
```

**Response Field**

| Field    | Description              |
| -------- | ------------------------ |
| symbol   | Currency pair            |
| high24h  | 24h highest price        |
| close    | Latest transaction price |
| low24h   | 24h lowest price         |
| ts       | System timestamp         |
| baseVol  | Base coin volume         |
| quoteVol | Quote coin volume        |
| usdtVol  | USDT volume              |

### Recent Trades List <a href="#recent-trades-list" id="recent-trades-list"></a>

Rate limit rule: 20 request/1s

**HTTP Request**&#x20;

* GET /api/spot/v1/market/fills

**Request parameter**

| Parameters | Type   | Required | Description   |
| ---------- | ------ | -------- | ------------- |
| symbol     | String | Yes      | Currency pair |
| limit      | String | No       | Default 100   |

> **Response**:

```
{
    "code":"00000",
    "msg":"success",
    "requestTime":1622097283024,
    "data":[
        {
            "symbol":"BFTUSDT_SPBL",
            "tradeId":"781698148534505473",
            "side":"buy",
            "fillPrice":"2.38735",
            "fillQuantity":"2470.6224",
            "fillTime":"1622097282536"
        },
        {
            "symbol":"BFTUSDT_SPBL",
            "tradeId":"781698140590493697",
            "side":"sell",
            "fillPrice":"2.38649",
            "fillQuantity":"3239.7976",
            "fillTime":"1622097280642"
        }
    ]
}
```

**Response Field**

| Field        | Description          |
| ------------ | -------------------- |
| symbol       | Currency pair        |
| tradeId      | trade id             |
| side         | Trade direction      |
| fillPrice    | Transaction price    |
| fillQuantity | Transaction quantity |
| fillTime     | Transaction time     |

### Kline/Candlestick Data <a href="#kline-candlestick-data" id="kline-candlestick-data"></a>

Rate limit rule: 20 request/1s

**HTTP Request** &#x20;

* GET /api/spot/v1/market/candles

**Request parameter**

| Parameters | Type   | Required | Description                                                                        |
| ---------- | ------ | -------- | ---------------------------------------------------------------------------------- |
| symbol     | String | Yes      | Currency pair                                                                      |
| period     | String | Yes      | Candlestick line time unit, granularity (​​refer to the following list for values) |
| after      | String | No       | Time after                                                                         |
| before     | String | No       | Time before                                                                        |
| limit      | String | No       | Default 100                                                                        |

| Description | granularity |
| ----------- | ----------- |
| 1min        | 60          |
| 5min        | 300         |
| 15min       | 900         |
| 30min       | 1800        |
| 1h          | 3600        |
| 4h          | 14400       |
| 12h         | 43200       |
| 1d          | 86400       |
| 7d          | 604800      |

> **Response:**

```
{
    "code":"00000",
    "msg":"success",
    "requestTime":1622097356073,
    "data":[
        {
            "open":"2.34517",
            "high":"2.34771",
            "low":"2.34214",
            "close":"2.34555",
            "quoteVol":"189631.101357091",
            "baseVol":"80862.6823",
            "usdtVol":"189631.101357091",
            "ts":"1622091360000"
        },
        {
            "open":"2.34391",
            "high":"2.34903",
            "low":"2.34391",
            "close":"2.34608",
            "quoteVol":"167725.002115681",
            "baseVol":"71479.3205",
            "usdtVol":"167725.002115681",
            "ts":"1622091420000"
        }
    ]
}
```

**Response Field**

| Field    | Description           |
| -------- | --------------------- |
| ts       | System timestamp      |
| open     | Opening price         |
| high     | Highest price         |
| low      | Lowest price          |
| close    | Closing price         |
| baseVol  | Base Currency volume  |
| quoteVol | Quote Currency volume |
| usdtVol  | USDT volume           |

### Order Book <a href="#order-book" id="order-book"></a>

Rate limit rule: 20 request/1s

**HTTP Request** &#x20;

* GET /api/spot/v1/market/depth

**Request parameter**

| Parameters | Type   | Required | Description                                                                   |
| ---------- | ------ | -------- | ----------------------------------------------------------------------------- |
| symbol     | String | Yes      | Currency pair                                                                 |
| type       | String | Yes      | Default: step0: do not merge, value: step0, step1, step2, step3, step4, step5 |
| limit      | String | Yes      | Default 500                                                                   |

> **Response:**

```
{
    "code":"00000",
    "msg":"success",
    "requestTime":1622102974025,
    "data":{
        "asks":[
            [
                "38084.5",
                "0.0039"
            ],
            [
                "38085.7",
                "0.0018"
            ],
            [
                "38086.7",
                "0.0310"
            ],
            [
                "38088.2",
                "0.5303"
            ]
        ],
        "bids":[
            [
                "38073.7",
                "0.4993000000000000"
            ],
            [
                "38073.4",
                "0.4500"
            ],
            [
                "38073.3",
                "0.1179"
            ],
            [
                "38071.5",
                "0.2162"
            ]
        ],
        "timestamp":"1622102974025"
    }
}
```

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://weex-1.gitbook.io/en/restapi/spot-market-data-endpoints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
