Blockchain storage

The Record section enables the storing of records on the blockchain. A record is stored permanently: it cannot be changed, deleted, or modified by anyone and will be stored on the blockchain forever. Tatum supports storing data on the following blockchains:

  • Ethereum

Store log record

2 credits per API call. Additional credits are debited based on the size of the stored data and the type of blockchain.


Stores record data on blockchain. Tatum currently supports the Ethereum, CELO, MATIC, ONE, XDC, BSC, KLAY and EGLD to store data.
The total cost of the transaction (in credits) on the Ethereum blockchain is dependent on the size of the data. Data are stored as a HEX string and the maximum data size is approximatelly 130 kB on mainnet, 30 kB on testnet.
Every 5 characters of data costs 1 credit, so an API call with a data of length 1 kB = 1024 characters and would cost 205 credits.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
data
required
string [ 1 .. 130000 ] characters

Log data to be stored on a blockchain.

chain
required
string

Blockchain, where to store log data.

Enum: "ETH" "ONE" "XDC" "KLAY" "BSC" "MATIC"
fromPrivateKey
string = 66 characters

Private key of account, from which the transaction will be initiated. If not present, transaction fee will be debited from Tatum internal account and additional credits will be charged.

nonce
number >= 0

Nonce to be set to Ethereum transaction. If not present, last known nonce will be used.

to
string = 42 characters

Blockchain address to store log on. If not defined, it will be stored on an address, from which the transaction was being made.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/record
Request samples
application/json
{
  • "data": "My example log data.",
  • "chain": "ETH",
  • "fromPrivateKey": "0x05e150c73f1920ec14caa1e0b6aa09940899678051a78542840c2668ce5080c2",
  • "nonce": 0,
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Get log record

1 credit per API call.


Gets log data from the Ethereum blockchain.

SecurityX-API-Key
Request
query Parameters
chain
required
string

The blockchain to get the log record from

Value: "ETH"
Example: chain=ETH
id
required
string [ 1 .. 100 ] characters

ID of the log record / transaction on the blockchain

Example: id=0x94Ce79B9F001E25BBEbE7C01998A78F7B27D1326
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/record
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/record?chain=ETH&id=0x94Ce79B9F001E25BBEbE7C01998A78F7B27D1326' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "data": "My log record data."
}