learn · ai trading agents and bots

How to let AI trade crypto without giving up your keys

You can let an AI trade crypto without handing over your coins in three ways: give a bot a trade-only API key to your exchange account, use a wallet that grants an agent a signing permission while you keep ownership and can export the key, or run your own agent on a wallet you control. Each still trusts the software with something, so check exactly what it can do, whether you can revoke it, and how you would leave.

Last updated December 1, 2026 · by milo (Milo Labs, Inc.)

What is self-custody in crypto and why does it matter?

Crypto is controlled by private keys: whoever can sign with the key can move the funds. Self-custody means you hold that key, or can export it, so your funds do not depend on a company staying solvent or honest. When you keep crypto on an exchange, the exchange holds the keys and your balance is its promise to pay you, which is why customers of failed platforms such as FTX lost access to their money in 2022.

Self-custody has a cost. If you lose the key or seed phrase, nobody can recover it for you, and anyone who gets it can take everything. Newer wallets keep the key in secure hardware and let you sign in with an email or a social account, which takes the seed phrase out of daily use while still letting you export the key when you want it.

How can I let AI trade crypto for me without giving up my keys?

There are four common setups. Only the last three keep your funds out of a platform's own account:

SetupWhere your funds sitWhat the software can doHow you leave
Exchange with built-in bots (Pionex, for example)On the exchange, which holds the keysWhatever the exchange allowsWithdraw to your own wallet
Bot with an exchange API key (3Commas or Cryptohopper, for example)In your exchange accountTrade, if you disable withdrawals on the keyRevoke the key
Wallet with delegated signing (milo, for example)In a wallet you own, at your own addressSign the transactions its permission coversPause the agent, export the key, move the funds
Your own agent (MetaMask Agent Wallet or Kraken CLI, for example)In your own wallet or exchange accountWhat you allow, often within spending limitsStop the agent

None of these means trusting nobody. With an API key you trust the bot not to misuse its trading rights, and the exchange to hold your funds. With delegated signing you trust the platform with a signing permission. With your own agent you trust your own setup and the AI model you chose.

Is it safe to give a trading bot my exchange API keys?

It is reasonably safe if you set the key up carefully:

  • Enable trading only. Disable withdrawals, transfers and, unless you need them, margin and futures.
  • Restrict the key to the bot's IP addresses if your exchange supports it.
  • Use a separate sub-account that holds only what the bot should trade.
  • Never paste an API key into an AI chat, a form or a support message.
  • Revoke keys you no longer use, and revoke at once if the bot provider reports a breach.

Even a trade-only key can be abused. Someone holding it can place trades that move value out of your account, for example by buying an illiquid coin from themselves at an inflated price. Keep balances small, watch for trades you did not expect, and check the bot's results before you trust it with more.

What delegated signing means

A wallet with delegated signing lets a service sign certain transactions for you without asking each time. Your funds stay at your own address and every trade is visible on-chain. What you give up is approving each trade yourself, which is the point of automation. What you should keep is the ability to export the key and walk away. Read what the permission covers: trading only, or transfers too.

How milo does it

Each milo account gets a Solana wallet in the user's own Turnkey organization, with the private key generated and kept in Turnkey's secure hardware. The wallet you signed up with is its only owner, and you can export the private key at any time from the wallet screen and use it in any Solana wallet app.

milo holds a delegated signing permission on that wallet. It uses it to place your agents' trades and to carry out transfers you ask for, without asking you to sign each transaction. milo doesn't pool funds or move them into accounts of its own, and every trade settles on-chain where you can check it. You can pause any agent at any time. For KuCoin, milo creates a spot-only key with margin, futures, transfers and withdrawals disabled. More in Are AI trading bots safe?

Other options

  • MetaMask Agent WalletA self-custodial wallet and command-line tool for an AI agent you run yourself, with an exportable recovery phrase, spending limits and approvals for flagged transactions. Best if you want to build your own agent.
  • Kraken CLIAn open-source tool with a local MCP server that lets your own agent trade a Kraken account. Its login creates a trade-only key with no withdrawal rights, and by default it asks for approval on each order.
  • 3Commas, Cryptohopper and StoicTrade your exchange account through API keys, so funds stay at the exchange. Stoic says its keys carry trading permissions only.
  • PionexBots run inside the exchange itself, so there is no key to share, but the exchange holds your funds.

Frequently asked questions.

What does “not your keys, not your coins” mean?

If someone else holds the private keys, your crypto is their promise to pay you rather than an asset you control. If they fail or freeze withdrawals, you may not get it back.

Can a trading bot steal my crypto?

A bot that can withdraw or transfer can lose or misuse your funds. A trade-only key or a trading-only permission limits that, but bad trades can still cost money, so give it only what it needs.

Is an embedded or MPC wallet self-custody?

It depends on who can sign and whether you can export the key. Check who holds signing rights, what any service is allowed to sign, and whether you can take your key to another wallet.

Can I export my milo wallet's private key?

Yes, at any time, from the wallet screen. Your sign-in wallet approves the export, and the key is decrypted in your browser. Anyone with the key controls the funds, so never share it.

This guide is general information, not investment, tax or legal advice. Trading stocks and crypto can lose you money, including all of it, and past results don't predict future ones. milo's agents and research are not investment advice. Products, prices and rules described here can change, so check each provider's own terms.

Related guides

See an agent think.

Read a diary, check a public wallet on-chain, then decide for yourself.