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

# Auto Sweep Funds

Auto Sweep allows Wallet-as-a-Service sub-wallet balances to be automatically consolidated into the Prime Wallet whenever deposits are received.

This helps centralize liquidity management and reduce the need for manual treasury operations across sub-wallets.

<Note>
  Collection rules configured per **coin/token** are automatically applied across all supported blockchain networks for that asset.
</Note>

### Configure Collection Rule

To enable automatic sweeping:

1. Navigate to:\
   **Wallet-as-a-Service → Automation**
2. Create a collection rule for the target coin/token
3. Configure the rule:
   * `Source Wallets` → `Sub-wallets` (`default`)
   * `Destination Wallet` → `Prime Wallet` (`default`)
   * `Sweep Frequency` → `Real Time`
4. Save the rule

<Frame>
  <img src="https://mintcdn.com/openxswitch/d2Outoi8cJiRDm9a/images/Auto-Collection-rule---wallet-as-a-service.png?fit=max&auto=format&n=d2Outoi8cJiRDm9a&q=85&s=2187b81af0a400a8cc82c205f8738f80" alt="Auto Collection Rule Wallet As A Service" width="2878" height="1574" data-path="images/Auto-Collection-rule---wallet-as-a-service.png" />
</Frame>

[Learn more about Collection and Auto Sweep Rules.](/platform/auto-collection-and-sweep-rule)

### How It Works

Whenever a deposit is received into an eligible sub-wallet:

1. The deposit is detected
2. The wallet balance is queued for sweep
3. Funds are automatically transferred to the Prime Wallet based on the configured rule

### Important Notes

<Info>
  Auto collection rules currently support only `Real Time` execution.
</Info>

If no matching collection rule exists for the deposited:

* coin/token

the balance will not be swept automatically and must be transferred manually.

### Manual Sweep via API

You can also manually sweep funds from sub-wallets to the Prime Wallet through the API.

### Endpoint

`POST`[/sub-wallet/transfer/prime](https://docs.openxswitch.com/api-reference/sub-wallet-endpoints/transfer-from-sub-wallets-to-prime-wallet)

This endpoint allows manual consolidation of balances when automatic sweep rules are not configured or when manual treasury control is preferred.
