How to send a feeless instant transaction

Not every transaction should be recorded on the blockchain. To be more precise, almost no transaction is significant enough in and of itself to be stored on the blockchain. Why? Every transaction incurs a transaction fee. And it makes no sense to pay, for example, $1 for a transaction worth $5 in bitcoin.

To avoid these types of transactions and the fees that come along with them, the private ledger is an ideal solution.

Tatum Private Ledger is a universal Layer-2 solution that can be plugged into any blockchain supported by Tatum.

It's both extremely easy and highly practical to utilize the private ledger to send instant transactions between ledger accounts. As a prerequisite, you must have at least two ledger accounts with assets on at least one of them.

Performing a ledger transaction

A ledger transaction is a transaction that is settled immediately with no blockchain fee incurred. It is a transaction between two ledger accounts with the same account currency, i.e., Bitcoin accounts, Ethereum accounts, or your custom FIAT accounts.

Tatum supports microtransactions. You can send as little as 1/1000000 of a Satoshi for Bitcoin or 1/1000000 of a Wei of Ethereum inside the ledger.

Request
Response
Request
curl --location --request POST 'https://api-eu1.tatum.io/v3/ledger/transaction' \
--header 'x-api-key: YOUR_API_KEY ' \
--header 'Content-Type: application/json' \
--data-raw '{
"senderAccountId": "5fad2aa1cac7f2e8aeac0e6b",
"recipientAccountId": "5fbaca3001421166273b3779",
"amount": "0.000001"
}'
Response
{
"reference": "9e179f90-0221-480f-adb4-28bd1937bb20"
}

Getting the details of the transaction

When you perform a ledger transaction, there are actually two transactions written inside the ledger - one for the sender and one for the recipient of the transaction, each with slightly different data.

  • the accountID and counterAccountID for the transaction are opposite

  • the transactionType is DEBIT or CREDIT based on the sender and recipient account

  • the marketValue might be different based on the settings of the accounts in the transaction

Request
Response
Request
curl --location --request GET 'https://api-eu1.tatum.io/v3/ledger/transaction/reference/9e179f90-0221-480f-adb4-28bd1937bb20' \
--header 'x-api-key: YOUR_API_KEY '
Response
[
{
"amount": "-0.000001",
"operationType": "PAYMENT",
"currency": "BTC",
"transactionType": "DEBIT_PAYMENT",
"accountId": "5fad2aa1cac7f2e8aeac0e6b",
"anonymous": false,
"reference": "9e179f90-0221-480f-adb4-28bd1937bb20",
"counterAccountId": "5fbaca3001421166273b3779",
"senderNote": null,
"recipientNote": null,
"paymentId": null,
"transactionCode": null,
"marketValue": {
"currency": "EUR",
"source": "CoinGecko",
"sourceDate": 1606076765607,
"amount": "-0.01566745999999999889"
},
"created": 1606076989819
},
{
"amount": "0.000001",
"operationType": "PAYMENT",
"currency": "BTC",
"transactionType": "CREDIT_PAYMENT",
"accountId": "5fbaca3001421166273b3779",
"anonymous": false,
"reference": "9e179f90-0221-480f-adb4-28bd1937bb20",
"counterAccountId": "5fad2aa1cac7f2e8aeac0e6b",
"senderNote": null,
"recipientNote": null,
"paymentId": null,
"transactionCode": null,
"marketValue": {
"currency": "EUR",
"source": "CoinGecko",
"sourceDate": 1606076765607,
"amount": "0.01566745999999999889"
},
"created": 1606076989819
}
]

The market value in the transaction is part of the compliance engine built into Tatum Private Ledger. It records the transaction's exact value in the FIAT currencies - US Dollars, Euros, etc. Currency is obtained from the accountingCurrency property of the account.

And that's it. You can easily perform instant transactions and get them from the ledger. You can also obtain a list of transactions for the specific account or find customer transactions across multiple accounts.