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

# List Activities

> Get the activity history for a sub-account

# List Activities

Returns the activity history for a sub-account. Activities represent on-chain
operations like supplies, withdrawals, and transfers. See
[Activities & Events](/concepts/activities-events) for the full activity definition.

## Request

```
GET /accounts/:account_id/activities
```

### Path parameters

| Parameter    | Type   | Description        |
| ------------ | ------ | ------------------ |
| `account_id` | string | The sub-account ID |

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://prime-api.legend.xyz/accounts/acc_2o0yiljtp378/activities \
    -H "Authorization: Bearer $LEGEND_QUERY_KEY"
  ```

  ```typescript TypeScript theme={null}
  const { activities } = await client.accounts.activities("acc_2o0yiljtp378");
  ```

  ```python Python theme={null}
  result = await client.accounts.activities("acc_2o0yiljtp378")
  activities = result["activities"]
  ```

  ```rust Rust theme={null}
  let activities = client.accounts.activities("acc_2o0yiljtp378").await?;
  ```
</CodeGroup>

```json Response theme={null}
{
  "activities": [
    {
      "id": 1,
      "status": "completed",
      "quark_intent": {
        "id": 7,
        "mercator_version": "1.2.0",
        "intent_type": "supply",
        "intent": {
          "amount": "1000000",
          "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "comet": "0xb125E6687d4313864e53df431d5425969c15Eb2F",
          "chain_id": 8453
        }
      },
      "executions": [
        {
          "execution_type": "transaction",
          "chain_id": 8453,
          "transaction_hash": "0xabc123...def456",
          "status": "executed",
          "executed_at": "2025-06-15T10:30:15Z",
          "reverted_at": null,
          "actions": [
            {
              "action_type": "COMET_SUPPLY",
              "expected_values": {
                "amount": 1000000,
                "asset_symbol": "USDC",
                "chain_id": 8453,
                "comet": "0xb125E6687d4313864e53df431d5425969c15Eb2F",
                "price": "0.9998",
                "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
              },
              "observed_values": {
                "amount": 1000000,
                "asset_symbol": "USDC",
                "chain_id": 8453,
                "comet": "0xb125E6687d4313864e53df431d5425969c15Eb2F",
                "price": "0.9998",
                "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
              }
            }
          ]
        }
      ]
    }
  ]
}
```

### Response fields

| Field                       | Type    | Description                                                    |
| --------------------------- | ------- | -------------------------------------------------------------- |
| `activities`                | array   | List of activity objects, newest first                         |
| `activities[].id`           | integer | Activity ID                                                    |
| `activities[].status`       | string  | Status: `"pending"`, `"completed"`, `"failed"`                 |
| `activities[].quark_intent` | object? | The original intent that created this activity (if applicable) |
| `activities[].executions`   | array   | List of on-chain executions that make up the activity          |

## Errors

| Status | Code                | Description           |
| ------ | ------------------- | --------------------- |
| 404    | `account_not_found` | Account doesn't exist |
