> For the complete documentation index, see [llms.txt](https://docs.infoway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infoway.io/en-docs/rest-api/market-data/get-latest-trade.md).

# GET Latest Trade

Retrieve the latest trade for stocks, cryptocurrencies, forex, energy, commodities, and more.

### Overview

Returns the most recent trade tick per symbol. See Symbol convention for suffixes.

### Request frequency

Shares the same HTTP [rate limits](https://docs.infoway.io/en-docs/getting-started/api-limitation/rest-api-limitation) as other REST endpoints.

### Error codes

See [REST API Error Codes](https://docs.infoway.io/en-docs/getting-started/error-codes/rest-api-error-codes). Address list: [Endpoints](https://docs.infoway.io/en-docs/getting-started/endpoints).

### Endpoint

| Market                                      | Full URL                                             |
| ------------------------------------------- | ---------------------------------------------------- |
| Equities (US, HK, CN A-shares)              | `https://data.infoway.io/stock/batch_trade/{codes}`  |
| Japan                                       | `https://data.infoway.io/japan/batch_trade/{codes}`  |
| India                                       | `https://data.infoway.io/india/batch_trade/{codes}`  |
| Korea                                       | `https://data.infoway.io/korea/batch_trade/{codes}`  |
| Taiwan                                      | `https://data.infoway.io/taiwan/batch_trade/{codes}` |
| Crypto                                      | `https://data.infoway.io/crypto/batch_trade/{codes}` |
| Forex, energy, commodities, metals, futures | `https://data.infoway.io/common/batch_trade/{codes}` |

### Authentication

| Header   | Type   | Required | Description  |
| -------- | ------ | -------- | ------------ |
| `apiKey` | String | Yes      | Plan API key |

### Parameters

| Parameter | Type   | Required | Description                        | Example           |
| --------- | ------ | -------- | ---------------------------------- | ----------------- |
| `codes`   | String | Yes      | Comma-separated symbols, up to 100 | `TSLA.US,AAPL.US` |

```http
GET https://data.infoway.io/stock/batch_trade/TSLA.US,AAPL.US
```

### Example response

```json
{
  "ret": 200,
  "msg": "success",
  "traceId": "27bdafb1-c735-4499-aad1-553820284895",
  "data": [
    {
      "s": "XAUAUD",
      "t": 1750177346523,
      "p": "5188.211",
      "v": "3.0",
      "vw": "15564.6330",
      "td": 0
    }
  ]
}
```

| Field | Type   | Description                               | Example         |
| ----- | ------ | ----------------------------------------- | --------------- |
| `s`   | String | Symbol                                    | `USDCNY`        |
| `t`   | Long   | Trade time (Unix milliseconds)            | `1747382898892` |
| `p`   | String | Price                                     | `34.650`        |
| `v`   | String | Volume                                    | `439000`        |
| `vw`  | String | **Turnover / trade value** (not VWAP)     | `15211350.000`  |
| `td`  | int    | Direction: `0` default, `1` buy, `2` sell | `0`             |
