Blockchain storage

Store a log record

/v3/record

2 credits per API call + additional credits based on the size of the stored data and the type of the blockchain

Store data on the blockchain.

The total cost of a transaction on Ethereum (in credits) depends on the size of the data. The data is stored as a string in the hexadecimal format, and the maximum size of the data is approximately 130 kB on the mainnet and 30 kB on testnet. Every 5 characters cost 1 credit.
Therefore, one API call with 1 kB of data (1024 characters) would cost 205 credits.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Elrond
  • Ethereum (only the mainnet or the Sepolia testnet)
  • Harmony
  • Klaytn
  • Polygon
  • XDC
post/v3/record

Request

  • Base URL
    https://api.tatum.io
  • URL
    https://api.tatum.io/v3/record
  • Auth
    API key in header x-api-key

Request body

OR
OR

Example request

{
  "data": "My example log data",
  "chain": "ETH",
  "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  "from": "erd17k95m339aqzxzyvjjjfa3lka0yyeqgcsda50tw5z9g73ycfe2caq9e6jq7",
  "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  "ethFee": {
    "gasPrice": "20",
    "gasLimit": "40000"
  }
}

Response

OK

gasPricestring required

The price for one gas unit (in Gwei)

gasLimitstring required

The maximum number of gas units that you are willing to spend on processing the transaction at the provided gas price

Example response

{
  "gasPrice": "20",
  "gasLimit": "40000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.