# getTransactionsForAddress

> Returns transactions that touched a given address, newest first by default, from long-term storage.

Source: https://docs.constant-k.com/rpc/http/gettransactionsforaddress/

`getTransactionsForAddress` returns transactions that touched an address, answered from long-term storage. The region's ledger does not serve this method; it is Nexus only.

Responses page with `paginationToken`: pass the token from the previous response on the next call, and stop when it comes back `null`. Each token is scoped to the same query. Batch requests are not supported.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Transactions
- Availability: Nexus only
- Rate limits: Free not available · Operator not available · Blade Runner not available · Nexus 30/s (signatures), 5/s (full)

## Historical lookups

| Plan | Available | Rate per key |
| :-- | :-: | :-: |
| Free | — | — |
| Operator | — | — |
| Blade Runner | — | — |
| Nexus | ✓ | 30/s (signatures), 5/s (full) |

Answers come from long-term storage within the shared limit 20/s, 1,000,000 per month (per region, all keys), with a longest wait of 5 s. Over the rate, HTTP `429` with code `-32005` and a `Retry-After: 1` header; over the monthly allowance, HTTP `429` with code `-32005`; when the retrieval is unavailable, HTTP `503` with code `-32000`. See [Historical lookups](/get-started/plans-and-limits/#historical-lookups).


## Parameters

`params` is a positional JSON array, in this order:

- `address` (string, required): Account address to search transaction history for, base-58 encoded.
- `options` (object, optional): Optional configuration.
  - `transactionDetails` (string, optional, one of `signatures`, `full`, default `"signatures"`): "signatures" returns signature-level records only. "full" returns each transaction with its metadata. "full" caps `limit` at 100.
  - `sortOrder` (string, optional, one of `desc`, `asc`, default `"desc"`): Sort order of the returned transactions.
  - `limit` (integer, optional, default `1000`, min 1, max 1000): Maximum transactions per response. At most 1,000 with `transactionDetails: "signatures"` (the default), at most 100 with `"full"` (the default there).
  - `paginationToken` (string, optional): The previous response's `paginationToken`, a `"slot:position"` string, to continue where it stopped. Scoped to the same query.
  - `commitment` (string, optional, one of `finalized`, `confirmed`, default `"finalized"`): Bank state to search from. `processed` is not accepted here.
  - `minContextSlot` (integer, optional): Minimum slot the region must have processed before answering.
  - `encoding` (string, optional, one of `json`, `jsonParsed`, `base58`, `base64`, default `"json"`): Encoding for the `transaction` field. Available with `transactionDetails: "full"` only.
  - `maxSupportedTransactionVersion` (integer, optional, min 0, max 1): Highest transaction version the caller can decode. Available with `transactionDetails: "full"` only.
  - `filters` (object, optional): Restrict the search range and the transactions returned.
    - `slot` (object, optional): Slot range bounds.
      - `gte` (integer, optional)
      - `gt` (integer, optional)
      - `lte` (integer, optional)
      - `lt` (integer, optional)
    - `blockTime` (object, optional): Block time range bounds, as Unix seconds.
      - `gte` (integer, optional)
      - `gt` (integer, optional)
      - `lte` (integer, optional)
      - `lt` (integer, optional)
      - `eq` (integer, optional)
    - `signature` (object, optional): Signature range bounds, as base-58 strings.
      - `gte` (string, optional)
      - `gt` (string, optional)
      - `lte` (string, optional)
      - `lt` (string, optional)
    - `status` (string, optional, one of `any`, `succeeded`, `failed`, default `"any"`): Which transaction outcomes to return.
    - `tokenAccounts` (string, optional, one of `none`, `balanceChanged`, `all`, default `"none"`): Token-account activity to match. Token-account activity is available from December 2022, slot 111,491,819.

## Result

- `result` (object, optional): An object with `data` and `paginationToken`. `paginationToken` is null when the answer is complete; otherwise pass it as `paginationToken` on the next call.
  - `data` (object[], optional)
    - `signature` (string, optional): Transaction signature, base-58 encoded. Signatures mode only.
    - `slot` (integer, optional): Slot the transaction was processed in.
    - `transactionIndex` (integer, optional): Index of this transaction within its block.
    - `err` (object | null, optional): Null if the transaction succeeded; a TransactionError object if it failed. Signatures mode only.
    - `memo` (string | null, optional): Contents of the transaction's memo instruction, if it had one. Signatures mode only.
    - `blockTime` (integer | null, optional): Estimated production time of the containing block, as Unix seconds.
    - `confirmationStatus` (string | null, optional, one of `processed`, `confirmed`, `finalized`, `null`): Confirmation status at the time of the response. Signatures mode only.
    - `transaction` (object, optional): The compiled transaction. Full mode only.
    - `meta` (object, optional): The transaction metadata, as `getTransaction` reports it. Full mode only.
    - `version` (any, optional): Full mode only: `"legacy"`, or the integer version number `0` or `1`.
  - `paginationToken` (string | null, optional): A `"slot:position"` string to continue with, or null when the answer is complete.

## Example: Last 2 signatures touching the USDC mint

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransactionsForAddress",
    "params": [
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      { "transactionDetails": "signatures", "limit": 2 }
    ]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "signature": "5Hj6FoCmr6hudn4ZohM9LKqcnKPmcE3AhPXoMWDyjiSRwarDQZNsLd4aTTrJ",
        "slot": 447947032,
        "transactionIndex": 2178,
        "err": null,
        "memo": null,
        "blockTime": 1789696264,
        "confirmationStatus": "finalized"
      },
      {
        "signature": "5UsbqkUn8AHsxA4r5KEbgs8BXJy21NtEuqkjq6hPLonfvtwd1gFt2Axzg2qS",
        "slot": 447947031,
        "transactionIndex": 12,
        "err": {
          "InstructionError": [
            5,
            {
              "Custom": 6010
            }
          ]
        },
        "memo": "[12] ck-docs-sample",
        "blockTime": 1789696261,
        "confirmationStatus": "finalized"
      }
    ],
    "paginationToken": "447947031:12"
  },
  "id": 1
}
```

## Example: One full transaction with jsonParsed encoding

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransactionsForAddress",
    "params": [
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      {
        "transactionDetails": "full",
        "encoding": "jsonParsed",
        "maxSupportedTransactionVersion": 0,
        "limit": 1
      }
    ]
  }'
```

