MoonPay Trade Swidge Overview
Discover routes, preview quotes, and submit wallet deposits with the MoonPay Trade Swidge module.
Community modules are developed and maintained independently by third-party contributors.
Tether and the WDK Team do not endorse or assume responsibility for their code, security, or maintenance. Use your own judgment and proceed at your own risk.
The MoonPay Trade Swidge module connects WDK wallet accounts to MoonPay's SwapsXYZ API for swaps and cross-chain transfers. These pages cover @moonpay/wdk-protocol-swidge-moonpay-trade@0.2.0.
The default entry requires global fetch and a SwapsXYZ API key. Execution also requires a chain-specific wallet package and a configured source-network RPC provider. See runtime requirements.
Use the module to discover provider-supported chains and tokens, request indicative quotes, submit a source deposit through a writable wallet account, and track the provider's settlement status.
How execution works
- Discover the source and destination tokens and validate their identifiers and precision.
- Request an indicative quote with
quoteSwidge(). - Confirm the route, input amount, recipient, fees, and minimum acceptable output in your application.
- Call
swidge()to obtain a fresh quote, create a provider swap, and send the source deposit. - Track the returned
idwithgetSwidgeStatus().
swidge() sends funds to the deposit address returned by the provider. It returns the provider's tracking id and the source transaction hash; it does not wait for destination settlement. For an EVM token, the wallet performs a token transfer. The module does not request an ERC-20 allowance or approve a spender.
The indicative quote is not the quote executed by swidge(). Set minAmountOut and fee limits before execution. Version 0.2.0 does not expose the fresh quote or deposit address for a separate confirmation callback before submission.
Choose an integration
| Need | Account requirement |
|---|---|
| Discover chains and tokens, preview quotes, or check provider status | No wallet required |
| Include a best-effort deposit-gas estimate in a quote | A compatible account with transfer-quoting methods |
| Send the source deposit | A supported concrete writable WDK account, connected to the source network |
The execution guide covers exact-input EVM operations. The declared account types also include Bitcoin, TON, Tron, Solana, and account-abstraction variants; see account requirements before using another wallet.
Integration limits
- Provider discovery changes over time. A listed token or chain does not guarantee a quote or executable route.
- Use exact-input execution. The types accept exact-output options, but the execution request does not send an exact-output direction selector.
- The application must verify that the account's network matches the source chain and that the recipient is valid for the destination chain.
- Fee limits cover selected provider fee categories, not the entire cost. See fee limits.
- API requests have no module-level timeout, retry, or cancellation settings. Reconcile a failed submission before retrying it.
Next Steps
Usage
Install the module, discover tokens, and preview a quote without a wallet.
Execute a Swidge
Configure an EVM account, confirm an exact-input operation, and track settlement.
Configuration
Set API access, caching, slippage, and fee limits.
API Reference
Review methods, options, result fields, and exported errors.