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

# Query with GraphQL

> Query Parsed Events with GraphQL, including typed transfer, summary, and instruction fields.

## Overview

The GraphQL interface exposes both Parsed Events methods: Parse Transactions through `transactions` and Parsed Transaction History through `transactionsByAddress`. It returns the same parsed transaction model as the [REST endpoints](/docs/parsed-events/quickstart#rest-reference), while letting clients select only the fields they need.

GraphQL includes `rawTransaction` only when the field is selected. Dynamic parser payloads remain JSON scalars, including decoded instruction `args`, transaction execution `error`, summary `parsedData`, and `rawTransaction`.

## Parse transactions

```graphql theme={"system"}
query ParseTransactions($signatures: [String!]!) {
  transactions(signatures: $signatures, commitment: CONFIRMED) {
    signature
    parserStatus
    parsed {
      slot
      blockTime
      fee
      feePayer
      transactionStatus
      nativeTransfers {
        fromUserAccount
        toUserAccount
        amount
      }
      tokenTransfers {
        fromUserAccount
        toUserAccount
        fromTokenAccount
        toTokenAccount
        rawTokenAmount
        decimals
        tokenStandard
        mint
      }
      summary {
        type
        description
        parsedData
      }
      instructions {
        topIxIdx
        innerIxIdx
        programId
        programName
        instructionName
        summary {
          type
          description
          parsedData
        }
        decoded {
          args
          accounts {
            name
            pubkey
            isSigner
            isWritable
          }
        }
      }
    }
    parserError {
      code
      message
    }
  }
}
```

Variables:

```json theme={"system"}
{
  "signatures": ["5xSKzM8bvpudE521jikHqASzMr23Ms4X4ieY3K8oFPFrJWCSSgYocJmHznrR8b12voDxKDH8ykdCLXSRrx6duVLH"]
}
```

## Parsed transaction history

```graphql theme={"system"}
query AddressHistory($address: String!) {
  transactionsByAddress(
    address: $address
    limit: 100
    sortOrder: DESC
    commitment: CONFIRMED
    filters: {
      slot: { gte: 300000000 }
    }
  ) {
    data {
      signature
      parserStatus
      parsed {
        slot
        blockTime
        nativeTransfers {
          fromUserAccount
          toUserAccount
          amount
        }
        tokenTransfers {
          fromUserAccount
          toUserAccount
          rawTokenAmount
          decimals
          mint
        }
      }
    }
    paginationToken
  }
}
```

Variables:

```json theme={"system"}
{
  "address": "GV6UUmNxz2RpKxmNAPadYKb7uQpszwqQAu3qLJxVdC52"
}
```

## Query arguments

### `transactions`

| Argument     | Type         | Default     | Description                      |
| ------------ | ------------ | ----------- | -------------------------------- |
| `signatures` | `[String!]!` | -           | Transaction signatures to parse. |
| `commitment` | `Commitment` | `CONFIRMED` | `CONFIRMED` or `FINALIZED`.      |

### `transactionsByAddress`

| Argument          | Type                             | Default     | Description                                                      |
| ----------------- | -------------------------------- | ----------- | ---------------------------------------------------------------- |
| `address`         | `String!`                        | -           | Address whose transaction history should be fetched.             |
| `limit`           | `Int`                            | `100`       | Number of transactions to return. Must be between `1` and `100`. |
| `beforeSignature` | `String`                         | -           | Return transactions before this signature.                       |
| `afterSignature`  | `String`                         | -           | Return transactions after this signature.                        |
| `paginationToken` | `String`                         | -           | Cursor with shape `slot:transactionIndex`.                       |
| `sortOrder`       | `SortOrder`                      | `DESC`      | `ASC` or `DESC`.                                                 |
| `commitment`      | `Commitment`                     | `CONFIRMED` | `CONFIRMED` or `FINALIZED`.                                      |
| `filters`         | `AddressTransactionFiltersInput` | -           | Optional `slot` and `time` bounds.                               |

## Raw transactions

Select `rawTransaction` to include the original transaction JSON:

```graphql theme={"system"}
query ParseWithRaw($signatures: [String!]!) {
  transactions(signatures: $signatures) {
    signature
    rawTransaction
    parsed {
      slot
    }
  }
}
```

If `rawTransaction` is not selected, the service does not include it in the response.
