Cardano

Cardano is a decentralized, open-source blockchain. With Tatum, you can access the most commonly used Cardano methods. These methods bring a certain level of abstraction and are used for applications that communicate with the blockchain directly. Some of the methods are used alongside virtual accounts to connect the blockchain and a virtual account, like generating a wallet or getting information about transactions.

Tatum supports Cardano mainnet and Cardano preproduction testnet.

Get Blockchain information

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Gets Ada blockchain information. Obtains basic info like the testnet / mainnet version of the chain, the current block number and its hash.

SecurityX-API-Key
Responses
200

OK

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/ada/info
Request samples
Response samples
application/json
{
  • "testnet": "test",
  • "tip": {
    }
}

Generate Ada wallet

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Tatum supports BIP44 HD wallets. Because they can generate 2^31 addresses from 1 mnemonic phrase, they are very convenient and secure. A mnemonic phrase consists of 24 special words in a defined order and can restore access to all generated addresses and private keys.
Each address is identified by 3 main values:

  • Private Key - your secret value, which should never be revealed
  • Public Key - public address to be published
  • Derivation index - index of generated address

Tatum follows BIP44 specification and generates for ADA wallet with derivation path m/1852'/1815'/0'. More about BIP44 HD wallets can be found here - https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki. Generate BIP44 compatible Ada wallet.

SecurityX-API-Key
Request
query Parameters
mnemonic
string <= 500 characters

Mnemonic to use for generation of extended public and private keys.

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/ada/wallet
Request samples
Response samples
application/json
{
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse",
  • "xpub": "xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid"
}

Generate Ada deposit address from Extended public key

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Generates a Ada deposit address from an Extended public key. The deposit address is generated for the specific index - each extended public key can generate up to 2^31 addresses starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
path Parameters
xpub
required
string

Extended public key of a wallet.

Example: 30e96a57be6235c686da968c1860f69d1871a692b29626b7ebb923aff8c6731cb9fef3a26b7eba8a07653483d06427d0c07966c5f81c69a7925d714530bedb1ef9e9103547b54ad0954b3569785ca70e1fd08313f92a3a9d31efa216b2b9adac4678455e66c97b53cd589f9da70a14265cf15cd4c1e0ce914407008f4a65f316
index
required
number >= 0

Derivation index of the desired address to be generated.

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/ada/address/{xpub}/{index}
Request samples
Response samples
application/json
{
  • "address": "addr1qyyxyhaa2e7kxeqcc72w7f747zqlgwwwstlzsg9umuxc40wnhawldxl4nan95rhtlcnju9q2r8j9qz8vslwsmrkj5r4spxhep9"
}

Generate Ada private key

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Generates a private key for an address from a mnemonic for a given derivation path index. The private key is generated for the specific index - each mnemonic can generate up to 2^32 private keys starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
Request Body schema: application/json
required
index
required
integer <= 2147483647

Derivation index of private key to generate.

mnemonic
required
string [ 1 .. 500 ] characters

Mnemonic to generate private key from.

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/ada/wallet/priv
Request samples
application/json
{
  • "index": 0,
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse"
}
Response samples
application/json
{
  • "key": "cTmS2jBWXgFaXZ2xG9jhn67TiyTshnMp3UedamzEhGm6BZV1vLgQ"
}

Get Block by hash or height

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Gets Ada block detail by block hash or height.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Block hash or height.

Example: 00000000ca231a439a5c0a86a5a5dd6dc1918a8e897b96522fa9499288e70183
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.

404

Block not found.

500

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

get/v3/ada/block/{hash}
Request samples
Response samples
application/json
{
  • "hash": "6178dda07b94becb118f67b21aa72f60d85c1029e9e9b8ae56a25d684de66078",
  • "number": 1234314,
  • "epochNo": 536870912,
  • "slotNo": "a3047a060e5d586a9b26779ebe62fc57ce7323745da8f28761ab755454d89c52",
  • "forgedAt": "2020-10-20T08:21:50.107Z",
  • "transactions": [
    ]
}

Get transaction by hash

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Get Ada Transaction detail by transaction hash.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: 1451692ebbfbea1a2d2ec6fe6782596b6aa2e46c0589d04c406f491b5b46bc6a
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/ada/transaction/{hash}
Request samples
Response samples
application/json
{
  • "hash": "5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a",
  • "fee": "0.00001682",
  • "block": {
    },
  • "inputs": [
    ],
  • "outputs": [
    ]
}

Get transactions by address

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Gets a Ada transaction by address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Address

Example: Ae2tdPwUPEZMmrkRoduJW9w7wRvnTcdeMbw7yyyjwPqo6zuaeJaDEkHUJSz
query Parameters
pageSize
required
number [ 1 .. 50 ]

Max number of items per page is 50.

Example: pageSize=10
offset
number

Offset to obtain the next page of data.

Example: offset=0
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/ada/transaction/address/{address}
Request samples
Response samples
application/json
[
  • {
    }
]

