Transactions API

Get transaction history

Changed on

/v4/data/transaction/history

20 credits per API call

Get transaction history on the following blockchains:

  • Ethereum - ethereum-mainnet / ethereum-sepolia
  • Base - base-mainnet / base-sepolia
  • Arbitrum - arb-one-mainnet / arb-testnet
  • BNB (Binance) Smart Chain - bsc-mainnet / bsc-testnet
  • Polygon - polygon-mainnet / polygon-amoy
  • Optimism - optimism-mainnet / optimism-testnet
  • Berachain - berachain-mainnet
  • Unichain - unichain-mainnet / unichain-sepolia
  • Monad - monad-mainnet / monad-testnet
  • Robinhood - robinhood-mainnet / robinhood-testnet
  • Celo - celo-mainnet / celo-testnet
  • Chiliz - chiliz-mainnet
  • Tezos - tezos-mainnet
  • Moca Chain - mocachain-devnet
  • Avalanche - avax-mainnet / avax-testnet
  • Gnosis - gno-mainnet / gno-testnet
  • zkSync - zksync-mainnet / zksync-testnet
  • Rootstock - rsk-mainnet / rsk-testnet
  • Ethereum Classic - ethereum-classic-mainnet / ethereum-classic-testnet
  • Lisk - lisk-mainnet / lisk-testnet
  • XDC - xdc-mainnet / xdc-testnet
  • Sonic - sonic-mainnet / sonic-blaze

To get started:

  • Provide a chain name and an address of that chain. Our API will return all of their transactions along with further information such as their block number, ID of involved token, and more.
  • If not specified, the API returns transactions of various types (fungible, nft, multitoken, native), but you can also choose to filter specific transactionTypes and even transactionSubtype (incoming, outgoing, zero-transfer).
  • On top of that, you can add further filters such as specifying block range where the transactions should have occurred, or address and ID of involved tokens.
  • When you are filtering data using blockFrom and not using blockTo, blockTo is automatically added as blockFrom + 1000. The same applies when blockTo is present and blockFrom is not. In that case blockFrom is automatically added as blockTo - 1000.
  • For Tezos blockchain, the API accepts only one wallet address in addresses query parameter. Following query parameters won't have any effect on filtering data: transactionTypes, transactionSubtype, tokenId, blockTo.
  • When querying Tezos transactions for a specified wallet or contract address, pagination is supported via pageSize and offset query parameters.
  • When querying Tezos transactions for a specified block, pagination is supported via cursor query parameter, by filling in the value from prevPage or nextPage field in the response body.
  • Pagination and transaction types. Results are ordered by block number. When a request covers more than one transaction type (the default when transactionTypes is omitted), the history for each type is collected separately and merged before paging. For addresses with a large volume of activity across several types, the block ranges of neighbouring pages may overlap or leave gaps, so a transaction can appear on more than one page or be skipped.
  • To paginate reliably, request one transaction type per call (for example transactionTypes=fungible) and page through each type separately. Pagination within a single type is stable. You can also narrow a request with blockFrom and blockTo and walk the history in block windows.
get/v4/data/transaction/history

Request

  • Base URL
    https://api.tatum.io
  • URL
    https://api.tatum.io/v4/data/transaction/history
  • Auth
    API key in header x-api-key

Query parameters

chain'ethereum-mainnet' | 'ethereum-sepolia' | 'base-mainnet' | 'base-sepolia' | 'arb-one-mainnet' | 'arb-testnet' | 'bsc-mainnet' | 'bsc-testnet' | 'polygon-mainnet' | 'polygon-amoy' | 'optimism-mainnet' | 'optimism-testnet' | 'berachain-mainnet' | 'unichain-mainnet' | 'unichain-sepolia' | 'monad-mainnet' | 'monad-testnet' | 'robinhood-mainnet' | 'robinhood-testnet' | 'celo-mainnet' | 'celo-testnet' | 'chiliz-mainnet' | 'tezos-mainnet' | 'avax-mainnet' | 'avax-testnet' | 'gno-mainnet' | 'gno-testnet' | 'zksync-mainnet' | 'zksync-testnet' | 'rsk-mainnet' | 'rsk-testnet' | 'ethereum-classic-mainnet' | 'ethereum-classic-testnet' | 'lisk-mainnet' | 'lisk-testnet' | 'xdc-mainnet' | 'xdc-testnet' | 'sonic-mainnet' | 'sonic-blaze' required
Example:ethereum-mainnet

