Swap quickstart
Choose assets, quote, create, and track. Replace the placeholders below with values from your integration.
For partner attribution and fees, include X-Integrator-Key on quote and create requests. Backend integrations can also enable per-client limits.
1. Discover supported assets
curl https://wagyu-swap.org/api-beta/v2/swaps/assets
Fetch tokens for the selected direction and chain. Use their returned identifiers and decimals.
curl 'https://wagyu-swap.org/api-beta/v2/swaps/assets/tokens?direction=from&chainId=<source-chain-id>&limit=100'
The token endpoint supports q, offset, and limit up to 100. Availability can change; the quote confirms whether a route is available now.
2. Ask for a quote
Send fromAmount as a string in atomic units, not a floating-point amount.
curl --request POST https://wagyu-swap.org/api-beta/v2/swaps/quote \
--header 'content-type: application/json' \
--data '{
"fromChainId": <source-chain-id>,
"toChainId": <destination-chain-id>,
"fromToken": "<source-token>",
"toToken": "<destination-token>",
"fromAmount": "<atomic-source-amount>",
"toAddress": "<recipient-address>"
}'
The response includes the estimated toAmount. For exact output, send toAmount instead of fromAmount. See fees and settlement for amount details.
3. Create the durable order
Send the same JSON body to POST /v2/swaps. Omit sessionId; the API returns it with the created order.
Save orderId and sessionId. Show the returned deposit address, amount, and funding deadline exactly. Use these funding instructions, not the quote estimate.
Do not automatically retry creation after a timeout. The first request may have created an order; another POST can create a duplicate. Keep the session private and out of URLs.
4. Track it to a terminal state
curl https://wagyu-swap.org/api-beta/v2/swaps/<order-id> \
--header 'x-session-id: <returned-session-id>'
Render customerState for progress and available actions. Keep polling until the order resolves; WebSocket updates are optional.
Next: order lifecycle · errors and retries · API reference.
Optional card funding
Card funding with Privy
Send fundingProvider: "privy" only for a USDC-on-Arbitrum source with a compatible provider adapter. Otherwise omit it. Order creation confirms availability.