Response:

```json
{
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "slot": 447947032,
        "transactionIndex": 2178,
        "blockTime": 1789696264,
        "transaction": {
          "signatures": [
            "5Hj6FoCmr6hudn4ZohM9LKqcnKPmcE3AhPXoMWDyjiSRwarDQZNsLd4aTTrJ"
          ],
          "message": {
            "recentBlockhash": "382VZbVeSXnFDJ9e1No9sd1vjuSMuofPeVrHa7wMLgc1",
            "accountKeys": [
              "HwfP9khbHJgWwnWB9Ai3DVCe8RWjCJUyYQETMnpxZ6YQ",
              "7HaQUK6x3it2URoVJ579osqrVxY7UoFgVPz5TchcWLjh",
              "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            ],
            "instructions": [
              {
                "parsed": {
                  "info": {
                    "destination": "7HaQUK6x3it2URoVJ579osqrVxY7UoFgVPz5TchcWLjh",
                    "lamports": 2538,
                    "source": "HwfP9khbHJgWwnWB9Ai3DVCe8RWjCJUyYQETMnpxZ6YQ"
                  },
                  "type": "transfer"
                },
                "program": "system",
                "programId": "11111111111111111111111111111111",
                "stackHeight": 1
              }
            ]
          }
        },
        "meta": {
          "err": null,
          "fee": 5000,
          "computeUnitsConsumed": 22007,
          "preBalances": [
            26295308491,
            723849
          ],
          "postBalances": [
            26295300953,
            726387
          ],
          "logMessages": [
            "Program 11111111111111111111111111111111 invoke [1]",
            "Program 11111111111111111111111111111111 success"
          ]
        },
        "version": 0
      }
    ],
    "paginationToken": null
  },
  "id": 1
}
```

_Long arrays in this example were trimmed._

## Notes

- Nexus only. Requests from other plans are answered with HTTP `403` and code `-32600`, `getTransactionsForAddress requires higher tier`.
- Answers come from long-term storage; the region's ledger does not serve this method. Walk `paginationToken` until it is null.
- With `transactionDetails: "full"`, a response holds at most 100 transactions. A higher `limit` is not an error: the response holds 100 and a `paginationToken` for the next page.
- `filters.tokenTransfer` is not supported. Use `filters.tokenAccounts` for token-account activity.
- To get the full transactions for an address, use `transactionDetails: "full"` and follow `paginationToken` (at most 100 per page). Signatures from this method in `"signatures"` mode do not make old transactions available through `getTransaction`: for a signature older than the region's ledger window, `getTransaction` returns `null`.
- Invalid parameters are returned as JSON-RPC errors. Batch requests are not supported: one call per HTTP request.