The blockchain to work with.

addressesstring required
Example:0x2474a7227877f2b65185f09468af7c6577fa207c

The blockchain public wallet addresses. Only one address is allowed.

transactionTypes'fungible' | 'nft' | 'multitoken' | 'native'
Example:fungible,nft

The option to filter transaction based on types. It is possible to enter list of multiple types as a comma separated string. Use fungible (ERC-20), nft (ERC-721 and ERC-1155), multitoken (ERC-1155) or native. For consistent pagination over long histories, pass a single type per request and paginate each type separately.

transactionSubtype'incoming' | 'outgoing' | 'zero-transfer'
Example:incoming

The option to filter transaction based on subtype.

tokenAddressstring

Contract address of the token.

Example:0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623

Address of a token (smart contract).

tokenIdstring uint256

ID of the token.

Example:3

ID of a token.

blockFromnumber
Example:16499510

Transactions from this block onwards will be included. If blockTo is not specified, it is automatically calculated as blockFrom + 1000.

blockTonumber
Example:16779230

Transactions up to this block will be included. If blockFrom is not specified, it is automatically calculated as blockTo - 1000.

pageSizenumber
Example:10

The number of items per page (default is 50).

offsetnumber

The offset to obtain next page of the data. Page boundaries are only guaranteed to be stable when a single transactionTypes value is set.

cursorstring

Cursor pagination, used to get next page or previous page of results. The size of result is defined by the pageSize parameter. The cursor is a base64 encoded string, user can get the value from a response in the nextPage or prevPage field. If the nextPage or prevPage fields are not present in the response body, pagination is usually available with the offset and pageSize parameters.

Example:MzYxNTQ3MHwyNDV8cHJldg==

The cursor to obtain previous page or next page of the data. Available only for Tezos blockchain.

sort'ASC' | 'DESC'
Example:ASC

Sorting of the transactions. ASC - oldest first, DESC - newest first.

Response

OK

prevPagestring

Cursor pagination, used to get previous page of results (only relevant for Tezos).

nextPagestring

Cursor pagination, used to get next page of results (only relevant for Tezos).

Example response

{
  "result": [
    {
      "chain": "ethereum-mainnet",
      "hash": "0x549447710026cef714da21fb29cbfae1f689bd3246f2fa0a5081149c4aeb3bb3",
      "address": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
      "blockNumber": 16819465,
      "transactionType": "fungible",
      "transactionSubtype": "incoming",
      "amount": "0.990923706372082143",
      "timestamp": 1678715303000,
      "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "counterAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852"
    },
    {
      "chain": "ethereum-mainnet",
      "hash": "0x549447710026cef714da21fb29cbfae1f689bd3246f2fa0a5081149c4aeb3bb3",
      "address": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
      "blockNumber": 16819465,
      "transactionType": "native",
      "transactionSubtype": "zero-transfer",
      "amount": "0",
      "timestamp": 1678715303000,
      "counterAddress": "0xd841e3d110cbe4aedb04c9dcc3572ec306bda2f9"
    },
    {
      "chain": "ethereum-mainnet",
      "hash": "0x4e0268c1e67575fd09047e006dd5ad26df402d85fa159e10639e9ea7c2d428f7",
      "address": "0x0000000000000000000000000000000000000000",
      "blockNumber": 16819465,
      "transactionType": "nft",
      "transactionSubtype": "outgoing",
      "amount": "-1",
      "timestamp": 1678715303000,
      "tokenId": "33",
      "tokenAddress": "0x3bcad8a734e923133d2c8c3fd4747d47e12d4f79",
      "counterAddress": "0x84300dcc7ca9cf447e886fa17c11fa22557d1af0"
    }
  ],
  "prevPage": "KtYxNTQ3MHwyNDV8cHJldgs=",
  "nextPage": "MzYxNTQ3MHwyNDV8cHJldg=="
}

Changes

    • warning

      added the new robinhood-mainnet enum value to the // response property for the response status

    • warning

      added the new robinhood-testnet enum value to the // response property for the response status

    • info

      added the new enum value robinhood-mainnet to the query request parameter chain

    • info

      added the new enum value robinhood-testnet to the query request parameter chain