> ## Documentation Index
> Fetch the complete documentation index at: https://httpscashapplaunchbitcoinzann69yc4dfud2ascom.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart Guide for the Coinbase Advanced Trade API

> Make your first Coinbase Advanced Trade API call in minutes. Fetch your account balances, list products, and place your first test order step by step.

This quickstart walks you through everything you need to make your first successful call to the Coinbase Advanced Trade API — from creating credentials and installing a client library, to fetching live account data and browsing the product catalog. By the end you will have a working local setup ready to explore the full API.

**1. Get API credentials**

Before you can make any API calls, you need an API key and private key from Coinbase.

1. Sign in to your Coinbase account.
2. Go to **Settings → API → Create API Key**.
3. Give the key a name, select the **View** scope (sufficient for this quickstart), and click **Create**.
4. Copy your **API key name** and download your **private key** (PEM file). Store them somewhere safe — you will not be able to retrieve the private key again.

For full details on JWT generation and header formatting, see the [Authentication guide](https://httpscashapplaunchbitcoinzann69yc4dfud2ascom.mintlify.site/authentication.md).

**2. Install the SDK or use curl**

You can interact with the API using the official Coinbase SDK or plain HTTP with `curl`. Choose the option that fits your workflow.

```bash curl theme={null}
# No installation required — curl is available on most systems.
# Export your credentials as environment variables for use in later steps.
export API_KEY_NAME="organizations/{org_id}/apiKeys/{key_id}"
export PRIVATE_KEY_PEM="$(cat /path/to/your/private-key.pem)"
```

```bash Python theme={null}
pip install coinbase-advanced-py
```

```bash Node.js theme={null}
npm install @coinbase/coinbase-advanced-sdk
```

> [!TIP]
>
> The official SDKs handle JWT signing automatically on every request, so you do not need to implement token generation yourself. If you are using `curl`, you must generate and refresh a JWT manually before each call (tokens expire after 120 seconds).

**3. Fetch your accounts**

Send a `GET` request to `/api/v3/brokerage/accounts` to retrieve all brokerage accounts linked to your Coinbase profile, along with their available balances.

```bash curl theme={null}
curl -H "Authorization: Bearer $JWT" \
  'https://api.coinbase.com/api/v3/brokerage/accounts'
```

```python Python theme={null}
from coinbase.rest import RESTClient

client = RESTClient(
    api_key="organizations/{org_id}/apiKeys/{key_id}",
    api_secret=open("/path/to/private-key.pem").read()
)

response = client.get_accounts()
for account in response["accounts"]:
    print(account["name"], account["available_balance"])
```

```javascript Node.js theme={null}
import { RESTClient } from "@coinbase/coinbase-advanced-sdk";
import { readFileSync } from "fs";

const client = new RESTClient({
  apiKey: "organizations/{org_id}/apiKeys/{key_id}",
  apiSecret: readFileSync("/path/to/private-key.pem", "utf8"),
});

const response = await client.getAccounts();
response.accounts.forEach((account) => {
  console.log(account.name, account.available_balance);
});
```

A successful response returns an array of account objects. Here is an example with two accounts:

```json theme={null}
{
  "accounts": [
    {
      "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "BTC Wallet",
      "currency": "BTC",
      "available_balance": {
        "value": "0.05123400",
        "currency": "BTC"
      },
      "default": false,
      "active": true,
      "type": "ACCOUNT_TYPE_CRYPTO"
    },
    {
      "uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "USD Wallet",
      "currency": "USD",
      "available_balance": {
        "value": "1250.00",
        "currency": "USD"
      },
      "default": true,
      "active": true,
      "type": "ACCOUNT_TYPE_FIAT"
    }
  ],
  "has_next": false,
  "cursor": "",
  "size": 2
}
```

Each account includes a `uuid` (used in other API calls), a human-readable `name`, the `currency` it holds, and an `available_balance` showing funds not currently locked in open orders.

**4. List available products**

Send a `GET` request to `/api/v3/brokerage/products` to retrieve the full catalog of tradable markets. You can filter by `product_type` or `contract_expiry_type` using query parameters.

```bash curl theme={null}
curl -H "Authorization: Bearer $JWT" \
  'https://api.coinbase.com/api/v3/brokerage/products?limit=5'
```

```python Python theme={null}
response = client.get_products(limit=5)
for product in response["products"]:
    print(product["product_id"], product["status"])
```

```javascript Node.js theme={null}
const response = await client.getProducts({ limit: 5 });
response.products.forEach((product) => {
  console.log(product.product_id, product.status);
});
```

The response includes each product's ID, current status, quote and base currencies, and precision rules for order sizing:

```json theme={null}
{
  "products": [
    {
      "product_id": "BTC-USD",
      "price": "62345.67",
      "price_percentage_change_24h": "1.23",
      "volume_24h": "12048.91",
      "status": "online",
      "base_currency_id": "BTC",
      "quote_currency_id": "USD",
      "base_min_size": "0.000016",
      "base_max_size": "1500",
      "base_increment": "0.00000001",
      "quote_increment": "0.01",
      "trading_disabled": false
    }
  ],
  "num_products": 1
}
```

Use `product_id` values (such as `"BTC-USD"`) when placing orders or subscribing to market data channels.

**5. Next steps**

You have successfully authenticated, fetched your account balances, and explored the product catalog. You are ready to go deeper.

> [card] [Place an Order](https://httpscashapplaunchbitcoinzann69yc4dfud2ascom.mintlify.site/guides/place-order.md)
>
> Learn how to place market and limit orders, handle order confirmation responses, and track order status.

> [card] [API Reference](https://httpscashapplaunchbitcoinzann69yc4dfud2ascom.mintlify.site/api/accounts/list-accounts.md)
>
> Explore the complete endpoint reference for accounts, orders, products, portfolios, and more.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.