Get UTXOs by address

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


1 credit per API call.

Gets a Ada UTXOs by address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Address

Example: Ae2tdPwUPEZMmrkRoduJW9w7wRvnTcdeMbw7yyyjwPqo6zuaeJaDEkHUJSz
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/ada/{address}/utxos
Request samples
Response samples
application/json
[
  • {
    }
]

Send ADA to Cardano addresses

2 credits per API call

Send ADA to blockchain addresses.

Cardano transactions are based on UTXOs. "UTXO" stands for "Unspent Transaction Output". A UTXO is the amount of ADA that remains at a Cardano address after a cryptocurrency transaction involving this address has been performed. The UTXO can then be used as input for a new cryptocurrency transaction. For more information about the UTXO, see the Bitcoin user documentation.

You can build an ADA transaction by one of the following methods:

  • Sending ADA from blockchain addresses
    The assets are sent from a list of addresses. For each address, the last 100 transactions are scanned for any UTXO to be included in the transaction. For easier control over the assets to be sent, we recommend that you use this method only if you have one address to send the assets from.
    To use this method, use the AdaTransactionFromAddress or AdaTransactionFromAddressKMS schema of the request body.
  • Sending ADA from UTXOs
    The assets are sent from a list of UTXOs. Each UTXO is included in the transaction. Use this method if you want to manually calculate the amount to send.
    To use this method, use the AdaTransactionFromUTXO or AdaTransactionFromUTXOKMS schema of the request body.

When an UTXO is entered into a transaction, the whole UTXO amount is included and must be spent. For example, address A receives two transactions, T1 with 1 ADA and T2 with 2 ADA. A transaction that consumes the UTXOs from both T1 and T2 will have an available amount of 3 ADA to spend:
1 ADA (from T1) + 2 ADA (from T2) = 3 ADA (to spend in total)

You can send the assets to one or multiple recipients in one transaction. If you send the assets to multiple addresses, each address must have its own amount to receive.

Paying the gas fee and receiving the change
When the amount that the recipients should receive is lower than the amount from the UTXOs, the difference between these two amounts is by default used as the gas fee for the transaction. Because this amount may be considerable and you may not want to spend it all on the gas fee, you can explicitly specify the fee amount and the blockchain address where any extra funds remaining after covering the fee will be sent (the fee and changeAddress parameters in the request body, correspondingly).

Signing a transaction
When sending ADA, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.

SecurityX-API-Key
Request
Request Body schema: application/json
required
One of:
required
Array of objects

The array of blockchain addresses to send the assets from and their private keys. For each address, the last 100 transactions are scanned for any UTXO to be included in the transaction.

Array
address
required
string [ 30 .. 128 ]

The blockchain address to send the assets from

privateKey
required
string [ 52 .. 128 ]

The private key of the address to send the assets from

required
Array of objects

The array of blockchain addresses to send the assets to and the amounts that each address should receive (in ADA). The difference between the UTXOs calculated in the fromAddress section and the total amount to receive calculated in the to section will be used as the gas fee. To explicitly specify the fee amount and the blockchain address where any extra funds remaining after covering the fee will be sent, set the fee and changeAddress parameters.

Array
address
required
string [ 30 .. 128 ]

The blockchain address to receive the assets

value
required
number >= 0

The amount to receive (in ADA)

fee
required
number

The fee to be paid for the transaction (in ADA).

changeAddress
required
string [ 30 .. 128 ]

The blockchain address to send any extra assets remaning after covering the fee to.

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/ada/transaction
Request samples
application/json
{
  • "fromAddress": [
    ],
  • "to": [
    ],
  • "fee": 0.0015,
  • "changeAddress": "addr_test1vzdts2y4k47zwypzdh36azxx0w4v8tev6m6svtz9fud0emgchuswu"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Broadcast signed Ada transaction

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


2 credits per API call.

Broadcasts a signed transaction to the Ada blockchain. This method is used internally from Tatum KMS or Tatum Client Libraries. It is possible to create a custom signing mechanism and only use this method for broadcasting data to the blockchain.

SecurityX-API-Key
Request
Request Body schema: application/json
required
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

signatureId
string <uuid>

ID of prepared payment template to sign. Required only, when broadcasting transaction signed by Tatum KMS.

index
number [ 0 .. 2147483647 ]

(Only if the signature ID is mnemonic-based and you run KMS v6.2 or later) The index of the address to send the assets from that was generated from the mnemonic

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/ada/broadcast
Request samples
application/json
{
  • "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}

Gets a Ada account by address

You can work with Cardano by connecting directly to a blockchain node provided by Tatum.


2 credits per API call.

Gets a Ada account by address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Address

Example: Ae2tdPwUPEZMmrkRoduJW9w7wRvnTcdeMbw7yyyjwPqo6zuaeJaDEkHUJSz
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/ada/account/{address}
Request samples
Response samples
application/json
[
  • [
    ]
]