# Was I sandwiched? | API reference | Femtos

> Every sandwich of a wallet’s swaps on Elysium: the bot, its two transactions, what the wallet lost. Free, no key. GET /v1/wallet/{address}/mev on Elysium: parameters, response fields and a live call per layer.

- 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`. Free key: https://dashboard.femtos.xyz/signup (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/reference/wallet-mev

## Was I sandwiched? — GET `/v1/wallet/{address}/mev`

Every sandwich of a wallet’s swaps on Elysium: the bot, its two transactions, what the wallet lost. Free, no key.

Layers: Elysium. Not on HyperCore: HyperCore trades on its order book, not on pools: no pool swap to sandwich there. Not on HyperEVM: MEV is detected on Elysium first: HyperEVM next, with the same answers.
Page with live calls: https://femtos.xyz/reference/wallet-mev?layer=elysium

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `address` | path | `0xdf48383ed60bd6ea38aaf16051eccd83d07c23af` | The wallet: 0x address, or a named wallet's handle |
| `layer` | query | `elysium` | Layer (elysium; hyperevm later) |
| `confidence` | query | `(empty)`, `strict`, `probable`, `sure` | strict or probable: that shape only; sure: strict, or by a known sandwich bot (the `sure` rows); absent: all |
| `limit` | query | `20` | Rows |
| `cursor` | query | (optional) | Next page: `next_cursor` of the previous answer |

```bash
curl -H "Authorization: Bearer $FEMTOS_KEY" "https://api.femtos.xyz/v1/wallet/0xdf48383ed60bd6ea38aaf16051eccd83d07c23af/mev?layer=elysium&limit=20"
```

| Field | Type | Meaning |
|---|---|---|
| `total` | object | Every sandwich of the address (of `confidence` when given): {sandwiches, lossUsd, victimUsd} |
| `sandwiches[]` | object | Newest first: {id, layer, confidence, sure, time, block, victimTx, frontTx, frontBlock, backTx, backBlock, pool, …} |
| `sandwiches[].confidence` | strict \| probable | The shape. strict: front-run in the victim's block, back-run in the next; probable: any other spacing up to 120 blocks |
| `sandwiches[].bot` | string | Bot: the sender of the back-run (the front-run's, or another address sending through the same bot contract): 0x address, or a named wallet's handle |
| `sandwiches[].lossUsd` | decimal \| null | The victim's loss, USD: its share of the bot's profit (negative: the bot lost); null when unpriced |
| `sandwiches[].botProfit` | object | The whole sandwich's profit (every victim's row repeats it): {token, amount, usd} |
| `sandwiches[].frontTx` | string | Front-run transaction (the bot's first swap) |
| `sandwiches[].backTx` | string | Back-run transaction (the bot's swap back) |
| `next_cursor` | string \| null | Opaque cursor of the next page: pass it as `cursor`, unchanged. null on the last page |

Next page: `cursor` = the `next_cursor` of the previous answer (https://femtos.xyz/agents.md#pagination).

## Related (Bridges & wallets)

- [Cross-layer wallet](https://femtos.xyz/reference/wallet.md) `GET /v1/wallet/{address}`: One address (or a named wallet's handle) on HyperCore, HyperEVM and Elysium, plus its latest events. (Elysium, HyperCore, HyperEVM)
- [Wallet stream](https://femtos.xyz/reference/ws/wallet.md) `WS wallet`: Every event of the three layers touching one address. (Elysium, HyperCore, HyperEVM)
- [Swaps by wallet](https://femtos.xyz/reference/wallet-trades.md) `GET /v1/trades`: Every swap a wallet sent (or a pool’s, a token’s), newest first, filterable by token, side, size and time. (Elysium, HyperEVM)
- [Transfers by wallet](https://femtos.xyz/reference/wallet-transfers.md) `GET /v1/transfers`: ERC-20 transfers sent and received by a wallet, newest first, filterable by token, direction, size and time. (Elysium, HyperEVM)
- [Ledger stream](https://femtos.xyz/reference/ws/ledger.md) `WS hc.ledger`: Deposits, withdrawals, transfers and other non-trade balance moves. (HyperCore)
- [Bridge movements](https://femtos.xyz/reference/bridge.md) `GET /v1/bridges`: Matched HyperCore ↔ HyperEVM transfers with 24 h stats. (Elysium, HyperCore, HyperEVM)
- [Bridge stream](https://femtos.xyz/reference/ws/bridge.md) `WS elysium.bridge | bridge.transfers`: Each HyperCore ↔ HyperEVM transfer, initiated then completed. (Elysium, HyperCore, HyperEVM)
- [Bridge movements stream](https://femtos.xyz/reference/ws/bridges.md) `WS bridges.recent`: The GET /v1/bridges answer (movements newest first, 24 h stats), pushed on subscribe, then when a movement of the route changes state. (Elysium, HyperCore, HyperEVM)
- [Bridge coverage](https://femtos.xyz/reference/bridge-coverage.md) `GET /v1/bridges/coverage`: Every HyperCore ↔ HyperEVM leg since our data starts, paired with its other leg: matched share per direction and token, why the others are not, latency. (HyperCore, HyperEVM)

Every page: https://femtos.xyz/reference.md
