Overview
Test the full swap lifecycle — getting quotes and executing cross-chain or same-chain token swaps — without spending real funds. Sandbox base URL:https://crypto-sandbox.yativo.com/api/
Swap rates in the sandbox are simulated. They reflect approximate market conditions but are not live market prices.
Step 1 — Get a Swap Quote
Request a price quote before executing. The quote includes the expected output amount, rate, and fees.Source blockchain:
solana, ethereum, base, polygon, etc.Source token ticker:
USDC_SOL, ETH, SOL, etc.Destination blockchain. Can be the same as
from_chain for same-chain swaps.Destination token ticker:
USDC_ETH, USDC_SOL, etc.Input amount in the source token’s native units, e.g.
"100.00".Source wallet address sending the funds.
Destination wallet address to receive the swapped funds.
Response — Quote
Step 2 — Execute the Swap
Execute a swap using a previously obtained quote ID.The quote ID obtained from
POST /swap/quote.The asset ID of the source wallet to deduct funds from.
Destination wallet address to receive the swapped tokens.
Execute swap
Step 3 — Check Swap History
Retrieve the history of your swaps.Max results to return. Defaults to
20.Records to skip for pagination. Defaults to
0.Filter by status:
pending, completed, failed.cURL
Response
Swap Status Values
| Status | Description |
|---|---|
pending | Swap submitted, awaiting processing. |
processing | Swap in progress — tokens are being exchanged. |
completed | Swap completed. Destination tokens credited. |
failed | Swap failed. Source tokens returned (minus gas fees). |
Testing Scenarios
Test with an expired quote
Test with an expired quote
Wait 60–120 seconds after getting a quote, then try to execute it. Your application should receive an error and re-request a fresh quote.
Test insufficient balance
Test insufficient balance
Request a quote for more than your available balance, then try to execute it. Verify your application handles the
INSUFFICIENT_BALANCE error.
