> From TickerLayer docs, Indices: https://tickerlayer.com/docs/rest/indices#indices-last-trade
> REST base URL https://api.tickerlayer.com, API key in the `x-api-key` header. WebSocket wss://stream.tickerlayer.com?apiKey=YOUR_API_KEY. Full API reference: https://tickerlayer.com/llms-full.txt

## Last trade

**Endpoint:** `GET /indices/trade/last/:symbol`

Latest indicative trade-style print for the index. size may be null when the feed has no lot size.

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | Enabled index symbol (e.g. US500, DE40, EU50, JP225). Generic regional codes only, trimmed and uppercased before lookup. Full list: GET /indices/symbols. |

### Request

```bash
curl -sS "https://api.tickerlayer.com/indices/trade/last/US500" \
  -H "x-api-key: <YOUR_API_KEY>"
```

```python
import requests

res = requests.get(
    "https://api.tickerlayer.com/indices/trade/last/US500",
    headers={"x-api-key": "<YOUR_API_KEY>"},
)
print(res.json())
```

```javascript
const res = await fetch("https://api.tickerlayer.com/indices/trade/last/US500", {
  headers: { "x-api-key": "<YOUR_API_KEY>" },
});
const data = await res.json();
console.log(data);
```

```go
req, _ := http.NewRequest("GET", "https://api.tickerlayer.com/indices/trade/last/US500", nil)
req.Header.Set("x-api-key", "<YOUR_API_KEY>")
```

### Response

```json
{
  "symbol": "US500",
  "price": 4788.12,
  "size": 62,
  "timestamp": 1743512400000
}
```

### Notes

`404` when the symbol is unknown or no trade-style value can be resolved (message text may be `unknown symbol` or `symbol not available`).
