> For a complete index of Agora Finance documentation, fetch https://docs.agora.finance/llms.txt

# Simulated Wires

[← Switch to the Production API](/api)

> **Warning**
>
> **This is the sandbox.** It runs on testnets only. **Never send real money or real tokens to an address or bank account the sandbox returns.**
>
> The sandbox is subject to the Beta Features section of our [Terms of Use](https://static.agora.finance/termsofuse.pdf).

The sandbox never sends or receives a real wire. It simulates both directions, so you can test `usd → ausd` and `ausd → usd` routes end to end.

## Mint from a simulated wire

First, create a `usd → ausd` [route](/api/sandbox/endpoints/routes/overview) and register a bank [account](/api/sandbox/endpoints/accounts/overview). Then call [`POST /v0/sandbox/wires`](/api/sandbox/endpoints/sandbox-tools/wires) to stand in for an inbound wire to that route. Send:

* `routeId`: the ID of the `usd → ausd` route you created.
* `sourceAccountId`: the ID of the registered bank account.
* `amount`: USD as a decimal string, up to 2 decimals, from `0.01` to `1000000`.

```bash
curl -s -X POST https://api.sandbox.agora.finance/v0/sandbox/wires \
  -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
  -d "{\"routeId\":\"$ROUTE_ID\",\"sourceAccountId\":\"$BANK_ACCOUNT_ID\",\"amount\":\"100.00\"}"
```

The response is `202` with status `queued` and the simulated wire's `id`. The sandbox creates the inbound wire and sends the same amount of AUSD to the route's destination wallet on testnet, usually within a minute. Poll `GET /v0/transactions` for a `mint` with two legs, one for the inbound wire and one for the token payout.

### Errors

* `404 route_not_found`: the route doesn't exist, isn't yours, or isn't a `usd → ausd` route.
* `404 account_not_found`: the source account isn't a bank account registered to your organization.
* `400 parameter_invalid`: the amount is out of range or has more than 2 decimals.

## Redeem to simulated USD

Send testnet AUSD to an `ausd → usd` route's redeem address. The sandbox creates a completed outbound wire to the route's bank account, usually within a minute. No money is sent.

* The payout amount is rounded down to whole cents.
* The transaction appears as a `redeem` with one leg for your token deposit and one for the wire payout.
* Don't send CTK to an `ausd → usd` route. CTK isn't accepted for these routes, so nothing is paid out. The redeem address is keyless, so those tokens are lost for good.