> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.finrock.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate Withdrawal

> Check which spending rule a withdrawal would match, and whether it would be allowed, need approval or be blocked, without creating anything.

**[MCP scope](https://apidocs.finrock.io/api-reference/mcp-scopes.md):** `dac.read`

Use this endpoint to see which [spending rule](https://apidocs.finrock.io/guides/spending-rules.md) a withdrawal from your sub-account would match, and what would happen: allowed, needs approval, or blocked. Nothing is created, reserved or sent. Use it before you send a withdrawal, or when you're setting up rules.

It evaluates the sub-account your API key belongs to, in the same way as a real withdrawal:

* Rules are checked lowest cap first, and on equal caps the rule needing more approvals comes first.
* The first matching rule wins. If no rule matches, the withdrawal is blocked.
* Rolling (`Hourly`) caps include the sub-account's recent withdrawals.

## Body Parameters

**asset** `string` *required*

The asset, for example `USDT_TRC20`.

**amount** `number` *required*

The amount in the asset, `0` or more. Finrock converts it to USD at the current price, the same way it does for spending rule caps.

**destination\_type** `string` *required*

Where the funds would go. One of `EXTERNAL`, `SUBACCOUNT`, `EXCHANGE`, `STAKE`, `SWAP` or `RAMP`.

**destination\_id** `string`

Required for `EXTERNAL`, `SUBACCOUNT` and `EXCHANGE`: the address, the sub-account ID, or the exchange name. Not used for `STAKE`, `SWAP` or `RAMP`.

**destination\_tag** `string`

A destination tag or memo. It only matters when a whitelist entry is limited to a tag.

**initiated\_by** `string`

By default, the withdrawal is evaluated as sent by an API key. Pass `Admin` to see how a withdrawal from a dashboard user would be treated.

```bash cURL theme={null}
curl --request POST \
     --url https://api.finrock.io/dac/v1/simulate-withdrawal \
     --header 'Authorization: Bearer {JWT}' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: YOUR_API_KEY' \
     --data '{
       "asset": "USDT_TRC20",
       "amount": 2500,
       "destination_type": "EXTERNAL",
       "destination_id": "TYourDestinationAddress"
     }'
```

## Response

A request that passes validation always returns HTTP `200`, even when the withdrawal would be blocked. Check `allowed`.

**allowed** `boolean`

`false` if no rule allows the withdrawal, or if the matching rule can't currently be used.

**action** `string | null`

`Allow` (goes straight through) or `NeedsApproval`. `null` when no rule matched.

**rule** `object | null`

The matching rule, as `rule_guid` and `rule_title`. It can be set even when `allowed` is `false`, if the rule matched but can't be used.

**required\_approvals** `integer`

How many of the named approvers must approve. `0` for `Allow`.

**approvers** `object[]`

The named approvers who could approve this withdrawal. Each has `user_id`, `first_name` and `last_name`.

**reason** `string | null`

Why the withdrawal would be blocked. `null` when `allowed` is `true`.

```json 200 needs approval theme={null}
{
  "allowed": true,
  "action": "NeedsApproval",
  "rule": { "rule_guid": "8f3c1a2e-0000-4000-8000-000000000000", "rule_title": "Payroll" },
  "required_approvals": 1,
  "approvers": [
    { "user_id": 1042, "first_name": "Emma", "last_name": "Taylor" },
    { "user_id": 1057, "first_name": "James", "last_name": "Wilson" }
  ],
  "reason": null
}
```

```json 200 blocked theme={null}
{
  "allowed": false,
  "action": null,
  "rule": null,
  "required_approvals": 0,
  "approvers": [],
  "reason": "No spending rule allows this withdrawal."
}
```

## What the simulation doesn't check

The simulation checks spending rules only. It doesn't check your balance, fees, the address format or the withdrawal plan, so a withdrawal it says is allowed can still fail when you send it.

Results can also change before the real send, because rules, prices, signers or recent withdrawals may change.

> [!NOTE]
>
> * On MPC wallets, the named people give their approval by signing the transaction. There's no separate approval step.
> * Transfers within the same sub-account are never subject to spending rules.
> * HSM wallets have no spending rules.

## Errors

These return HTTP `400` with the standard error object.

| Error | When |
| - | - |
| `INVALID_PAYLOAD` | The body is missing, or `asset`, `destination_type` or `amount` is missing or invalid. |
| `UNSUPPORTED_DESTINATION_TYPE` | `destination_type` isn't one of the six values. |
| `INVALID_ASSET` | The asset isn't known. |

Authentication and scope errors are the same as for other endpoints. See [HTTP Status Codes](https://apidocs.finrock.io/reference/http-status-codes.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.