Get started
API keys and integrator fees
You do not need a key to quote, create or track swaps. A key is what attributes orders to your app and pays you a fee on each one.
| With a key you get | |
|---|---|
| Your own fee | 0–5% on every order you send, paid to your own wallets. |
| Attribution and reporting | Your orders, volume and fees earned, across all your keys. |
| Limits that grow with you | A new integration works right away on starter limits. Wagyu raises them for production traffic. |
#Get a key (self-serve, about two minutes)
- Open wagyu.xyz/api.
- Connect a wallet. Any EVM wallet (MetaMask, Rabby…) or a Solana wallet. This wallet owns the integration; you sign in with it again to manage it.
- Sign the login message. It is a plain message, not a transaction: no gas, nothing moves. Only sign it on wagyu.xyz. The login lasts 24 hours.
- Create an integration.
- App name: 2–50 characters (letters, digits, spaces,
-,_). - Payout addresses: one EVM, one Solana and one Bitcoin address. All three are required. If you signed in with an EVM wallet, the EVM field is pre-filled.
- App name: 2–50 characters (letters, digits, spaces,
- Copy the key. It looks like
wg_followed by 48 hex characters and is shown once. Wagyu stores only a hash; afterwards the page shows the first 12 characters so you can tell keys apart. - Set your fee. A new integration starts at
0%. Change it on the same page, from0to5.
One wallet can own up to 5 integrations, and each integration can have several keys (one per server or environment). All keys of an integration share its fee and payout addresses. From the same page you can change the fee and the payout addresses (your wallet signs the new addresses, so a session alone cannot redirect your fees), issue or revoke a key, delete the integration (every key stops at once, and this cannot be undone from the page), and see orders, volume and fees earned.
#Send the key
Send it as a header on quote and create requests:
X-Integrator-Key: wg_YOUR_KEY| Situation | What the API does |
|---|---|
| No key | Works. The order is not attributed and carries no integrator fee. |
X-API-Key: wg_… |
Accepted as an alias of X-Integrator-Key. |
| Invalid, revoked or suspended key | 401 unauthorized. |
integratorFeePercent sent without a key |
401 unauthorized. |
Key put in the URL (?apiKey=…) |
400 invalid_request: the API refuses query parameters it does not know. |
| Key or settings changed in the portal | Can take up to one minute to apply. |
Each line above that names a status was checked against the live API. With an invalid key:
{
"code": "unauthorized",
"error": "Authentication required."
}#Your fee
Your integration's default fee applies to every order sent with your key. To charge a different fee on one quote or order, send integratorFeePercent (0–5) in the body:
{ "integratorFeePercent": 0.5 }Your fee is added on top of Wagyu's own fee, so the user sees it in the quote. The quote returns it as integratorFee: { feePercent, feeAmountUsd, feeAddress }, or null when no fee applies to that route. Treat the quote as the source of truth.
The payout address depends on what the user sends:
| User sends from | Your fee is paid to your |
|---|---|
| An EVM chain (Ethereum, Arbitrum, Base, BSC, HyperEVM…) | EVM address |
| Solana | Solana address |
| Bitcoin | Bitcoin address |
| Monero (XMR) | EVM address |
| Tron | No integrator fee on Tron sources today (integratorFee is null) |
A fee too small to be worth its own transfer cost is skipped, not owed. Sending integratorFeePercent above 0 on a Tron source is refused with 400, since there is no address to pay it to.
#Reporting
Both routes need a server key and cover the whole integration across its keys. A public-client key gets 403.
| Route | Returns |
|---|---|
GET /v2/integrator/me |
{ integrator, stats, access }: profile, fee settings, activity, current limits and usage. |
GET /v2/integrator/orders |
{ orders, total, limit, offset }: attributed orders, each with a fee status: none, projected, paid, owed or skipped. |
These two routes are not in openapi.json.
#Limits
Requests without a key, and requests with a public-client key, are limited per IP. A public-client key's requests also share one allowance across all its users: the per-IP request limit below unless Wagyu set another for that key (X-RateLimit-Resource: key_requests). These are the current defaults:
| Default limit (anonymous or per IP) | Value | Field in defaultLimits |
|---|---|---|
| Requests per minute | 600 | requestLimitPerMin |
| Quotes per minute | 60 | quoteLimitPerMin |
| Order creations per minute | 6 | createLimitPerMin |
| Unfinished orders at once | 5 | maxOpenOrders |
| Window in which an unfinished order counts | 30 minutes | openOrderWindowMinutes |
Live from GET /v2/swaps/terms, read when this page was built (4 Dec 2026, 19:24 UTC).
A new integration is on starter limits. Once Wagyu approves it, its server keys share integration limits: one allowance for the whole integration, across all its keys and every server they call from. access.tier in GET /v2/integrator/me says which you are on: starter or standard. A standard integration starts on a preset that Wagyu raises for your traffic, so tell support the volume you expect. Either way, read your limits from access.limits instead of assuming the defaults. On 429, wait for the Retry-After header. X-RateLimit-Resource names the limit you hit, and the error says whose it is: your integration's, one key's, or one end user's. The values are listed in Errors, limits, retries.
Order creations are also limited in how many can be in progress at once from one address, your server's included. Past that, a create gets 429 with X-RateLimit-Resource: creation and a Retry-After of a few seconds: retry when one of your creates has returned.
Unfinished orders count against maxOpenOrders for 30 minutes. They stop counting once completed, failed, expired or refunded. Revoking or rotating a key does not free their slots.
#Forward each end user's IP (backends serving many users)
Everything your backend sends shares your integration's limits, so one busy user can use them up for everyone. Forwarding each user's IP adds a per-user ceiling under those limits. It does not add capacity: to serve more traffic, ask for higher integration limits. Forwarding needs a standard integration: ask support to approve your server's egress IP, then send the user's IP on each request. access.clientIpForwarding.status says where you stand: unavailable (not on the standard tier), inactive (no server approved yet) or active.
X-Integrator-Key: wg_YOUR_KEY
X-End-User-IP: 203.0.113.42- Send one literal IPv4 or IPv6 address: no port, hostname, CIDR range or list. Take it from your trusted ingress and overwrite any value the user supplied.
- Use
X-End-User-IP, notX-Forwarded-For,CF-Connecting-IPorX-Real-IP. - Each forwarded user gets the per-user limits in
access.clientIpForwarding.limits, and every request still counts against your integration's limits. Once forwarding is on, requests without the header share one per-user allowance. - An IPv6 user counts as its /64, like a direct caller: users in one /64 share one allowance.
- Forwarding from a server that is not approved returns
403; an invalid address from an approved server returns400.
#Order ownership
Orders are not tied to an account. Whoever holds an order's session owns it.
| Credential | How to send it | What it allows |
|---|---|---|
sessionId, returned when the order is created |
Header X-Session-ID |
Read the order and take every owner action (refund address, review, delete…). |
| The order's exact destination address | Query ?verify=<address> |
Read that one order. No actions. |
| Your integrator key | Header X-Integrator-Key |
Attribution and fees. It does not unlock other people's orders. |
- Keep the session out of URLs, logs and analytics.
- An
orderIdalone grants nothing. A missing order and a wrong proof both answer404. - With a valid integrator key you may supply your own
sessionId(16–64 characters of hex digits and hyphens) at creation, to group your users' orders. It is not an idempotency key and does not prevent duplicates.