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

# Quickstart

> Make your first Pump.fun API call in minutes. Learn how to authenticate and start retrieving data from the platform.

# Get started with Pump.fun API

This guide will help you make your first API call to Pump.fun. You'll learn how to authenticate and retrieve data from the platform.

## Prerequisites

Before you begin, ensure you have:

* A JWT token for authentication (see [Authentication](/authentication) for details)
* A tool to make HTTP requests (cURL, Postman, or a programming language)

## Authentication setup

Most Pump.fun API endpoints require JWT authentication. Include your token in the `Authorization` header with every request.

<Note>
  It's recommended to include authentication with all requests to ensure complete data retrieval and avoid potential access issues.
</Note>

### Required headers

Include these headers with your API requests:

| Header          | Value                       | Required              |
| --------------- | --------------------------- | --------------------- |
| `Authorization` | `Bearer <JWT>`              | Yes                   |
| `Accept`        | `application/json` or `*/*` | Yes                   |
| `Origin`        | `https://pump.fun`          | Yes                   |
| `Content-Type`  | `application/json`          | For POST/PUT requests |

## Your first API call

Let's retrieve the latest coin created on Pump.fun using the Frontend API v3.

<Steps>
  <Step title="Choose your endpoint">
    We'll use the `GET /coins/latest` endpoint to retrieve the most recently created token.

    **Endpoint:** `https://frontend-api-v3.pump.fun/coins/latest`
  </Step>

  <Step title="Make the request">
    Execute the API call with your authentication token:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET "https://frontend-api-v3.pump.fun/coins/latest" \
        -H "Authorization: Bearer <your_token>" \
        -H "Accept: application/json"
      ```

      ```python Python theme={null}
      import requests

      url = "https://frontend-api-v3.pump.fun/coins/latest"
      headers = {
          "Authorization": "Bearer <your_token>",
          "Accept": "application/json"
      }

      response = requests.get(url, headers=headers)
      print(response.json())
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch('https://frontend-api-v3.pump.fun/coins/latest', {
        method: 'GET',
        headers: {
          'Authorization': 'Bearer <your_token>',
          'Accept': 'application/json'
        }
      });

      const data = await response.json();
      console.log(data);
      ```
    </CodeGroup>

    <Warning>
      Replace `<your_token>` with your actual JWT token before making the request.
    </Warning>
  </Step>

  <Step title="Handle the response">
    A successful request returns a `200 OK` status with the latest coin data.
  </Step>
</Steps>

## More examples

Here are additional common API calls to get you started:

### Get SOL price

Retrieve the current Solana price:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://frontend-api-v3.pump.fun/sol-price" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import requests

  url = "https://frontend-api-v3.pump.fun/sol-price"
  headers = {
      "Authorization": "Bearer <your_token>",
      "Accept": "application/json"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```
</CodeGroup>

### Get coin details

Retrieve information about a specific token by its mint address:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://frontend-api-v3.pump.fun/coins/{mint}?sync=true" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import requests

  mint_address = "your_mint_address_here"
  url = f"https://frontend-api-v3.pump.fun/coins/{mint_address}?sync=true"
  headers = {
      "Authorization": "Bearer <your_token>",
      "Accept": "application/json"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```
</CodeGroup>

### Get trade history

Retrieve all trades for a specific token:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://frontend-api-v3.pump.fun/trades/all/{mint}?limit=50&offset=0&minimumSize=0" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import requests

  mint_address = "your_mint_address_here"
  url = f"https://frontend-api-v3.pump.fun/trades/all/{mint_address}"
  params = {
      "limit": 50,
      "offset": 0,
      "minimumSize": 0
  }
  headers = {
      "Authorization": "Bearer <your_token>",
      "Accept": "application/json"
  }

  response = requests.get(url, headers=headers, params=params)
  print(response.json())
  ```
</CodeGroup>

### Get graduated coins (Advanced Analytics API)

Retrieve coins that have graduated to Raydium:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://advanced-api-v2.pump.fun/coins/graduated" \
    -H "Authorization: Bearer <your_token>" \
    -H "Accept: application/json"
  ```

  ```python Python theme={null}
  import requests

  url = "https://advanced-api-v2.pump.fun/coins/graduated"
  headers = {
      "Authorization": "Bearer <your_token>",
      "Accept": "application/json"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```
</CodeGroup>

## Error handling

Handle common HTTP status codes in your application:

* `200 OK` - Request successful
* `201 Created` - Resource created successfully
* `304 Not Modified` - Content unchanged (when using ETag caching)
* `400 Bad Request` - Invalid request parameters
* `401 Unauthorized` - Authentication required or token invalid
* `403 Forbidden` - Access denied to resource
* `404 Not Found` - Resource not found
* `429 Too Many Requests` - Rate limit exceeded

<Tip>
  Check response headers for rate limit information:

  * `x-ratelimit-limit` - Total request limit
  * `x-ratelimit-remaining` - Remaining requests
  * `x-ratelimit-reset` - Timestamp when limit resets
</Tip>

## Optimize with caching

Many endpoints support ETag caching to reduce bandwidth and improve performance:

1. Make your first request and save the `ETag` value from the response headers
2. Include `If-None-Match: W/"etag-value"` in subsequent requests
3. If content hasn't changed, you'll receive a `304 Not Modified` response

```bash theme={null}
# First request - save ETag from response
curl -i -X GET "https://frontend-api-v3.pump.fun/coins/latest" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json"

# Subsequent request with ETag
curl -X GET "https://frontend-api-v3.pump.fun/coins/latest" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json" \
  -H 'If-None-Match: W/"etag-value"'
```

## Next steps

<CardGroup cols={2}>
  <Card title="Coins API" icon="coins" href="/api-reference/coins/overview">
    Create and manage tokens on Pump.fun
  </Card>

  <Card title="API versions" icon="code-branch" href="/api-versions">
    Learn about different API versions and their differences
  </Card>

  <Card title="Authentication" icon="key" href="/essentials/authentication">
    Deep dive into authentication methods
  </Card>

  <Card title="Rate limits" icon="gauge-high" href="/essentials/rate-limiting">
    Understand rate limiting and best practices
  </Card>
</CardGroup>
