# Account Setup

This guide covers how to set up an account for trading via the API.

## Overview

To trade via the API you need a **delegate key** — a separate keypair authorized to trade on your behalf, managed from
the webapp. Delegate keys are revocable and cannot withdraw funds, making them the secure choice for API trading.

## 1. Create an account

Sign in at [app.bullet.xyz](https://app.bullet.xyz) (or
[app.testnet.bullet.xyz](https://app.testnet.bullet.xyz) for testnet) with your wallet. This creates an embedded
wallet that serves as your trading account on Bullet. On testnet, funds are airdropped automatically on signup.

For detailed instructions (including Ledger and cold wallet support), see the
[full account setup guide](https://docs.bullet.xyz/bulletx-exchange/how-to-guide/bullet-account-setup).

## 2. Deposit funds

Deposit collateral through the webapp UI.

## 3. Set up a delegate key

Generate an ed25519 keypair locally and register it as a delegate — see
[Delegate Accounts](./delegate-accounts.md) for the full setup. The delegate key can place orders on your behalf, but cannot deposit or withdraw. You can revoke it at any time from the webapp.

## 4. Start trading

With a signing key in hand, you can build and submit transactions. See [Transaction Signing](./tx-signing.md) for
the full signing flow.

Query your account state at any time — no authentication needed for read endpoints:

```
GET /fapi/v3/account?address=<your_main_address>
```

> **Note:** When using a delegate key, use your **main account's** address (not the delegate's) for all read
> endpoints. Balances, positions, and orders live on the main account — the delegate key is only used for signing
> transactions.

Trades made via the API with a delegate key are visible in the webapp UI.
