> For the complete documentation index, see [llms.txt](https://docs.bbx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bbx.com/bbx-dex-public-api/coinmarketcap-integration/spot/spot-recent-trades.md).

# Spot Recent trades

Returns up to the latest 500 trades for a specified spot market, ordered from newest to oldest.

## Request

```http
GET /sapi/v4/market/v1/public/cmc/trades/{market_pair}
```

## Path parameter

| Parameter     | Location | Type   | Required | Description                                |
| ------------- | -------- | ------ | -------: | ------------------------------------------ |
| `market_pair` | path     | string |      Yes | Spot market identifier, such as `BTC_USDT` |

## Example request

```
https://dex.bbx.com/sapi/v4/market/v1/public/cmc/trades/BTC_USDT
```

## cURL

```bash
curl -s \
  'https://dex.bbx.com/sapi/v4/market/v1/public/cmc/trades/BTC_USDT'
```

## Response fields

| Field          | Type    | Requirement | Description                      |
| -------------- | ------- | ----------: | -------------------------------- |
| `trade_id`     | integer |    Required | Unique trade identifier          |
| `price`        | string  |    Required | Trade price                      |
| `base_volume`  | string  |    Required | Trade quantity in the base asset |
| `quote_volume` | string  |    Required | Trade amount in the quote asset  |
| `timestamp`    | integer |    Required | Trade time in Unix milliseconds  |
| `type`         | string  |    Required | Aggressor side: `buy` or `sell`  |

## Trade-side definition

* `buy`: an ask order was matched; the aggressor was the buyer.
* `sell`: a bid order was matched; the aggressor was the seller.

## Example response

```json
[
  {
    "trade_id": 647597095463426688,
    "price": "66366.17",
    "base_volume": "0.00099975",
    "quote_volume": "66.34942696",
    "timestamp": 1784101179330,
    "type": "buy"
  },
  {
    "trade_id": 647596861127662208,
    "price": "66342.89",
    "base_volume": "0.00100000",
    "quote_volume": "66.34289000",
    "timestamp": 1784101123460,
    "type": "sell"
  }
]
```
