API reference
API reference
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. |
| Errors | { "code", "error" }, plus minAmountUsd, retryAfter or reason when relevant. See Errors. |
| 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 · AsyncAPI 3.0 · mirrored at /openapi.json and /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. |
| 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 |
Get swap terms |
GET |
/v2/swaps/assets |
List chains and featured tokens |
GET |
/v2/swaps/assets/tokens |
Search tokens |
POST |
/v2/swaps/quote |
Quote a swap |
POST |
/v2/swaps |
Create a swap order |
GET |
/v2/swaps/{id} |
Read a swap order |
GET |
/v2/swaps/{id}/fills |
List Hyperliquid fills |
PUT |
/v2/swaps/{id}/coinflip |
Answer a swap’s bonus flip |
#Bridge
| Method | Path | What it does |
|---|---|---|
GET |
/v2/bridges/terms |
Get bridge terms |
GET |
/v2/bridges/quote |
Quote a bridge amount |
POST |
/v2/bridges |
Create a bridge order |
GET |
/v2/bridges/{id} |
Read a bridge order |
#Orders
| Method | Path | What it does |
|---|---|---|
DELETE |
/v2/orders/{id} |
Delete an order |
GET |
/v2/orders |
List a session’s orders |
GET |
/v2/orders/{id}/review |
Read an order review |
PUT |
/v2/orders/{id}/review |
Review an order |
PUT |
/v2/orders/{id}/refund-address |
Submit a refund address |
POST |
/v2/orders/{id}/deposit-wait/close |
Continue on a short deposit |
PUT |
/v2/orders/{id}/payout-address |
Submit a replacement payout address |
#Integrator
| Method | Path | What it does |
|---|---|---|
GET |
/v2/integrator/me |
Read your integration |
GET |
/v2/integrator/orders |
List attributed orders |
#Stats
| Method | Path | What it does |
|---|---|---|
GET |
/v2/stats/daily |
Get protocol statistics |
GET |
/v2/swaps/route-stats |
Get route execution times |
#Activity
| Method | Path | What it does |
|---|---|---|
GET |
/v2/recent-swaps |
List recent swaps |
GET |
/v2/bridges/recent |
List recent bridge orders |
#Config
| Method | Path | What it does |
|---|---|---|
GET |
/v2/notice |
Read the site notice |
GET |
/v2/nodes |
List Monero nodes |
#Points
| Method | Path | What it does |
|---|---|---|
GET |
/v2/points/{address} |
Get an address’s points |
GET |
/v2/points/leaderboard |
Get the points leaderboard |
#Coinflip
| Method | Path | What it does |
|---|---|---|
POST |
/v2/coinflips/{id}/bets |
Place a coinflip bet |
POST |
/v2/coinflips/{id}/cashout |
Cash out a coinflip table |
POST |
/v2/coinflips/{id}/presence |
Keep a coinflip table open |
POST |
/v2/coinflips/{id}/reopen |
Reopen a coinflip table |
GET |
/v2/coinflips/recent |
List recent coinflip rounds |
GET |
/v2/coinflips/terms |
Get coinflip terms |
POST |
/v2/coinflips |
Create a coinflip table |
GET |
/v2/coinflips/{id} |
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.