> For the complete documentation index, see [llms.txt](https://docs.aftermath.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aftermath.finance/perpetuals/architecture/account/one-click-trading.md). Agents can also search and read this documentation through its [MCP server](https://docs.aftermath.finance/~gitbook/mcp).

# 1-Click Trading

Trade Perpetuals without confirming every order in your wallet

1-Click Trading lets you trade Perpetuals without confirming every order in your wallet. The app creates a trading key and saves it in this browser. Your wallet gives that key agent permission on your Perpetuals accounts and access to your Gas Credit. After that, the trading key signs your orders and the app submits them without a wallet prompt.

The trading key is an [agent wallet](https://docs.aftermath.finance/perpetuals/architecture/account/agent-wallets.md). It has the same permissions as any other agent wallet.

## Turning it on

1. Open Settings from the gear icon in the menu bar and select the **Trading** tab.
2. Turn on **1-Click Trading**.
3. Confirm the setup transaction in your wallet.

<figure><img src="https://3284144787-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmeKfXaQnIP3bbI1AdlVX%2Fuploads%2Fgit-blob-3d042d296b5cdd345b0305f8ee3f93a72ddd3c54%2Fone-click-trading-setting.png?alt=media" alt="" width="375"><figcaption><p>1-Click Trading in Settings</p></figcaption></figure>

The setup transaction does what is missing, in one signature:

* Creates your [Gas Credit](https://docs.aftermath.finance/getting-started/dynamic-gas.md#gas-credit) if you have none.
* Gives the trading key access to your Gas Credit.
* Grants the trading key agent permission on each Perpetuals account your wallet administers, and on each vault you own.

The switch is available once your wallet has a Perpetuals account or owns a vault. It stays off and locked when no wallet is connected and in read-only mode.

Creating an account or depositing in the app can also set up the trading key in the same transaction. 1-Click Trading then turns on unless you turned it off before.

When 1-Click Trading is on, the order notification reads "Signing with one-click trading" instead of asking you to confirm in your wallet.

## What the trading key can and can't do

The trading key can:

* Place and cancel orders, including stop and TWAP orders.
* Close and reverse positions, change leverage, and add or remove margin on positions.
* Pay transaction fees from your Gas Credit.

The trading key can't:

* Withdraw collateral from your account. Only the account admin, your wallet, can withdraw.
* Grant or revoke agent wallets.
* Remove builder code approvals.

Withdrawals still need your wallet. Trades signed by the trading key can still gain or lose money like any other trade.

Trades signed by the trading key always pay gas from Gas Credit. Keep your Gas Credit funded. If it runs too low, the app shows "One-Click Trading gas sponsorship is unavailable. Restore access and try again."

## Security

The trading key is saved in this browser only. It is not saved to your account or synced to other devices.

**Turning it off:** turn off **1-Click Trading** in Settings. Orders then need your wallet again. Turning it off does not delete the key or remove its permissions.

**Disconnecting:** disconnecting your wallet deletes the trading key from this browser. Its permissions stay onchain.

**Revoking:** to remove the key's permissions, revoke its address on the [Agent Wallets](https://docs.aftermath.finance/perpetuals/architecture/account/agent-wallets.md#in-the-app) page and in the **Access** tab of the [Gas Credit](https://docs.aftermath.finance/getting-started/dynamic-gas.md#gas-credit) panel. The key is listed there by its address. Each revoke is a transaction signed by your wallet.

**Shared devices:** on a shared or public computer, leave 1-Click Trading off. If you used it, disconnect your wallet when you finish and revoke the key's address.

## Other browsers and devices

Each browser has its own trading key. Turning on 1-Click Trading in a new browser, or after clearing browser data, creates a new key and asks you to sign a new setup transaction. The old key keeps its permissions until you revoke it. An address you don't recognize in Agent Wallets or Gas Credit Access may be a trading key from another browser or device.

## Restoring access

If the trading key is missing from this browser or lacks a permission, for example after you open a new account, the app shows **Restore One-Click Trading Access**. Choose **Restore Access** and sign one transaction, or choose **Disable 1CT**. Settings shows a **Restore** button for the same fix. Until access is restored, orders are signed in your wallet.

## How it relates to other features

**Agent Wallets:** 1-Click Trading uses the same agent permission. Use [Agent Wallets](https://docs.aftermath.finance/perpetuals/architecture/account/agent-wallets.md) to give a wallet you control, such as a bot, trading access. When you grant an agent wallet there, the **Also pay gas from my Gas Credit** option gives it Gas Credit access, as 1-Click Trading does for its key.

**Gas Credit:** 1-Click Trading always uses [Gas Credit](https://docs.aftermath.finance/getting-started/dynamic-gas.md#gas-credit) for gas. For bots that sponsor gas through the API, see [Gasless Trading (GasPool)](https://docs.aftermath.finance/perpetuals/architecture/account/gasless-trading.md).

**Wallet auto confirmation:** some wallets can approve transactions without a prompt. That is a wallet setting and applies to any app. 1-Click Trading is built into Aftermath Perpetuals and does not depend on a wallet setting. See [Auto Confirmation](https://docs.aftermath.finance/getting-started/auto-confirmation.md).
