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

# Self-Trade Prevention

> What happens when your trade encounters your own resting order.

Self-trade prevention controls what happens when an incoming trade reaches liquidity owned by the same trading account.

## Limit-order flows

For native orders and packed replacements, Kuru cancels the conflicting resting maker order and continues matching. It does not record a trade between the account and itself.

For example, if you already have a sell order open and submit a buy that reaches it, the resting sell is canceled before matching continues to other liquidity.

## Swaps

For an exact-input swap, encountering the same account's resting order reverts the transaction with a self-trade error. The swap does not cancel that order and continue.

If you use both quoting and swaps in one account, check for conflicting orders before swapping.

## Which identity matters?

The rule follows the trading account, not the wallet that submits the transaction. Two authorized bots trading for the same account can therefore encounter each other's orders.

See [Subaccounts](/accounts/subaccounts) for separating balances and trading activity, and [SDK Swaps](/sdk/swaps) for integration details.


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