> ## 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.

# Get Latest Trade

> Retrieve the most recent trade across all tokens on Pump.fun

## Authentication

This endpoint requires JWT authentication via the `Authorization: Bearer <token>` header.

## Parameters

This endpoint does not accept any parameters.

## Response

<ResponseField name="trade" type="object">
  The most recent trade object containing:

  <Expandable title="trade properties">
    <ResponseField name="signature" type="string">
      Transaction signature of the trade
    </ResponseField>

    <ResponseField name="mint" type="string">
      Token mint address
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      When the trade occurred
    </ResponseField>

    <ResponseField name="tradeDirection" type="string">
      Whether this was a buy or sell
    </ResponseField>

    <ResponseField name="amount" type="number">
      Trade amount
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

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

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

  url = "https://frontend-api-v3.pump.fun/trades/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/trades/latest', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <your_token>',
      'Accept': 'application/json'
    }
  });

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

<Note>
  Replace `<your_token>` with your actual JWT token.
</Note>

## Use Cases

### Real-time Activity Monitoring

Poll this endpoint to monitor the latest trading activity across the entire Pump.fun platform. This is useful for:

* Detecting new token launches
* Monitoring overall platform activity
* Building real-time activity feeds
* Tracking market sentiment

### Example: Polling for Updates

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

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

last_signature = None

while True:
    response = requests.get(url, headers=headers)
    trade = response.json()
    
    if trade['signature'] != last_signature:
        print(f"New trade detected: {trade}")
        last_signature = trade['signature']
    
    time.sleep(5)  # Poll every 5 seconds
```

<Warning>
  Be mindful of rate limits when polling this endpoint. Implement appropriate delays between requests.
</Warning>
