# Trades stream · HyperEVM API · Femtos

> The swaps of one pool, one message per block that has some.

- Base URL: `https://api.femtos.xyz/v1` (REST) · `wss://api.femtos.xyz/v1/ws` (WebSocket) · MCP: `https://api.femtos.xyz/mcp`
- Auth: `Authorization: Bearer $FEMTOS_KEY` (or `X-API-KEY: $FEMTOS_KEY`). Free key: https://femtos.xyz/accounts/ (browser), or with
  no browser: `GET https://femtos.xyz/accounts/agent/challenge`, solve its proof of work, then `POST https://femtos.xyz/accounts/agent/signup`
  (https://femtos.xyz/agents.md#agent-onboarding)
- Decimals are exact strings, times Unix milliseconds, addresses lowercase `0x`
- Whole API in one file: https://femtos.xyz/agents.md · OpenAPI: https://api.femtos.xyz/v1/openapi.json · Index: https://femtos.xyz/llms.txt
- Page with live calls: https://femtos.xyz/hyperevm/ws-trades

WebSocket: get a ticket (`POST https://api.femtos.xyz/v1/ws-ticket` with your key), connect to `wss://api.femtos.xyz/v1/ws?ticket=$TICKET`, send the frame below; the first message has `"snapshot": true`. Details: https://femtos.xyz/agents.md#websocket

## Trades stream — WS `hyperevm.trades`

The swaps of one pool, one message per block that has some.

| Param | In | Example or values |
|---|---|---|
| `pair` | filter | `<evmPair>` |

```json
{"op":"subscribe","channel":"hyperevm.trades","filter":{"pair":"<evmPair>"}}
```

| Field | Type | Meaning |
|---|---|---|
| `snapshot: true` | Trade[] | last 50 swaps at subscribe |
| `data` | Trade[] | the swaps of one block |

## Related (Market data)

- [Markets](https://femtos.xyz/hyperevm/markets.md): Active HyperEVM pools with 24 h stats.
- [Candles](https://femtos.xyz/hyperevm/candles.md): OHLCV of one pool in pair price, USD and market cap, ascending, UTC-aligned.
- [Forming candle](https://femtos.xyz/hyperevm/ws-candles.md): The forming candle, pushed once per block where it changes.
- [Trades](https://femtos.xyz/hyperevm/trades.md): Latest swaps of one pool, newest first.

All HyperEVM endpoints: https://femtos.xyz/hyperevm.md
