# Getting Started

***

### Overview

Perpetual futures let you go long or short on crypto assets with leverage, without owning the underlying token. Unlike spot trading where you buy and hold tokens directly, perps are synthetic contracts that track an asset's price. You can profit from price drops, amplify gains with leverage, and trade assets across chains without bridging.

**Boba Agents trade perps exclusively on Hyperliquid**, a fully on-chain order book DEX with CEX-level speed and liquidity. Your agent wallet handles all interactions with Hyperliquid automatically.

**What you can do with Perpetuals:**

* Go long (bet price goes up) or short (bet price goes down)
* Use up to 50x leverage to amplify positions
* Trade 100+ assets including BTC, ETH, SOL, and altcoins
* Set stop-losses and take-profits for automatic risk management
* Place limit, stop, and conditional orders
* Monitor funding rates for carry trade opportunities

***

### How It Works

#### Account Provisioning

Your Hyperliquid account is automatically. No separate signup or API keys needed.

#### Agent Wallet

Your agent wallet manages everything on Hyperliquid:

* **Deposits**: Funds from your agent wallet are used as margin
* **Margin**: Collateral is held in USDC on Hyperliquid
* **Settlement**: All PnL is settled in USDC
* **Withdrawals**: Funds return to your agent wallet when you close positions

#### Perps vs Spot

| Feature    | Spot Trading           | Perpetual Trading         |
| ---------- | ---------------------- | ------------------------- |
| Direction  | Buy only (long)        | Long or short             |
| Leverage   | 1x (no leverage)       | Up to 50x                 |
| Chains     | Solana, Base, ETH, Arb | Hyperliquid (any asset)   |
| Settlement | Token received         | USDC PnL                  |
| Funding    | None                   | Periodic funding payments |
| Expiry     | None                   | None (perpetual)          |

***

### Key Concepts

#### Leverage

Leverage amplifies your exposure. With 10x leverage, a $100 margin controls a $1,000 position:

| Leverage | Margin Required | Position Size | 10% Price Move          |
| -------- | --------------- | ------------- | ----------------------- |
| 1x       | $1,000          | $1,000        | ±$100                   |
| 5x       | $200            | $1,000        | ±$100 (±50% on margin)  |
| 10x      | $100            | $1,000        | ±$100 (±100% on margin) |
| 20x      | $50             | $1,000        | ±$100 (±200% on margin) |

{% hint style="warning" %}
Higher leverage means higher liquidation risk. A 10x long gets liquidated at roughly a 10% price drop.
{% endhint %}

#### Margin Modes

| Mode                       | Behavior                                                   | Best For                                      |
| -------------------------- | ---------------------------------------------------------- | --------------------------------------------- |
| **Cross Margin** (default) | All positions share your account balance as collateral     | Most traders, positions support each other    |
| **Isolated Margin**        | Each position has its own collateral, isolated from others | Risk management, limits max loss per position |

#### Funding Rate

Perpetual contracts use funding rates to keep the contract price close to the spot price:

* **Positive funding** → Longs pay shorts (market is bullish)
* **Negative funding** → Shorts pay longs (market is bearish)
* Funding is exchanged between traders periodically
* You can earn funding by taking the opposite side of a crowded trade

#### Liquidation

If your position's losses approach your margin, Hyperliquid will liquidate (force close) your position to prevent negative balance:

* **Cross margin**: Liquidation considers your total account balance
* **Isolated margin**: Liquidation only uses the margin assigned to that position
* Always use stop-losses to exit before liquidation

***

### Quick Start Examples

#### Your First Long

| Prompt                                    | Interpretation                                              |
| ----------------------------------------- | ----------------------------------------------------------- |
| "Long $100 of BTC"                        | Opens a $100 long on BTC at market price, default leverage  |
| "Buy $500 of ETH perps with 5x leverage"  | Opens a 5x leveraged ETH long, $500 notional on $100 margin |
| "Go long SOL at $150 with a stop at $140" | Limit long at $150 with automatic stop-loss at $140         |

#### Your First Short

| Prompt                               | Interpretation                               |
| ------------------------------------ | -------------------------------------------- |
| "Short $200 of ETH"                  | Opens a $200 short on ETH at market price    |
| "Short BTC with 10x leverage, $1000" | 10x short, $1000 notional on $100 margin     |
| "Short SOL at $160 with TP at $140"  | Limit short at $160 with take-profit at $140 |

#### Check Your Positions

| Prompt                         | Interpretation                                            |
| ------------------------------ | --------------------------------------------------------- |
| "Show my perp positions"       | View all open positions with unrealized PnL               |
| "How's my BTC position doing?" | Check specific position with entry price, mark price, PnL |
| "Close my ETH short"           | Close a specific position at market                       |
| "Close all positions"          | Close everything at market                                |

***

### Amount Specification

All perp orders are placed in **USD by default**. With leverage, the margin required is `amount / leverage`:

| Amount | Leverage | Notional | Margin Used |
| ------ | -------- | -------- | ----------- |
| $1,000 | 1x       | $1,000   | $1,000      |
| $1,000 | 10x      | $1,000   | $100        |
| $5,000 | 20x      | $5,000   | $250        |

***
