A full perps round-trip — fund, open, monitor, close.
What You Can Do
Try it: What’s my perps balance?, Open a 10x long on BTC with 0.01 BTC, or Show my positions.
How Perps Work on D0
Account Structure
- Main Account — Where deposits land. Not used for trading directly.
- Sub-Account — Where your trading happens. Auto-created on your first order.
"Deposit 500 to perps and transfer to sub-account") or do it separately ("Transfer 200 to sub-account").
Supported Operations
Account Management:- Deposit USDT to main account
- Withdraw USDT from main account
- Transfer funds between main and sub-account
- Check balance (equity, available, margin used)
- Market orders (instant execution at current price)
- Limit orders (execute when price reaches your target)
- Reduce-only orders (close positions without opening new ones)
- Configurable leverage per order
- View open positions with real-time PnL
- List open orders
- View order history
- Check contract specifications (min quantity, max leverage)
Opening Your First Position
Here’s what the whole flow looks like from start to finish.Step 1 — Check the contract
Before you trade, check the contract details so you know the minimum size and max leverage.You: “Show BTCUSDT perps contract info” Bot: “BTCUSDT:Now you know the smallest position you can open is 0.001 BTC and you can use up to 150x leverage.
- Min quantity: 0.001 BTC
- Max leverage: 150x
- Tick size: 0.1
- Taker fee: 0.05%”
Step 2 — Fund your account
You need USDT in your sub-account to trade. Deposit from your wallet and transfer it over.You: “Deposit 500 to perps and transfer to sub-account” Bot: “Deposit complete: 500 USDT to main account. Transfer complete: 500 USDT to sub-account. Available balance: $500.”
Step 3 — Open a position
Tell your bot what you want to trade, the size, and the leverage.You: “Open a 10x long on BTC with 0.005 BTC” Bot: “Order placed! BTCUSDT BUY MARKET 0.005 @ 10x Entry: $98,450 Position value: $492.25 Margin required: $49.23”You’re now long 0.005 BTC with 10x leverage. Your position is worth $492.25, but you only put up $49.23 as margin. The rest is borrowed.
Step 4 — Check your position
Ask for your positions anytime to see how they’re doing.You: “Show my positions” Bot:
Step 5 — Close the position
When you’re ready to exit, tell your bot to close it.You: “Close my BTC position” Bot: “Position closed! SELL MARKET 0.005 BTCUSDT Exit: $98,900 Realized PnL: +$2.25”
Key Concepts
Symbol Format
Always useBTCUSDT, ETHUSDT, SOLUSDT format (base token + USDT). If you just say “BTC” your bot will ask you to clarify.
Leverage
Leverage is set per order, not per account. It defaults to 10x and you can dial it up to the asset’s cap. Your initial margin is just 1 / leverage, so 10x locks 10% of the notional, 50x locks 2%, and 150x locks about 0.67%. More leverage means a thinner buffer before liquidation. Start with 5x or less while learning. Initial margin defaults to 10% (10x), and you can dial leverage up to each asset’s cap. The maintenance margin rate (MMR) is tiered by asset, not a single number. A lower MMR is what lets an asset go to a higher max leverage. Margin and leverage by asset (Donut Perps):
These apply across the 0 to 100M USD notional range. IMR (initial margin rate) is 10% at the default 10x; your actual initial margin is 1 / your chosen leverage, so 150x is about 0.67% and 50x is 2%.
Caps and margin rates here were verified in July 2026 and can change. Your bot shows the live values in the contract info and order preview.
Margin
Margin is the collateral locked for your position. If your losses approach your margin, you risk liquidation. Always keep some buffer in your available balance.Margin Mode
Positions are isolated, with a separate margin balance per position. There is no cross-margin, so a loss on one position can’t pull down the collateral behind another.Minimum Order Size
The minimum order value on Donut Perps depends on the asset: 100 USDT for BTC, 20 USDT for ETH, BCH, LTC, and LINK, and 5 USDT for everything else.Reduce-Only
When closing a position, the bot uses reduce-only orders to prevent accidentally opening a new position in the opposite direction.Liquidation
Before you open, your bot shows the estimated liquidation price, the margin required, and the estimated fees. The higher your leverage, the closer the liquidation price sits to your entry, and your bot flags that.How it’s calculated
How it triggers
Your bot scans every position about every 3 seconds (safe positions are skipped quickly), recomputes the risk ratio, and acts on which band it lands in:- Below 85%: safe, keep holding.
- 85% to 100%: warning. Your bot alerts you. The alert only clears once you drop back below 70%, so it doesn’t flip on and off.
- 100% or above: liquidation. Your bot cancels the position’s take-profit and stop-loss, then closes the whole position in one reduce-only market order. There is no laddered reduction and no auto-deleveraging (ADL).
Insurance fund
If the liquidation price is better than the bankruptcy price and a little collateral is left over, that remainder moves into the contract’s insurance fund.- Each contract has its own insurance fund, created on the first liquidation with no pre-seeded balance.
- Leftover collateral from a liquidation goes into the fund (booked as liquidation income).
- If a position blows through its margin (bankruptcy), the shortfall is covered by the counterparty or market maker on the matching side; the fund handles the accounting.
- There is no socialized loss and no clawback. Someone else’s liquidation never touches your profits.
- The platform reconciles as a zero-sum book: all users’ PnL plus the insurance fund balance equals zero.
Take-Profit and Stop-Loss
A stop-loss is your most common protection: set a price, and when it’s hit your position closes automatically to cap the loss.
For the trigger price you can use last price (default), mark price (recommended, since it resists manipulation), or index price. If a stop doesn’t cover your whole position after you open or add to it, your bot warns you to top it up.
Donut Perps vs Hyperliquid
Both are perp venues and your bot picks between them automatically. Here’s how they differ.Tips for Trading Perps
- Check contract specs before trading. You need to know the minimum size and max leverage. If you try to open a position smaller than the minimum, the order will fail.
- Start with low leverage. 5x or less while you’re learning. High leverage can wipe you out fast if the market moves against you.
- Watch your margin usage. If your available balance is getting low relative to your margin used, you’re at risk of liquidation. Keep a buffer.
- Use limit orders for better entries. Market orders fill immediately at whatever price is available. Limit orders let you set your ideal entry and wait for the market to come to you.
- Check funding rates. Perps use funding to keep the perpetual price close to spot. If funding is high and positive, it’s expensive to hold longs. If high and negative, it’s expensive to hold shorts. You pay or receive funding every 8 hours depending on your position.
