# Wagyu API documentation

> Quote, create and track cross-chain swaps into and out of Monero (XMR) and Zcash (ZEC), bridge XMR and ZEC to Hyperliquid, and give AI agents a swap tool. Public API, no key needed to start.

One public HTTP API to quote, create and track cross-chain swaps into and out of Monero (XMR) and Zcash (ZEC), bridge them to Hyperliquid, and hand the whole flow to an AI agent. No key needed to start.

<!-- Quote 0.01 BTC → XMR. Try it now: no key, no account. -->
```bash
curl -X POST 'https://api-beta.wagyu.xyz/v2/swaps/quote' \
  -H 'content-type: application/json' \
  -d '{"fromChainId":20000000000001,"toChainId":0,"fromToken":"bitcoin","toToken":"XMR","fromAmount":"1000000"}'
```

- **14** chains in the catalog
- **7,533** tokens you can send
- **$1.33B** swapped, all time
- **44,207** orders, all time

_Live from the API, read when this page was built (4 Nov 2026, 08:24 UTC)._

## Start here

- [Quickstart](https://docs.wagyu.xyz/getting-started.md): Quote, create and track a swap in four calls.
- [API keys and fees](https://docs.wagyu.xyz/authentication.md): Get a key in two minutes and earn 0–5% on every order you send.
- [MCP server](https://docs.wagyu.xyz/mcp.md): Give Claude, Cursor or any MCP client a swap tool.
- [Bridge XMR1 and ZEC1](https://docs.wagyu.xyz/native-bridge.md): Move XMR and ZEC to Hyperliquid and back.
- [Chains and tokens](https://docs.wagyu.xyz/chains.md): Every chain, chain id, minimum and token value, live.
- [API reference](https://docs.wagyu.xyz/api-reference.md): Every route, generated from the live contract.

## How a swap works

1. **Pick the two assets.** Each asset is a `chainId` plus a token value from the catalog ([Chains and tokens](https://docs.wagyu.xyz/chains.md)).
2. **Quote.** `POST /v2/swaps/quote` returns what the user would receive. It is an estimate, not a deposit instruction.
3. **Create the order.** `POST /v2/swaps` returns a deposit address, the exact amount to send, a deadline, an `orderId` and a private `sessionId`.
4. **Track it.** Poll `GET /v2/swaps/{id}` with the session, or listen on a WebSocket, until the order is `completed`, `refunded`, `failed` or `expired`.

The user sends funds from their own wallet. Nothing moves until that deposit arrives. The [quickstart](https://docs.wagyu.xyz/getting-started.md) walks through the four calls with real responses.

## Five rules that prevent most bugs

- **Amounts are integer strings in atomic units.** `"1000000"` is 0.01 BTC (8 decimals). Never send a float. See [Amounts and fees](https://docs.wagyu.xyz/money-and-settlement.md).
- **Show the funding instruction, not the quote.** After creating an order, display its `depositAddress`, `depositAmount` and `expiresAt` exactly as returned.
- **Never retry order creation automatically.** There is no idempotency key: a second `POST /v2/swaps` after a timeout can create a second order.
- **Keep the `sessionId` private.** It is the only credential that can read or act on an order. Send it in the `X-Session-ID` header, never in a URL.
- **Drive your screen from `customerState`.** It says what the user sees and may do next. `status` is the coarse outcome. See [Order lifecycle](https://docs.wagyu.xyz/order-lifecycle.md).

## Where things live

| What | Where |
| --- | --- |
| HTTP API | `https://api-beta.wagyu.xyz`. Public, JSON. Call it from your server: browsers on other sites are blocked by CORS. |
| OpenAPI 3.1 contract | [`/v2/docs`](https://api-beta.wagyu.xyz/v2/docs), also mirrored at [/openapi.json](/openapi.json) |
| AsyncAPI 3.0 (WebSockets) | [`/v2/asyncapi`](https://api-beta.wagyu.xyz/v2/asyncapi), also at [/asyncapi.json](/asyncapi.json) |
| MCP server for agents | `https://mcp.wagyu.xyz` ([guide](https://docs.wagyu.xyz/mcp.md)) |
| Get an API key | [wagyu.xyz/api](https://wagyu.xyz/api), self-serve ([guide](https://docs.wagyu.xyz/authentication.md)) |
| Support | [t.me/wagyu_support](https://t.me/wagyu_support) |

> **For AI tools:** Every page is also plain Markdown at its URL plus `.md` (this one is [/index.md](/index.md)). [/llms.txt](/llms.txt) lists them all, and [/llms-full.txt](/llms-full.txt) has everything on one page.

---
Source: https://docs.wagyu.xyz/ · Built from the live Wagyu API on 2026-11-04.
