> From TickerLayer docs, Crypto: https://tickerlayer.com/docs/products/crypto#crypto-snapshot
> 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

## Snapshot

**Endpoint:** `GET /crypto/snapshot/:symbol`

Combined view: latest bid/ask, last trade, previous daily close, and derived change metrics in one normalized aggregated snapshot. Missing pieces return as null; an all-null snapshot returns 404.

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `symbol` | string | Yes | Enabled crypto symbol (e.g. BTCUSD). Trimmed and uppercased before lookup. Retrieve the full list from GET /crypto/symbols. |

### Request

```bash
curl -sS "https://api.tickerlayer.com/crypto/snapshot/BTCUSD" \
  -H "x-api-key: <YOUR_API_KEY>"
```

```python
import requests

res = requests.get(
    "https://api.tickerlayer.com/crypto/snapshot/BTCUSD",
    headers={"x-api-key": "<YOUR_API_KEY>"},
)
print(res.json())
```

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

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

### Response

```json
{
  "symbol": "BTCUSD",
  "bid": 84210.12,
  "ask": 84210.45,
  "bid_size": 1.2,
  "ask_size": 0.8,
  "last_price": 84215.42,
  "last_size": 0.53,
  "last_timestamp": 1743512400000,
  "prev_close": 83800.10,
  "change": 415.32,
  "change_percent": 0.4956
}
```

### Notes

- `change` and `change_percent` use last trade vs previous close; either may be `null` when inputs are not available in the aggregated view.
- If `prev_close` is `0`, `change_percent` is `null` to avoid division by zero.
