---
title: "POST /transaction/history"
method: POST
path: "/transaction/history"
---

# POST /transaction/history

`POST /transaction/history`

Ordered by `<block.height, transaction.tx_index>`

Note: this endpoint only returns txs that are in a block. Use another tool to see mempool for txs not in a block

## Request body

- TransactionHistoryRequest
  - `withInputContext` boolean — If this is set to true, the result includes the input addresses (which are not part of the tx), and the metadata (if any)
  - `slotLimits` SlotLimits
    - `to` number, double, required
    - `from` number, double, required
  - `limit` number, double — Defaults to `ADDRESS_LIMIT.RESPONSE`
  - `relationFilter` number, double — Filter which uses of the address are considered relevant for the query. This is a bitmask, so you can combine multiple options ex: `RelationFilterType.Input | RelationFilterType.Output` Note: relations only apply to credentials and not to full bech32 addresses
  - `addresses` Address[], required
    - union — Supported types: - Credential hex (8200581c...) - note this is not a keyhash (it contains a credential type prefix) - Bech32 full address (`addr` / `addr_test` / `stake` / `stake_test`) - Bech32 credentials ( `addr_vkh`, `script`, etc.) - this is the recommended approach - Legacy Byron format (Ae2, Dd, etc.) Note: we recommend avoiding to query base addresses history using bech32 As Cardano UTXO spendability depends only on the payment credential and not the full base address The result will also miss transactions that are only related to the payment key of the address ex: the payment key is used in a multisig Note: using two different address representations in the same query will hurt performance (ex: addr1 and addr_vkh1) This because under-the-hood this will run multiple independent SQL queries for the different formats Warning: querying reward bech32 addresses is equivalent to querying the stake credential inside it This may return more results than expected (ex: a multisig containing the staking key of the wallet)
      - string
      - string
      - string
      - string
  - `after` BlockTxPair
    - `tx` string, required — tx hash
    - `block` string, required — block hash
  - `untilBlock` string, required — block hash - inclusive

## Response `200`

- TransactionHistoryResponse
  - `transactions` TxAndBlockInfo[], required
    - `transaction` TransactionInfo, required
      - `inputCredentials` string[]
      - `metadata` string, nullable
      - `payload` string, required — cbor-encoded transaction
      - `hash` string, required — Strictly speaking, you can calculate this by hashing the payload It's just provided for convenience
    - `block` BlockInfo, required
      - `slot` number, double, required
      - `epoch` number, double, required
      - `height` number, double, required
      - `hash` string, required
      - `era` number, double, required
      - `isValid` boolean, required
      - `indexInBlock` number, double, required — index of tx in block

## Other responses

- `400`
- `409`
- `422`

## Changes

- **2024-03-12** `2f08aec7590a` — 4 info
  - added the new optional request property `allOf[subschema #1]/slotLimits`
  - added the new optional request property `allOf[subschema #1]/withInputContext`
  - added the optional property `transactions/items/transaction/inputCredentials` to the response with the `200` status
  - added the optional property `transactions/items/transaction/metadata` to the response with the `200` status
- **2023-12-01** `bfb1cc42bf41` — 1 info
  - the `transactions/items/block/allOf[#/components/schemas/BlockSubset]/hash` response's property pattern `[0-9a-fA-F]{64}` was added for the status `200`
- **2022-05-24** `26c530df5eff` — 1 info
  - added the non-success response with the status `409`
- **2022-05-23** `32185a48bca7` — 3 breaking, 2 warning, 1 info
  - added `#/components/schemas/AfterBlockPagination, #/components/schemas/UntilBlockPagination` to the `allOf[#/components/schemas/Pagination]/` request property `allOf` list
  - the `allOf[#/components/schemas/Pagination]/` request property type/format changed from `object`/`` to ``/``
  - the `allOf[subschema #1]/addresses/items/` request property type/format changed from `string`/`` to ``/``
  - removed the request property `allOf[#/components/schemas/Pagination]/after`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/dcspark/apis/carp/changes/transaction/history/post.md)

---

[API](https://skmtc.dev/dcspark/apis/carp.md) · [All operations](https://skmtc.dev/dcspark/apis/carp/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dcspark/carp/revisions/ab189523ed9a/schema)
