# API reference

> Every route of the Wagyu HTTP API, generated from the live OpenAPI contract, with authentication, parameters, response fields and real captured examples.

Each page below is generated from the live OpenAPI document when the site builds, so field names and types match the API. Examples are real responses captured at build time, except for calls that would create or change a real order.

## Conventions

| | |
| --- | --- |
| Base URL | `https://api.wagyu.xyz` |
| Format | JSON in and out. `content-type: application/json` on requests with a body. |
| Amounts | Positive integer strings in atomic units. USD fields are display values only. |
| Chain ids | Wagyu's own ids, such as `0` for Monero and `20000000000001` for Bitcoin. See [Chains and tokens](https://docs.wagyu.xyz/chains.md). |
| Errors | `{ "code", "error" }`, plus `minAmountUsd`, `retryAfter` or `reason` when relevant. See [Errors](https://docs.wagyu.xyz/actions-and-retries.md#the-error-envelope). |
| Unknown query parameters | Refused with `400 invalid_request`. |
| CORS | Browsers may call the API only from `https://wagyu.xyz`. Call it from your server. |
| Contracts | [OpenAPI 3.1](https://api.wagyu.xyz/v2/docs) · [AsyncAPI 3.0](https://api.wagyu.xyz/v2/asyncapi) · mirrored at [/openapi.json](/openapi.json) and [/asyncapi.json](/asyncapi.json) |

## Authentication

| Scheme | Header or parameter | Used for |
| --- | --- | --- |
| None | — | Catalog, terms, quotes, order creation, public data. |
| Integrator key | `X-Integrator-Key: wg_…` (alias `X-API-Key`) | Optional on quotes and creation: attribution, your fee, company limits. Required for reporting. [Details](https://docs.wagyu.xyz/authentication.md). |
| Owner session | `X-Session-ID: <sessionId>` | Reading an order and every owner action. |
| Destination proof | `?verify=<destination-address>` | Reading one order, read-only. |

## Endpoints

### Swaps

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/swaps/terms`](https://docs.wagyu.xyz/api-reference/get-swap-terms.md) | Get swap terms |
| `GET` | [`/v2/swaps/assets`](https://docs.wagyu.xyz/api-reference/get-swap-assets.md) | List chains and featured tokens |
| `GET` | [`/v2/swaps/assets/tokens`](https://docs.wagyu.xyz/api-reference/get-swap-asset-tokens.md) | Search tokens |
| `POST` | [`/v2/swaps/quote`](https://docs.wagyu.xyz/api-reference/quote-swap.md) | Quote a swap |
| `POST` | [`/v2/swaps`](https://docs.wagyu.xyz/api-reference/create-swap-order.md) | Create a swap order |
| `GET` | [`/v2/swaps/{id}`](https://docs.wagyu.xyz/api-reference/get-swap-order.md) | Read a swap order |
| `GET` | [`/v2/swaps/{id}/fills`](https://docs.wagyu.xyz/api-reference/get-swap-fills.md) | List Hyperliquid fills |
| `PUT` | [`/v2/swaps/{id}/coinflip`](https://docs.wagyu.xyz/api-reference/resolve-coinflip.md) | Answer a swap’s bonus flip |

### Bridge

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/bridges/terms`](https://docs.wagyu.xyz/api-reference/get-bridge-terms.md) | Get bridge terms |
| `GET` | [`/v2/bridges/quote`](https://docs.wagyu.xyz/api-reference/quote-bridge.md) | Quote a bridge amount |
| `POST` | [`/v2/bridges`](https://docs.wagyu.xyz/api-reference/create-bridge-order.md) | Create a bridge order |
| `GET` | [`/v2/bridges/{id}`](https://docs.wagyu.xyz/api-reference/get-bridge-order.md) | Read a bridge order |

### Orders

| Method | Path | What it does |
| --- | --- | --- |
| `DELETE` | [`/v2/orders/{id}`](https://docs.wagyu.xyz/api-reference/delete-order.md) | Delete an order |
| `GET` | [`/v2/orders`](https://docs.wagyu.xyz/api-reference/list-session-orders.md) | List a session’s orders |
| `GET` | [`/v2/orders/{id}/review`](https://docs.wagyu.xyz/api-reference/get-order-review.md) | Read an order review |
| `PUT` | [`/v2/orders/{id}/review`](https://docs.wagyu.xyz/api-reference/submit-order-review.md) | Review an order |
| `PUT` | [`/v2/orders/{id}/refund-address`](https://docs.wagyu.xyz/api-reference/submit-refund-address.md) | Submit a refund address |
| `POST` | [`/v2/orders/{id}/deposit-wait/close`](https://docs.wagyu.xyz/api-reference/continue-on-arrived-deposit.md) | Continue on a short deposit |
| `PUT` | [`/v2/orders/{id}/payout-address`](https://docs.wagyu.xyz/api-reference/submit-payout-address.md) | Submit a replacement payout address |

### Integrator

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/integrator/me`](https://docs.wagyu.xyz/api-reference/get-integrator.md) | Read your integration |
| `GET` | [`/v2/integrator/orders`](https://docs.wagyu.xyz/api-reference/list-integrator-orders.md) | List attributed orders |

### Stats

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/stats/daily`](https://docs.wagyu.xyz/api-reference/get-protocol-stats.md) | Get protocol statistics |
| `GET` | [`/v2/swaps/route-stats`](https://docs.wagyu.xyz/api-reference/get-swap-route-stats.md) | Get route execution times |

### Activity

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/recent-swaps`](https://docs.wagyu.xyz/api-reference/get-recent-swaps.md) | List recent swaps |
| `GET` | [`/v2/bridges/recent`](https://docs.wagyu.xyz/api-reference/get-recent-bridge-orders.md) | List recent bridge orders |

### Config

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/notice`](https://docs.wagyu.xyz/api-reference/get-site-notice.md) | Read the site notice |
| `GET` | [`/v2/nodes`](https://docs.wagyu.xyz/api-reference/list-nodes.md) | List Monero nodes |

### Points

| Method | Path | What it does |
| --- | --- | --- |
| `GET` | [`/v2/points/{address}`](https://docs.wagyu.xyz/api-reference/get-points.md) | Get an address’s points |
| `GET` | [`/v2/points/leaderboard`](https://docs.wagyu.xyz/api-reference/get-points-leaderboard.md) | Get the points leaderboard |

### Coinflip

| Method | Path | What it does |
| --- | --- | --- |
| `POST` | [`/v2/coinflips/{id}/bets`](https://docs.wagyu.xyz/api-reference/place-coinflip-bet.md) | Place a coinflip bet |
| `POST` | [`/v2/coinflips/{id}/cashout`](https://docs.wagyu.xyz/api-reference/cash-out-coinflip.md) | Cash out a coinflip table |
| `POST` | [`/v2/coinflips/{id}/presence`](https://docs.wagyu.xyz/api-reference/coinflip-presence.md) | Keep a coinflip table open |
| `POST` | [`/v2/coinflips/{id}/reopen`](https://docs.wagyu.xyz/api-reference/reopen-coinflip.md) | Reopen a coinflip table |
| `GET` | [`/v2/coinflips/recent`](https://docs.wagyu.xyz/api-reference/get-recent-coinflip-rounds.md) | List recent coinflip rounds |
| `GET` | [`/v2/coinflips/terms`](https://docs.wagyu.xyz/api-reference/get-coinflip-terms.md) | Get coinflip terms |
| `POST` | [`/v2/coinflips`](https://docs.wagyu.xyz/api-reference/create-coinflip-order.md) | Create a coinflip table |
| `GET` | [`/v2/coinflips/{id}`](https://docs.wagyu.xyz/api-reference/get-coinflip-order.md) | Read a coinflip table |

The two **Integrator** routes are not in `openapi.json`; their pages are written from Wagyu's key guide. **Coinflip** and **Points** belong to wagyu.xyz's own products and are listed for completeness.

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